add pip and apt to gitlab cache
[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 before_script:
16 - apt-get -o dir::cache::archives="apt-cache" update
17 - >-
18 apt-get -o dir::cache::archives="apt-cache" -y install
19 build-essential git python3-dev python3-pip
20 python3-setuptools python3-wheel pkg-config tcl-dev
21 libreadline-dev bison flex libffi-dev ccache python3-venv
22 binutils-powerpc64-linux-gnu binutils-powerpc64le-linux-gnu
23 autoconf gperf libgmp-dev
24 - export PATH="/usr/lib/ccache:$PATH"
25 - export CCACHE_BASEDIR="$PWD"
26 - export CCACHE_DIR="$PWD/ccache"
27 - export CCACHE_COMPILERCHECK=content
28 - ccache --zero-stats || true
29 - ccache --show-stats || true
30 after_script:
31 - export CCACHE_DIR="$PWD/ccache"
32 - ccache --show-stats
33 script:
34 - python3 -m venv .env
35 - . .env/bin/activate
36 - pip install nose
37
38 - git clone --depth 1 https://github.com/SRI-CSL/yices2.git yices2
39 - pushd yices2
40 - autoconf
41 - ./configure
42 - make -j$(nproc)
43 - make install
44 - popd
45
46 - git clone --depth 1 https://github.com/YosysHQ/yosys.git yosys
47 - pushd yosys
48 - make config-gcc
49 - make -j$(nproc)
50 - make install
51 - popd
52 - yosys -V
53
54 - git clone --depth 1 https://github.com/YosysHQ/SymbiYosys.git SymbiYosys
55 - pushd SymbiYosys
56 - make install
57 - popd
58
59 - git clone --depth 1 https://github.com/nmigen/nmigen.git nmigen
60 - pushd nmigen
61 - python setup.py develop
62 - popd
63
64 - git clone --depth 1 git://git.libre-riscv.org/nmutil.git nmutil
65 - pushd nmutil
66 - python setup.py develop
67 - popd
68
69 - git clone --depth 1 git://git.libre-riscv.org/ieee754fpu.git ieee754fpu
70 - pushd ieee754fpu
71 - python setup.py develop
72 - popd
73
74 - IEEE754FPU_PATH="$(pwd)"/ieee754fpu
75 - git clone --depth 1 --recursive https://github.com/billzorn/sfpy.git sfpy
76 - pushd sfpy
77 - pushd berkeley-softfloat-3
78 - git apply "$IEEE754FPU_PATH"/berkeley-softfloat.patch
79 - popd
80 - pushd SoftPosit
81 - git apply ../softposit_sfpy_build.patch
82 - git apply "$IEEE754FPU_PATH"/SoftPosit.patch
83 - popd
84 - pip install --upgrade -r requirements.txt
85 - make lib -j$(nproc)
86 - make cython -j$(nproc)
87 - make wheel -j$(nproc)
88 - pip install dist/sfpy*.whl
89 - popd
90
91 - python setup.py develop
92 - python src/soc/decoder/pseudo/pywriter.py
93 - nosetests -v --processes=-1 --process-timeout=120