power_pseudo: unify Python code generation
[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 gawk
28 git
29 gperf
30 libboost-program-options-dev
31 libffi-dev
32 libftdi-dev
33 libgmp-dev
34 libreadline-dev
35 mercurial
36 pkg-config
37 python
38 python3
39 python3-dev
40 python3-pip
41 python3-setuptools
42 python3-setuptools-scm
43 python3-wheel
44 qemu-system-ppc
45 tcl-dev
46 - export PATH="$HOME/.local/bin:/usr/lib/ccache:$PATH"
47 - export CCACHE_BASEDIR="$PWD"
48 - export CCACHE_DIR="$PWD/ccache"
49 - export CCACHE_COMPILERCHECK=content
50 - ccache --zero-stats || true
51 - ccache --show-stats || true
52 # one package per line to simplify sorting, git diff, etc.
53 - >-
54 python3 -m pip install --user
55 pytest-xdist==3.3.1
56 pytest==7.3.1
57 pytest-subtests==0.11.0
58 script:
59 - git clone --depth 1 -b yosys-0.17 https://github.com/YosysHQ/yosys.git yosys
60 - pushd yosys
61 - make config-gcc
62 - make -j$(nproc)
63 - make install
64 - popd
65 - yosys -V
66
67 - git clone https://github.com/YosysHQ/SymbiYosys.git SymbiYosys
68 - pushd SymbiYosys
69 - git checkout d10e472edf4ea9be3aa6347b264ba575fbea933a
70 - make install
71 - popd
72
73 - git clone --depth 1 -b Yices-2.6.4 https://github.com/SRI-CSL/yices2.git yices2
74 - pushd yices2
75 - autoconf
76 - ./configure
77 - make -j$(nproc)
78 - make install
79 - popd
80
81 - git clone --depth 1 -b z3-4.8.17 https://github.com/Z3Prover/z3.git z3
82 - pushd z3
83 - python scripts/mk_make.py
84 - cd build
85 - make -j$(nproc)
86 - make install
87 - popd
88
89 - git clone --depth 1 https://gitlab.com/nmigen/nmigen.git nmigen
90 - pushd nmigen
91 - git rev-parse HEAD
92 - python3 setup.py develop
93 - popd
94
95 - git clone --depth 1 https://git.libre-soc.org/git/mdis.git mdis
96 - pushd mdis
97 - git rev-parse HEAD
98 - python3 setup.py develop
99 - popd
100
101 - git clone --depth 1 https://git.libre-soc.org/git/nmutil.git nmutil
102 - pushd nmutil
103 - git rev-parse HEAD
104 - python3 setup.py develop
105 - popd
106
107 - git clone --depth 1 https://git.libre-soc.org/git/pytest-output-to-files.git pytest-output-to-files
108 - pushd pytest-output-to-files
109 - git rev-parse HEAD
110 - python3 setup.py develop
111 - popd
112
113 # kernel.org recommends cloning from a bundle in CI since that uses a CDN
114 - 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
115 - git clone linux.bundle
116 - pushd linux
117 - git remote set-url origin https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
118 - git remote update origin
119 - git checkout v6.5.8
120 - popd
121
122 - python3 setup.py develop
123
124 - make generate &> generate.log || { cat generate.log; false; }
125
126 - python3 -m openpower.syscalls json linux > src/openpower/syscalls/syscalls.json
127
128 - SILENCELOG='!*,default' pytest -v --maxfail=10