pysvp64db: fix traversal
[openpower-isa.git] / .gitlab-ci.yml
1 image: debian:10
2
3 cache:
4 when: always
5 paths:
6 - ccache
7 - linux.bundle
8
9 build:
10 stage: build
11 before_script:
12 - apt-get update
13 # one package per line to simplify sorting, git diff, etc.
14 - >-
15 apt-get -y install --no-install-recommends
16 aria2
17 autoconf
18 binutils-powerpc64-linux-gnu
19 binutils-powerpc64le-linux-gnu
20 bison
21 build-essential
22 ccache
23 clang
24 cmake
25 curl
26 flex
27 g++-powerpc64le-linux-gnu
28 gawk
29 git
30 gperf
31 libboost-program-options-dev
32 libffi-dev
33 libftdi-dev
34 libgmp-dev
35 libreadline-dev
36 mercurial
37 pkg-config
38 python
39 python3
40 python3-dev
41 python3-pip
42 python3-setuptools
43 python3-setuptools-scm
44 python3-wheel
45 qemu-system-ppc
46 tcl-dev
47 - export PATH="$HOME/.local/bin:/usr/lib/ccache:$PATH"
48 - export CCACHE_BASEDIR="$PWD"
49 - export CCACHE_DIR="$PWD/ccache"
50 - export CCACHE_COMPILERCHECK=content
51 - ccache --zero-stats || true
52 - ccache --show-stats || true
53 # one package per line to simplify sorting, git diff, etc.
54 - >-
55 python3 -m pip install --user
56 pytest-xdist==3.3.1
57 pytest==7.3.1
58 pytest-subtests==0.11.0
59 script:
60 - git clone --depth 1 -b yosys-0.17 https://github.com/YosysHQ/yosys.git yosys
61 - pushd yosys
62 - make config-gcc
63 - make -j$(nproc)
64 - make install
65 - popd
66 - yosys -V
67
68 - git clone https://github.com/YosysHQ/SymbiYosys.git SymbiYosys
69 - pushd SymbiYosys
70 - git checkout d10e472edf4ea9be3aa6347b264ba575fbea933a
71 - make install
72 - popd
73
74 - git clone --depth 1 -b Yices-2.6.4 https://github.com/SRI-CSL/yices2.git yices2
75 - pushd yices2
76 - autoconf
77 - ./configure
78 - make -j$(nproc)
79 - make install
80 - popd
81
82 - git clone --depth 1 -b z3-4.8.17 https://github.com/Z3Prover/z3.git z3
83 - pushd z3
84 - python scripts/mk_make.py
85 - cd build
86 - make -j$(nproc)
87 - make install
88 - popd
89
90 - git clone --depth 1 https://gitlab.com/nmigen/nmigen.git nmigen
91 - pushd nmigen
92 - git rev-parse HEAD
93 - python3 setup.py develop
94 - popd
95
96 - git clone --depth 1 https://git.libre-soc.org/git/mdis.git mdis
97 - pushd mdis
98 - git rev-parse HEAD
99 - python3 setup.py develop
100 - popd
101
102 - git clone --depth 1 https://git.libre-soc.org/git/nmutil.git nmutil
103 - pushd nmutil
104 - git rev-parse HEAD
105 - python3 setup.py develop
106 - popd
107
108 - git clone --depth 1 https://git.libre-soc.org/git/pytest-output-to-files.git pytest-output-to-files
109 - pushd pytest-output-to-files
110 - git rev-parse HEAD
111 - python3 setup.py develop
112 - popd
113
114 # kernel.org recommends cloning from a bundle in CI since that uses a CDN
115 - if [[ ! -f linux.bundle ]]; then aria2c -x 16 -s 16 -o linux.bundle https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/clone.bundle || { rm -f linux.bundle; exit 1; }; fi
116 - git clone linux.bundle
117 - pushd linux
118 - git remote set-url origin https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
119 - git remote update origin
120 - git checkout v6.5.8
121 - popd
122
123 - python3 setup.py develop
124
125 - make generate &> generate.log || { cat generate.log; false; }
126
127 - python3 -m openpower.syscalls json linux > src/openpower/syscalls/syscalls.json
128
129 # maxschedchunk substantially speeds up testing -- by ~2x on CI
130 # it is supported by the version of pytest-xdist used by both this file
131 # and the dev-env-setup scripts (which should be the same versions).
132 #
133 # maxfail=10 because otherwise the output log is too long and gitlab
134 # truncates it, removing the testing summary.
135 - SILENCELOG=1 SIM_NO_VCD=1 pytest -v --maxfail=10 --maxschedchunk=1