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