make installing cocotb work
[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 -b v0.1.1 https://github.com/cocotb/cocotb-bus.git cocotb-bus
60 - pushd cocotb-bus
61 - pip install . --no-deps
62 - popd
63
64 - git clone --depth 1 -b v1.5.2 https://github.com/cocotb/cocotb.git cocotb
65 - pushd cocotb
66 - pip install .
67 - popd
68
69 - git clone --depth 1 https://git.libre-soc.org/git/pytest-output-to-files.git pytest-output-to-files
70 - pushd pytest-output-to-files
71 - git rev-parse HEAD
72 - python3 setup.py develop
73 - popd
74
75 - git clone --depth 1 -b Yices-2.6.4 https://github.com/SRI-CSL/yices2.git yices2
76 - pushd yices2
77 - autoconf
78 - ./configure
79 - make -j$(nproc)
80 - make install
81 - popd
82
83 - git clone --depth 1 -b yosys-0.17 https://github.com/YosysHQ/yosys.git yosys
84 - pushd yosys
85 - make config-gcc
86 - make -j$(nproc)
87 - make install
88 - popd
89 - yosys -V
90
91 - git clone https://github.com/YosysHQ/SymbiYosys.git SymbiYosys
92 - pushd SymbiYosys
93 - git checkout d10e472edf4ea9be3aa6347b264ba575fbea933a
94 - make install
95 - popd
96
97 - git clone --depth 1 https://gitlab.com/nmigen/nmigen.git nmigen
98 - pushd nmigen
99 - git rev-parse HEAD
100 - python3 setup.py develop
101 - popd
102
103 - git clone --depth 1 https://git.libre-soc.org/git/mdis.git mdis
104 - pushd mdis
105 - git rev-parse HEAD
106 - python3 setup.py develop
107 - popd
108
109 - git clone --depth 1 https://git.libre-soc.org/git/nmutil.git nmutil
110 - pushd nmutil
111 - git rev-parse HEAD
112 - python3 setup.py develop
113 - popd
114
115 - git clone --depth 1 https://git.libre-soc.org/git/nmigen-soc.git nmigen-soc
116 - pushd nmigen-soc
117 - git tag | xargs git tag -d
118 - python setup.py develop
119 - popd
120
121 - git clone --depth 1 https://git.libre-soc.org/git/ieee754fpu.git ieee754fpu
122 - pushd ieee754fpu
123 - python setup.py develop
124 - popd
125
126 - git clone --depth 1 https://git.libre-soc.org/git/openpower-isa.git openpower-isa
127 - pushd openpower-isa
128 - python3 setup.py develop
129 - if ! out="$(make 2>&1)"; then echo "$out"; exit 1; fi
130 - popd
131
132 - git clone --depth 1 https://git.libre-soc.org/git/c4m-jtag.git c4m-jtag
133 - pushd c4m-jtag
134 - python setup.py develop
135 - popd
136
137 - IEEE754FPU_PATH="$(pwd)"/ieee754fpu
138 - git clone --depth 1 --recursive -b v0.6.0 https://github.com/billzorn/sfpy.git sfpy
139 - pushd sfpy
140 - git apply "$IEEE754FPU_PATH"/sfpy.patch
141 - pushd berkeley-softfloat-3
142 - git apply "$IEEE754FPU_PATH"/berkeley-softfloat.patch
143 - popd
144 - pushd SoftPosit
145 - git apply ../softposit_sfpy_build.patch
146 - git apply "$IEEE754FPU_PATH"/SoftPosit.patch
147 - popd
148 - pip install -r requirements.txt
149 - make lib -j$(nproc)
150 - make cython -j$(nproc)
151 - make wheel -j$(nproc)
152 - pip install --force-reinstall dist/sfpy*.whl
153 - popd
154
155 - python3 -m pip install 'maturin>=0.11,<0.12'
156 - git clone --depth 1 https://git.libre-soc.org/git/power-instruction-analyzer.git pia
157 - pushd pia
158 - maturin build --cargo-extra-args=--features=python-extension
159 - python3 -m pip install target/wheels/*.whl
160 - popd
161
162 - python setup.py develop
163 - SILENCELOG='!*,default' pytest -v --maxfail=20