make CI 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 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 https://gitlab.com/nmigen/nmigen.git nmigen
88 - pushd nmigen
89 - git rev-parse HEAD
90 - python3 setup.py develop
91 - popd
92
93 - git clone --depth 1 https://git.libre-soc.org/git/mdis.git mdis
94 - pushd mdis
95 - git rev-parse HEAD
96 - python3 setup.py develop
97 - popd
98
99 - git clone --depth 1 https://git.libre-soc.org/git/nmutil.git nmutil
100 - pushd nmutil
101 - git rev-parse HEAD
102 - python3 setup.py develop
103 - popd
104
105 - git clone --depth 1 https://git.libre-soc.org/git/nmigen-soc.git nmigen-soc
106 - pushd nmigen-soc
107 - git tag | xargs git tag -d
108 - python setup.py develop
109 - popd
110
111 - git clone --depth 1 https://git.libre-soc.org/git/ieee754fpu.git ieee754fpu
112 - pushd ieee754fpu
113 - python setup.py develop
114 - popd
115
116 - git clone --depth 1 https://git.libre-soc.org/git/openpower-isa.git openpower-isa
117 - pushd openpower-isa
118 - python3 setup.py develop
119 - if ! out="$(make 2>&1)"; then echo "$out"; exit 1; fi
120 - popd
121
122 - git clone --depth 1 https://git.libre-soc.org/git/c4m-jtag.git c4m-jtag
123 - pushd c4m-jtag
124 - python setup.py develop
125 - popd
126
127 - IEEE754FPU_PATH="$(pwd)"/ieee754fpu
128 - git clone --depth 1 --recursive -b v0.6.0 https://github.com/billzorn/sfpy.git sfpy
129 - pushd sfpy
130 - git apply "$IEEE754FPU_PATH"/sfpy.patch
131 - pushd berkeley-softfloat-3
132 - git apply "$IEEE754FPU_PATH"/berkeley-softfloat.patch
133 - popd
134 - pushd SoftPosit
135 - git apply ../softposit_sfpy_build.patch
136 - git apply "$IEEE754FPU_PATH"/SoftPosit.patch
137 - popd
138 - pip install -r requirements.txt
139 - make lib -j$(nproc)
140 - make cython -j$(nproc)
141 - make wheel -j$(nproc)
142 - pip install --force-reinstall dist/sfpy*.whl
143 - popd
144
145 - python3 -m pip install 'maturin>=0.11,<0.12'
146 - git clone --depth 1 https://git.libre-soc.org/git/power-instruction-analyzer.git pia
147 - pushd pia
148 - maturin build --cargo-extra-args=--features=python-extension
149 - python3 -m pip install target/wheels/*.whl
150 - popd
151
152 - python setup.py develop
153 - SILENCELOG='!*,default' pytest -v --maxfail=10