Merge branch 'master' of ssh://git.libre-riscv.org:922/soc
[soc.git] / .gitlab-ci.yml
1 image: debian:10
2
3 cache:
4 paths:
5 - ccache
6 - .cache/pip
7 - apt-cache
8
9 variables:
10 PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
11 GIT_SUBMODULE_STRATEGY: recursive
12
13 build:
14 stage: build
15 before_script:
16 - mkdir -p apt-cache
17 - apt-get -o dir::cache::archives="$(pwd)/apt-cache" update
18 - >-
19 apt-get -o dir::cache::archives="$(pwd)/apt-cache" -y install
20 build-essential git python3-dev python3-pip
21 python3-setuptools python3-wheel pkg-config tcl-dev
22 libreadline-dev bison flex libffi-dev ccache python3-venv
23 binutils-powerpc64-linux-gnu binutils-powerpc64le-linux-gnu
24 autoconf gperf libgmp-dev libmpfr-dev libssl-dev curl
25 - export PATH="/usr/lib/ccache:$PATH"
26 - export CCACHE_BASEDIR="$PWD"
27 - export CCACHE_DIR="$PWD/ccache"
28 - export CCACHE_COMPILERCHECK=content
29 - ccache --zero-stats || true
30 - ccache --show-stats || true
31 - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
32 - source $HOME/.cargo/env
33 after_script:
34 - export CCACHE_DIR="$PWD/ccache"
35 - ccache --show-stats
36 script:
37 - python3 -m venv .env
38 - . .env/bin/activate
39 - pip install nose
40
41 - git clone --depth 1 https://github.com/SRI-CSL/yices2.git yices2
42 - pushd yices2
43 - autoconf
44 - ./configure
45 - make -j$(nproc) > /dev/null
46 - make install
47 - popd
48
49 - git clone --depth 1 https://github.com/YosysHQ/yosys.git yosys
50 - pushd yosys
51 - make config-gcc
52 - make -j$(nproc) > /dev/null
53 - make install
54 - popd
55 - yosys -V
56
57 - git clone --depth 1 https://github.com/YosysHQ/SymbiYosys.git SymbiYosys
58 - pushd SymbiYosys
59 - make install > /dev/null
60 - popd
61
62 - git clone --depth 1 https://github.com/nmigen/nmigen.git nmigen
63 - pushd nmigen
64 - python setup.py develop
65 - popd
66
67 - git clone --depth 1 https://git.libre-soc.org/git/nmutil.git nmutil
68 - pushd nmutil
69 - python setup.py develop
70 - popd
71
72 - git clone --depth 1 https://git.libre-soc.org/git/nmigen-soc.git nmigen-soc
73 - pushd nmigen-soc
74 - git tag | xargs git tag -d
75 - python setup.py develop
76 - popd
77
78 - git clone --depth 1 https://git.libre-soc.org/git/ieee754fpu.git ieee754fpu
79 - pushd ieee754fpu
80 - python setup.py develop
81 - popd
82
83 - git clone --depth 1 https://git.libre-soc.org/git/openpower-isa.git openpower-isa
84 - pushd openpower-isa
85 - python3 setup.py develop
86 - make -j$(nproc) svanalysis > /dev/null
87 - make -j$(nproc) pywriter > /dev/null 2>&1
88 - popd
89
90 - git clone --depth 1 https://git.libre-soc.org/git/c4m-jtag.git c4m-jtag
91 - pushd c4m-jtag
92 - python setup.py develop
93 - popd
94
95 - IEEE754FPU_PATH="$(pwd)"/ieee754fpu
96 - git clone --depth 1 --recursive https://github.com/billzorn/sfpy.git sfpy
97 - pushd sfpy
98 - pushd berkeley-softfloat-3
99 - git apply "$IEEE754FPU_PATH"/berkeley-softfloat.patch
100 - popd
101 - pushd SoftPosit
102 - git apply ../softposit_sfpy_build.patch
103 - git apply "$IEEE754FPU_PATH"/SoftPosit.patch
104 - popd
105 - pip install --upgrade -r requirements.txt
106 - make lib -j$(nproc)
107 - make cython -j$(nproc)
108 - make wheel -j$(nproc)
109 - pip install dist/sfpy*.whl
110 - popd
111
112 - cargo install maturin
113 - git clone --depth 1 https://git.libre-soc.org/git/power-instruction-analyzer.git pia
114 - pushd pia
115 - maturin build --cargo-extra-args=--features=python-extension
116 - python3 -m pip install target/wheels/*.whl
117 - popd
118
119 - python setup.py develop
120 - pywriter > /dev/null 2>&1
121 - nosetests -v --processes=-1 --process-timeout=120