split off CR0/XER production in DIV Function Unit into separate stage
[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 git python3-dev python3-pip
24 python3-setuptools python3-wheel pkg-config tcl-dev
25 libreadline-dev bison flex libffi-dev ccache python3-venv
26 binutils-powerpc64-linux-gnu binutils-powerpc64le-linux-gnu
27 autoconf gperf libgmp-dev libmpfr-dev libssl-dev curl
28 - export PATH="/usr/lib/ccache:$PATH"
29 - export CCACHE_BASEDIR="$PWD"
30 - export CCACHE_DIR="$PWD/ccache"
31 - export CCACHE_COMPILERCHECK=content
32 - ccache --zero-stats || true
33 - ccache --show-stats || true
34 - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
35 - source $HOME/.cargo/env
36 after_script:
37 - export CCACHE_DIR="$PWD/ccache"
38 - ccache --show-stats
39 script:
40 - python3 -m venv .env
41 - . .env/bin/activate
42 - pip install nose
43
44 - git clone --depth 1 https://github.com/SRI-CSL/yices2.git yices2
45 - pushd yices2
46 - autoconf
47 - ./configure
48 - make -j$(nproc) > /dev/null
49 - make install
50 - popd
51
52 - git clone --depth 1 https://github.com/YosysHQ/yosys.git yosys
53 - pushd yosys
54 - make config-gcc
55 - make -j$(nproc) > /dev/null
56 - make install
57 - popd
58 - yosys -V
59
60 - git clone --depth 1 https://github.com/YosysHQ/SymbiYosys.git SymbiYosys
61 - pushd SymbiYosys
62 - make install > /dev/null
63 - popd
64
65 - git clone --depth 1 https://github.com/nmigen/nmigen.git nmigen
66 - pushd nmigen
67 - python setup.py develop
68 - popd
69
70 - git clone --depth 1 https://git.libre-soc.org/git/nmutil.git nmutil
71 - pushd nmutil
72 - python setup.py develop
73 - popd
74
75 - git clone --depth 1 https://git.libre-soc.org/git/nmigen-soc.git nmigen-soc
76 - pushd nmigen-soc
77 - git tag | xargs git tag -d
78 - python setup.py develop
79 - popd
80
81 - git clone --depth 1 https://git.libre-soc.org/git/ieee754fpu.git ieee754fpu
82 - pushd ieee754fpu
83 - python setup.py develop
84 - popd
85
86 - git clone --depth 1 https://git.libre-soc.org/git/openpower-isa.git openpower-isa
87 - pushd openpower-isa
88 - python3 setup.py develop
89 - make -j$(nproc) svanalysis > /dev/null
90 - make -j$(nproc) pyfnwriter > /dev/null 2>&1
91 - make -j$(nproc) pywriter > /dev/null 2>&1
92 - popd
93
94 - git clone --depth 1 https://git.libre-soc.org/git/c4m-jtag.git c4m-jtag
95 - pushd c4m-jtag
96 - python setup.py develop
97 - popd
98
99 - IEEE754FPU_PATH="$(pwd)"/ieee754fpu
100 - git clone --depth 1 --recursive https://github.com/billzorn/sfpy.git sfpy
101 - pushd sfpy
102 - pushd berkeley-softfloat-3
103 - git apply "$IEEE754FPU_PATH"/berkeley-softfloat.patch
104 - popd
105 - pushd SoftPosit
106 - git apply ../softposit_sfpy_build.patch
107 - git apply "$IEEE754FPU_PATH"/SoftPosit.patch
108 - popd
109 - pip install --upgrade -r requirements.txt
110 - make lib -j$(nproc)
111 - make cython -j$(nproc)
112 - make wheel -j$(nproc)
113 - pip install dist/sfpy*.whl
114 - popd
115
116 - python3 -m pip install 'maturin>=0.11,<0.12'
117 - git clone --depth 1 https://git.libre-soc.org/git/power-instruction-analyzer.git pia
118 - pushd pia
119 - maturin build --cargo-extra-args=--features=python-extension
120 - python3 -m pip install target/wheels/*.whl
121 - popd
122
123 - python setup.py develop
124 - nosetests -v --processes=-1 --process-timeout=120 -w src/