set 'soc' filter to filter out v3.1 insns
[soc.git] / .gitlab-ci.yml
1 image: debian:10
2
3 cache:
4 paths:
5 - ccache
6 - .cache/pip
7 - apt-cache
8 when: 'always'
9
10 variables:
11 PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
12 GIT_SUBMODULE_STRATEGY: recursive
13 GIT_DEPTH: "500"
14
15 build:
16 stage: build
17 timeout: 2h
18 before_script:
19 - mkdir -p apt-cache
20 - apt-get -o dir::cache::archives="$(pwd)/apt-cache" update
21 - >-
22 apt-get -o dir::cache::archives="$(pwd)/apt-cache" -y install
23 build-essential
24 git
25 python3-dev
26 python3-pip
27 python3-setuptools
28 python3-setuptools-scm
29 python3-wheel
30 pkg-config
31 tcl-dev
32 libreadline-dev
33 bison
34 flex
35 libffi-dev
36 ccache
37 python3-venv
38 binutils-powerpc64-linux-gnu
39 binutils-powerpc64le-linux-gnu
40 autoconf
41 gperf
42 libgmp-dev
43 libmpfr-dev
44 libssl-dev
45 curl
46 - export PATH="/usr/lib/ccache:$PATH"
47 - export CCACHE_BASEDIR="$PWD"
48 - export CCACHE_DIR="$PWD/ccache"
49 - export CCACHE_COMPILERCHECK=content
50 - ccache --zero-stats || true
51 - ccache --show-stats || true
52 - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
53 - source $HOME/.cargo/env
54 script:
55 - python3 -m venv --system-site-packages .env
56 - . .env/bin/activate
57 - pip install pytest-xdist==3.3.1 pytest==7.3.1
58
59 - git clone --depth 1 https://git.libre-soc.org/git/pytest-output-to-files.git pytest-output-to-files
60 - pushd pytest-output-to-files
61 - git rev-parse HEAD
62 - python3 setup.py develop
63 - popd
64
65 - git clone --depth 1 -b Yices-2.6.4 https://github.com/SRI-CSL/yices2.git yices2
66 - pushd yices2
67 - autoconf
68 - ./configure
69 - make -j$(nproc)
70 - make install
71 - popd
72
73 - git clone --depth 1 -b yosys-0.17 https://github.com/YosysHQ/yosys.git yosys
74 - pushd yosys
75 - make config-gcc
76 - make -j$(nproc)
77 - make install
78 - popd
79 - yosys -V
80
81 - git clone https://github.com/YosysHQ/SymbiYosys.git SymbiYosys
82 - pushd SymbiYosys
83 - git checkout d10e472edf4ea9be3aa6347b264ba575fbea933a
84 - make install
85 - popd
86
87 - git clone --depth 1 -b v1.5.2 https://github.com/cocotb/cocotb.git cocotb
88 - pushd cocotb
89 - python3 setup.py install
90 - popd
91
92 - git clone --depth 1 https://gitlab.com/nmigen/nmigen.git nmigen
93 - pushd nmigen
94 - git rev-parse HEAD
95 - python3 setup.py develop
96 - popd
97
98 - git clone --depth 1 https://git.libre-soc.org/git/mdis.git mdis
99 - pushd mdis
100 - git rev-parse HEAD
101 - python3 setup.py develop
102 - popd
103
104 - git clone --depth 1 https://git.libre-soc.org/git/nmutil.git nmutil
105 - pushd nmutil
106 - git rev-parse HEAD
107 - python3 setup.py develop
108 - popd
109
110 - git clone --depth 1 https://git.libre-soc.org/git/nmigen-soc.git nmigen-soc
111 - pushd nmigen-soc
112 - git tag | xargs git tag -d
113 - python setup.py develop
114 - popd
115
116 - git clone --depth 1 https://git.libre-soc.org/git/ieee754fpu.git ieee754fpu
117 - pushd ieee754fpu
118 - python setup.py develop
119 - popd
120
121 - git clone --depth 1 https://git.libre-soc.org/git/openpower-isa.git openpower-isa
122 - pushd openpower-isa
123 - python3 setup.py develop
124 - if ! out="$(make 2>&1)"; then echo "$out"; exit 1; fi
125 - popd
126
127 - git clone --depth 1 https://git.libre-soc.org/git/c4m-jtag.git c4m-jtag
128 - pushd c4m-jtag
129 - python setup.py develop
130 - popd
131
132 - IEEE754FPU_PATH="$(pwd)"/ieee754fpu
133 - git clone --depth 1 --recursive -b v0.6.0 https://github.com/billzorn/sfpy.git sfpy
134 - pushd sfpy
135 - git apply "$IEEE754FPU_PATH"/sfpy.patch
136 - pushd berkeley-softfloat-3
137 - git apply "$IEEE754FPU_PATH"/berkeley-softfloat.patch
138 - popd
139 - pushd SoftPosit
140 - git apply ../softposit_sfpy_build.patch
141 - git apply "$IEEE754FPU_PATH"/SoftPosit.patch
142 - popd
143 - pip install -r requirements.txt
144 - make lib -j$(nproc)
145 - make cython -j$(nproc)
146 - make wheel -j$(nproc)
147 - pip install --force-reinstall dist/sfpy*.whl
148 - popd
149
150 - python3 -m pip install 'maturin>=0.11,<0.12'
151 - git clone --depth 1 https://git.libre-soc.org/git/power-instruction-analyzer.git pia
152 - pushd pia
153 - maturin build --cargo-extra-args=--features=python-extension
154 - python3 -m pip install target/wheels/*.whl
155 - popd
156
157 - python setup.py develop
158 - SILENCELOG='!*,default' pytest -v --maxfail=10