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