]> git.proxmox.com Git - mirror_qemu.git/blame - .gitlab-ci.yml
crypto: fix build with gcrypt enabled
[mirror_qemu.git] / .gitlab-ci.yml
CommitLineData
c5008c76
AB
1# Currently we have two build stages after our containers are built:
2# - build (for traditional build and test or first stage build)
3# - test (for test stages, using build artefacts from a build stage)
d0caa0a8
DB
4stages:
5 - containers
fa821f23
DB
6 - containers-layer2
7 - containers-layer3
d0caa0a8 8 - build
c5008c76 9 - test
d0caa0a8 10
6957fd98
AB
11# We assume GitLab has it's own caching set up for RPM/APT repositories so we
12# just take care of avocado assets here.
13cache:
14 paths:
15 - $HOME/avocado/data/cache
16
71920809 17include:
922febe2
TH
18 - local: '/.gitlab-ci.d/edk2.yml'
19 - local: '/.gitlab-ci.d/opensbi.yml'
fa821f23 20 - local: '/.gitlab-ci.d/containers.yml'
6bcb5fc0 21 - local: '/.gitlab-ci.d/crossbuilds.yml'
71920809 22
c962864f
DB
23.native_build_job_template: &native_build_job_definition
24 stage: build
25 image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
26 before_script:
27 - JOBS=$(expr $(nproc) + 1)
28 script:
29 - mkdir build
30 - cd build
31 - if test -n "$TARGETS";
32 then
33 ../configure --enable-werror $CONFIGURE_ARGS --target-list="$TARGETS" ;
34 else
35 ../configure --enable-werror $CONFIGURE_ARGS ;
36 fi
37 - make -j"$JOBS"
c5008c76
AB
38 - if test -n "$MAKE_CHECK_ARGS";
39 then
a6eeac3b 40 make -j"$JOBS" $MAKE_CHECK_ARGS ;
c5008c76
AB
41 fi
42
43.native_test_job_template: &native_test_job_definition
44 stage: test
45 image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
46 script:
47 - cd build
48 - find . -type f -exec touch {} +
49 - make $MAKE_CHECK_ARGS
50
5896c539
TH
51.acceptance_template: &acceptance_definition
52 cache:
53 key: "${CI_JOB_NAME}-cache"
54 paths:
55 - ${CI_PROJECT_DIR}/avocado-cache
56 policy: pull-push
57 before_script:
58 - mkdir -p ~/.config/avocado
59 - echo "[datadir.paths]" > ~/.config/avocado/avocado.conf
60 - echo "cache_dirs = ['${CI_PROJECT_DIR}/avocado-cache']"
61 >> ~/.config/avocado/avocado.conf
62 - if [ -d ${CI_PROJECT_DIR}/avocado-cache ]; then
63 du -chs ${CI_PROJECT_DIR}/avocado-cache ;
64 fi
c5008c76
AB
65 after_script:
66 - cd build
67 - python3 -c 'import json; r = json.load(open("tests/results/latest/results.json")); [print(t["logfile"]) for t in r["tests"] if t["status"] not in ("PASS", "SKIP")]' | xargs cat
5896c539 68 - du -chs ${CI_PROJECT_DIR}/avocado-cache
0a8b05c7 69
699616db 70build-system-ubuntu:
c962864f
DB
71 <<: *native_build_job_definition
72 variables:
73 IMAGE: ubuntu2004
699616db
TH
74 TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
75 moxie-softmmu microblazeel-softmmu mips64el-softmmu
a6eeac3b 76 MAKE_CHECK_ARGS: check-build
c5008c76 77 artifacts:
0a796d63 78 expire_in: 2 days
c5008c76
AB
79 paths:
80 - build
81
699616db 82check-system-ubuntu:
c5008c76
AB
83 <<: *native_test_job_definition
84 needs:
699616db 85 - job: build-system-ubuntu
c5008c76
AB
86 artifacts: true
87 variables:
88 IMAGE: ubuntu2004
c962864f 89 MAKE_CHECK_ARGS: check
0a8b05c7 90
699616db 91acceptance-system-ubuntu:
c5008c76
AB
92 <<: *native_test_job_definition
93 needs:
699616db 94 - job: build-system-ubuntu
c5008c76
AB
95 artifacts: true
96 variables:
97 IMAGE: ubuntu2004
98 MAKE_CHECK_ARGS: check-acceptance
5896c539 99 <<: *acceptance_definition
c5008c76 100
699616db
TH
101build-system-debian:
102 <<: *native_build_job_definition
103 variables:
104 IMAGE: debian-amd64
105 TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu
106 riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu
107 MAKE_CHECK_ARGS: check-build
108 artifacts:
0a796d63 109 expire_in: 2 days
699616db
TH
110 paths:
111 - build
112
113check-system-debian:
114 <<: *native_test_job_definition
115 needs:
116 - job: build-system-debian
117 artifacts: true
118 variables:
119 IMAGE: debian-amd64
120 MAKE_CHECK_ARGS: check
121
122acceptance-system-debian:
123 <<: *native_test_job_definition
124 needs:
125 - job: build-system-debian
126 artifacts: true
127 variables:
128 IMAGE: debian-amd64
129 MAKE_CHECK_ARGS: check-acceptance
5896c539 130 <<: *acceptance_definition
699616db
TH
131
132build-system-fedora:
c962864f
DB
133 <<: *native_build_job_definition
134 variables:
135 IMAGE: fedora
136 TARGETS: tricore-softmmu unicore32-softmmu microblaze-softmmu mips-softmmu
699616db 137 xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
a6eeac3b 138 MAKE_CHECK_ARGS: check-build
c5008c76 139 artifacts:
0a796d63 140 expire_in: 2 days
c5008c76
AB
141 paths:
142 - build
143
699616db 144check-system-fedora:
c5008c76
AB
145 <<: *native_test_job_definition
146 needs:
699616db 147 - job: build-system-fedora
c5008c76
AB
148 artifacts: true
149 variables:
150 IMAGE: fedora
c962864f 151 MAKE_CHECK_ARGS: check
0a8b05c7 152
699616db 153acceptance-system-fedora:
c5008c76
AB
154 <<: *native_test_job_definition
155 needs:
699616db 156 - job: build-system-fedora
c5008c76
AB
157 artifacts: true
158 variables:
159 IMAGE: fedora
160 MAKE_CHECK_ARGS: check-acceptance
5896c539 161 <<: *acceptance_definition
c5008c76 162
699616db
TH
163build-system-centos:
164 <<: *native_build_job_definition
165 variables:
166 IMAGE: centos8
167 TARGETS: ppc64-softmmu lm32-softmmu or1k-softmmu s390x-softmmu
168 x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
169 MAKE_CHECK_ARGS: check-build
170 artifacts:
0a796d63 171 expire_in: 2 days
699616db
TH
172 paths:
173 - build
174
175check-system-centos:
176 <<: *native_test_job_definition
177 needs:
178 - job: build-system-centos
179 artifacts: true
180 variables:
181 IMAGE: centos8
182 MAKE_CHECK_ARGS: check
183
184acceptance-system-centos:
185 <<: *native_test_job_definition
186 needs:
187 - job: build-system-centos
188 artifacts: true
189 variables:
190 IMAGE: centos8
191 MAKE_CHECK_ARGS: check-acceptance
5896c539 192 <<: *acceptance_definition
699616db 193
0a8b05c7 194build-disabled:
c962864f
DB
195 <<: *native_build_job_definition
196 variables:
197 IMAGE: fedora
a7524adb
TH
198 CONFIGURE_ARGS: --disable-attr --disable-avx2 --disable-bochs
199 --disable-brlapi --disable-bzip2 --disable-cap-ng --disable-capstone
200 --disable-cloop --disable-coroutine-pool --disable-curl --disable-curses
201 --disable-dmg --disable-docs --disable-glusterfs --disable-gnutls
202 --disable-gtk --disable-guest-agent --disable-iconv --disable-kvm
203 --disable-libiscsi --disable-libpmem --disable-libssh --disable-libusb
204 --disable-libxml2 --disable-linux-aio --disable-live-block-migration
205 --disable-lzo --disable-malloc-trim --disable-mpath --disable-nettle
206 --disable-numa --disable-parallels --disable-pie --disable-qcow1
207 --disable-qed --disable-qom-cast-debug --disable-rbd --disable-rdma
208 --disable-replication --disable-sdl --disable-seccomp --disable-sheepdog
209 --disable-slirp --disable-smartcard --disable-snappy --disable-spice
210 --disable-strip --disable-tpm --disable-usb-redir --disable-vdi
211 --disable-vhost-crypto --disable-vhost-net --disable-vhost-scsi
212 --disable-vhost-user --disable-vhost-vdpa --disable-vhost-vsock
213 --disable-virglrenderer --disable-vnc --disable-vte --disable-vvfat
214 --disable-xen --disable-zstd
215 TARGETS: arm-softmmu i386-softmmu ppc64-softmmu mips64-softmmu
216 s390x-softmmu i386-linux-user
c962864f 217 MAKE_CHECK_ARGS: check-qtest SPEED=slow
0a8b05c7
TH
218
219build-tcg-disabled:
c962864f
DB
220 <<: *native_build_job_definition
221 variables:
222 IMAGE: centos8
223 script:
224 - mkdir build
225 - cd build
226 - ../configure --disable-tcg --audio-drv-list=""
227 - make -j"$JOBS"
228 - make check-unit
229 - make check-qapi-schema
230 - cd tests/qemu-iotests/
231 - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
c7cf4ddb
TH
232 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
233 170 171 183 184 192 194 197 208 215 221 222 226 227 236 253 277
c962864f 234 - ./check -qcow2 028 051 056 057 058 065 067 068 082 085 091 095 096 102 122
c7cf4ddb
TH
235 124 132 139 142 144 145 151 152 155 157 165 194 196 197 200 202
236 208 209 215 216 218 222 227 234 246 247 248 250 254 255 257 258
237 260 261 262 263 264 270 272 273 277 279
0a8b05c7
TH
238
239build-user:
c962864f
DB
240 <<: *native_build_job_definition
241 variables:
62c902e0
AB
242 IMAGE: debian-all-test-cross
243 CONFIGURE_ARGS: --disable-tools --disable-system
244 MAKE_CHECK_ARGS: check-tcg
0a8b05c7
TH
245
246build-clang:
c962864f
DB
247 <<: *native_build_job_definition
248 variables:
249 IMAGE: fedora
250 CONFIGURE_ARGS: --cc=clang --cxx=clang++
251 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
b610eba3 252 ppc-softmmu s390x-softmmu arm-linux-user
c962864f 253 MAKE_CHECK_ARGS: check
5f55d64b 254
48eac101 255build-oss-fuzz:
b610eba3
TH
256 <<: *native_build_job_definition
257 variables:
258 IMAGE: fedora
259 script:
48eac101
AB
260 - mkdir build-oss-fuzz
261 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
262 ./scripts/oss-fuzz/build.sh
5ab04d5e 263 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
48eac101
AB
264 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
265 | grep -v slirp); do
266 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
267 echo Testing ${fuzzer} ... ;
5ab04d5e 268 "${fuzzer}" -runs=1000 -seed=1 || exit 1 ;
b610eba3 269 done
5ab04d5e
TH
270 # Unrelated to fuzzer: run some tests with -fsanitize=address
271 - cd build-oss-fuzz && make check-qtest-i386 check-unit
b610eba3 272
5f55d64b 273build-tci:
c962864f
DB
274 <<: *native_build_job_definition
275 variables:
276 IMAGE: fedora
277 script:
278 - TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64"
279 - mkdir build
280 - cd build
281 - ../configure --enable-tcg-interpreter
282 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)"
283 - make -j"$JOBS"
284 - make run-tcg-tests-x86_64-softmmu
285 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
286 - for tg in $TARGETS ; do
64ed6f92 287 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
c962864f
DB
288 ./tests/qtest/boot-serial-test || exit 1 ;
289 ./tests/qtest/cdrom-test || exit 1 ;
290 done
64ed6f92
PB
291 - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
292 - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow