]> git.proxmox.com Git - mirror_qemu.git/blob - .gitlab-ci.yml
gitlab-ci: Update 'build-disabled' to cover all configurable options
[mirror_qemu.git] / .gitlab-ci.yml
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)
4 stages:
5 - containers
6 - containers-layer2
7 - build
8 - test
9
10 include:
11 - local: '/.gitlab-ci.d/edk2.yml'
12 - local: '/.gitlab-ci.d/opensbi.yml'
13 - local: '/.gitlab-ci.d/containers.yml'
14 - local: '/.gitlab-ci.d/crossbuilds.yml'
15
16 .native_build_job_template: &native_build_job_definition
17 stage: build
18 image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
19 before_script:
20 - JOBS=$(expr $(nproc) + 1)
21 - sed -i s,git.qemu.org/git,gitlab.com/qemu-project, .gitmodules
22 script:
23 - mkdir build
24 - cd build
25 - if test -n "$TARGETS";
26 then
27 ../configure --enable-werror $CONFIGURE_ARGS --target-list="$TARGETS" ;
28 else
29 ../configure --enable-werror $CONFIGURE_ARGS ;
30 fi || { cat config.log meson-logs/meson-log.txt && exit 1; }
31 - make -j"$JOBS"
32 - if test -n "$MAKE_CHECK_ARGS";
33 then
34 make -j"$JOBS" $MAKE_CHECK_ARGS ;
35 fi
36
37 .native_test_job_template: &native_test_job_definition
38 stage: test
39 image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
40 script:
41 - cd build
42 - find . -type f -exec touch {} +
43 - make $MAKE_CHECK_ARGS
44
45 .acceptance_template: &acceptance_definition
46 cache:
47 key: "${CI_JOB_NAME}-cache"
48 paths:
49 - ${CI_PROJECT_DIR}/avocado-cache
50 policy: pull-push
51 artifacts:
52 paths:
53 - build/tests/results/latest/results.xml
54 reports:
55 junit: build/tests/results/latest/results.xml
56 before_script:
57 - mkdir -p ~/.config/avocado
58 - echo "[datadir.paths]" > ~/.config/avocado/avocado.conf
59 - echo "cache_dirs = ['${CI_PROJECT_DIR}/avocado-cache']"
60 >> ~/.config/avocado/avocado.conf
61 - if [ -d ${CI_PROJECT_DIR}/avocado-cache ]; then
62 du -chs ${CI_PROJECT_DIR}/avocado-cache ;
63 fi
64 - export AVOCADO_ALLOW_UNTRUSTED_CODE=1
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", "CANCEL")]' | xargs cat
68 - du -chs ${CI_PROJECT_DIR}/avocado-cache
69
70 build-system-ubuntu:
71 <<: *native_build_job_definition
72 variables:
73 IMAGE: ubuntu2004
74 TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
75 moxie-softmmu microblazeel-softmmu mips64el-softmmu
76 MAKE_CHECK_ARGS: check-build
77 CONFIGURE_ARGS: --enable-docs
78 artifacts:
79 expire_in: 2 days
80 paths:
81 - build
82
83 check-system-ubuntu:
84 <<: *native_test_job_definition
85 needs:
86 - job: build-system-ubuntu
87 artifacts: true
88 variables:
89 IMAGE: ubuntu2004
90 MAKE_CHECK_ARGS: check
91
92 acceptance-system-ubuntu:
93 <<: *native_test_job_definition
94 needs:
95 - job: build-system-ubuntu
96 artifacts: true
97 variables:
98 IMAGE: ubuntu2004
99 MAKE_CHECK_ARGS: check-acceptance
100 <<: *acceptance_definition
101
102 build-system-debian:
103 <<: *native_build_job_definition
104 variables:
105 IMAGE: debian-amd64
106 TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu
107 riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu
108 MAKE_CHECK_ARGS: check-build
109 CONFIGURE_ARGS: --enable-docs
110 artifacts:
111 expire_in: 2 days
112 paths:
113 - build
114
115 check-system-debian:
116 <<: *native_test_job_definition
117 needs:
118 - job: build-system-debian
119 artifacts: true
120 variables:
121 IMAGE: debian-amd64
122 MAKE_CHECK_ARGS: check
123
124 acceptance-system-debian:
125 <<: *native_test_job_definition
126 needs:
127 - job: build-system-debian
128 artifacts: true
129 variables:
130 IMAGE: debian-amd64
131 MAKE_CHECK_ARGS: check-acceptance
132 <<: *acceptance_definition
133
134 build-system-fedora:
135 <<: *native_build_job_definition
136 variables:
137 IMAGE: fedora
138 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs
139 TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
140 xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
141 MAKE_CHECK_ARGS: check-build
142 artifacts:
143 expire_in: 2 days
144 paths:
145 - build
146
147 check-system-fedora:
148 <<: *native_test_job_definition
149 needs:
150 - job: build-system-fedora
151 artifacts: true
152 variables:
153 IMAGE: fedora
154 MAKE_CHECK_ARGS: check
155
156 acceptance-system-fedora:
157 <<: *native_test_job_definition
158 needs:
159 - job: build-system-fedora
160 artifacts: true
161 variables:
162 IMAGE: fedora
163 MAKE_CHECK_ARGS: check-acceptance
164 <<: *acceptance_definition
165
166 build-system-centos:
167 <<: *native_build_job_definition
168 variables:
169 IMAGE: centos8
170 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt
171 TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
172 x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
173 MAKE_CHECK_ARGS: check-build
174 artifacts:
175 expire_in: 2 days
176 paths:
177 - build
178
179 check-system-centos:
180 <<: *native_test_job_definition
181 needs:
182 - job: build-system-centos
183 artifacts: true
184 variables:
185 IMAGE: centos8
186 MAKE_CHECK_ARGS: check
187
188 acceptance-system-centos:
189 <<: *native_test_job_definition
190 needs:
191 - job: build-system-centos
192 artifacts: true
193 variables:
194 IMAGE: centos8
195 MAKE_CHECK_ARGS: check-acceptance
196 <<: *acceptance_definition
197
198 build-disabled:
199 <<: *native_build_job_definition
200 variables:
201 IMAGE: fedora
202 CONFIGURE_ARGS:
203 --disable-attr
204 --disable-auth-pam
205 --disable-avx2
206 --disable-bochs
207 --disable-brlapi
208 --disable-bzip2
209 --disable-cap-ng
210 --disable-capstone
211 --disable-cloop
212 --disable-coroutine-pool
213 --disable-curl
214 --disable-curses
215 --disable-dmg
216 --disable-docs
217 --disable-gcrypt
218 --disable-glusterfs
219 --disable-gnutls
220 --disable-gtk
221 --disable-guest-agent
222 --disable-iconv
223 --disable-keyring
224 --disable-kvm
225 --disable-libiscsi
226 --disable-libpmem
227 --disable-libssh
228 --disable-libudev
229 --disable-libusb
230 --disable-libxml2
231 --disable-linux-aio
232 --disable-live-block-migration
233 --disable-lzo
234 --disable-malloc-trim
235 --disable-mpath
236 --disable-nettle
237 --disable-numa
238 --disable-opengl
239 --disable-parallels
240 --disable-pie
241 --disable-qcow1
242 --disable-qed
243 --disable-qom-cast-debug
244 --disable-rbd
245 --disable-rdma
246 --disable-replication
247 --disable-sdl
248 --disable-seccomp
249 --disable-sheepdog
250 --disable-slirp
251 --disable-smartcard
252 --disable-snappy
253 --disable-sparse
254 --disable-spice
255 --disable-strip
256 --disable-tpm
257 --disable-usb-redir
258 --disable-vdi
259 --disable-vhost-crypto
260 --disable-vhost-net
261 --disable-vhost-scsi
262 --disable-vhost-user
263 --disable-vhost-vdpa
264 --disable-vhost-vsock
265 --disable-virglrenderer
266 --disable-vnc
267 --disable-vte
268 --disable-vvfat
269 --disable-xen
270 --disable-zstd
271 TARGETS: arm-softmmu i386-softmmu ppc64-softmmu mips64-softmmu
272 s390x-softmmu i386-linux-user
273 MAKE_CHECK_ARGS: check-qtest SPEED=slow
274
275 # This jobs explicitly disable TCG (--disable-tcg), KVM is detected by
276 # the configure script. The container doesn't contain Xen headers so
277 # Xen accelerator is not detected / selected. As result it build the
278 # i386-softmmu and x86_64-softmmu with KVM being the single accelerator
279 # available.
280 build-tcg-disabled:
281 <<: *native_build_job_definition
282 variables:
283 IMAGE: centos8
284 script:
285 - mkdir build
286 - cd build
287 - ../configure --disable-tcg --audio-drv-list="" || { cat config.log meson-logs/meson-log.txt && exit 1; }
288 - make -j"$JOBS"
289 - make check-unit
290 - make check-qapi-schema
291 - cd tests/qemu-iotests/
292 - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
293 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
294 170 171 183 184 192 194 197 208 215 221 222 226 227 236 253 277
295 - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122
296 124 132 139 142 144 145 151 152 155 157 165 194 196 197 200 202
297 208 209 215 216 218 222 227 234 246 247 248 250 254 255 257 258
298 260 261 262 263 264 270 272 273 277 279
299
300 build-user:
301 <<: *native_build_job_definition
302 variables:
303 IMAGE: debian-all-test-cross
304 CONFIGURE_ARGS: --disable-tools --disable-system
305 MAKE_CHECK_ARGS: check-tcg
306
307 # Only build the softmmu targets we have check-tcg tests for
308 build-some-softmmu:
309 <<: *native_build_job_definition
310 variables:
311 IMAGE: debian-all-test-cross
312 CONFIGURE_ARGS: --disable-tools --enable-debug-tcg
313 TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
314 MAKE_CHECK_ARGS: check-tcg
315
316 # Run check-tcg against linux-user (with plugins)
317 # we skip sparc64-linux-user until it has been fixed somewhat
318 # we skip cris-linux-user as it doesn't use the common run loop
319 build-user-plugins:
320 <<: *native_build_job_definition
321 variables:
322 IMAGE: debian-all-test-cross
323 CONFIGURE_ARGS: --disable-tools --disable-system --enable-plugins --enable-debug-tcg --target-list-exclude=sparc64-linux-user,cris-linux-user
324 MAKE_CHECK_ARGS: check-tcg
325 timeout: 1h 30m
326
327 build-some-softmmu-plugins:
328 <<: *native_build_job_definition
329 variables:
330 IMAGE: debian-all-test-cross
331 CONFIGURE_ARGS: --disable-tools --disable-user --enable-plugins --enable-debug-tcg
332 TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
333 MAKE_CHECK_ARGS: check-tcg
334
335 build-clang:
336 <<: *native_build_job_definition
337 variables:
338 IMAGE: fedora
339 CONFIGURE_ARGS: --cc=clang --cxx=clang++
340 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
341 ppc-softmmu s390x-softmmu arm-linux-user
342 MAKE_CHECK_ARGS: check
343
344 # These targets are on the way out
345 build-deprecated:
346 <<: *native_build_job_definition
347 variables:
348 IMAGE: debian-all-test-cross
349 CONFIGURE_ARGS: --disable-docs --disable-tools
350 MAKE_CHECK_ARGS: build-tcg
351 TARGETS: ppc64abi32-linux-user tilegx-linux-user lm32-softmmu
352 unicore32-softmmu
353 artifacts:
354 expire_in: 2 days
355 paths:
356 - build
357
358 # We split the check-tcg step as test failures are expected but we still
359 # want to catch the build breaking.
360 check-deprecated:
361 <<: *native_test_job_definition
362 needs:
363 - job: build-deprecated
364 artifacts: true
365 variables:
366 IMAGE: debian-all-test-cross
367 MAKE_CHECK_ARGS: check-tcg
368 allow_failure: true
369
370 build-oss-fuzz:
371 <<: *native_build_job_definition
372 variables:
373 IMAGE: fedora
374 script:
375 - mkdir build-oss-fuzz
376 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
377 ./scripts/oss-fuzz/build.sh
378 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
379 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
380 | grep -v slirp); do
381 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
382 echo Testing ${fuzzer} ... ;
383 "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
384 done
385 # Unrelated to fuzzer: run some tests with -fsanitize=address
386 - cd build-oss-fuzz && make check-qtest-i386 check-unit
387
388 build-tci:
389 <<: *native_build_job_definition
390 variables:
391 IMAGE: fedora
392 script:
393 - TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64"
394 - mkdir build
395 - cd build
396 - ../configure --enable-tcg-interpreter
397 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" || { cat config.log meson-logs/meson-log.txt && exit 1; }
398 - make -j"$JOBS"
399 - make run-tcg-tests-x86_64-softmmu
400 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
401 - for tg in $TARGETS ; do
402 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
403 ./tests/qtest/boot-serial-test || exit 1 ;
404 ./tests/qtest/cdrom-test || exit 1 ;
405 done
406 - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
407 - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
408
409 # Most jobs test latest gcrypt or nettle builds
410 #
411 # These jobs test old gcrypt and nettle from RHEL7
412 # which had some API differences.
413 build-crypto-old-nettle:
414 <<: *native_build_job_definition
415 variables:
416 IMAGE: centos7
417 TARGETS: x86_64-softmmu x86_64-linux-user
418 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle
419 MAKE_CHECK_ARGS: check-build
420 artifacts:
421 paths:
422 - build
423
424 check-crypto-old-nettle:
425 <<: *native_test_job_definition
426 needs:
427 - job: build-crypto-old-nettle
428 artifacts: true
429 variables:
430 IMAGE: centos7
431 MAKE_CHECK_ARGS: check
432
433
434 build-crypto-old-gcrypt:
435 <<: *native_build_job_definition
436 variables:
437 IMAGE: centos7
438 TARGETS: x86_64-softmmu x86_64-linux-user
439 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt
440 MAKE_CHECK_ARGS: check-build
441 artifacts:
442 paths:
443 - build
444
445 check-crypto-old-gcrypt:
446 <<: *native_test_job_definition
447 needs:
448 - job: build-crypto-old-gcrypt
449 artifacts: true
450 variables:
451 IMAGE: centos7
452 MAKE_CHECK_ARGS: check
453
454
455 build-crypto-only-gnutls:
456 <<: *native_build_job_definition
457 variables:
458 IMAGE: centos7
459 TARGETS: x86_64-softmmu x86_64-linux-user
460 CONFIGURE_ARGS: --disable-nettle --disable-gcrypt --enable-gnutls
461 MAKE_CHECK_ARGS: check-build
462 artifacts:
463 paths:
464 - build
465
466 check-crypto-only-gnutls:
467 <<: *native_test_job_definition
468 needs:
469 - job: build-crypto-only-gnutls
470 artifacts: true
471 variables:
472 IMAGE: centos7
473 MAKE_CHECK_ARGS: check
474
475 # We don't need to exercise every backend with every front-end
476 build-trace-multi-user:
477 <<: *native_build_job_definition
478 variables:
479 IMAGE: ubuntu2004
480 CONFIGURE_ARGS: --enable-trace-backends=log,simple,syslog --disable-system
481
482 build-trace-ftrace-system:
483 <<: *native_build_job_definition
484 variables:
485 IMAGE: ubuntu2004
486 CONFIGURE_ARGS: --enable-trace-backends=ftrace --target-list=x86_64-softmmu
487
488 build-trace-ust-system:
489 <<: *native_build_job_definition
490 variables:
491 IMAGE: ubuntu2004
492 CONFIGURE_ARGS: --enable-trace-backends=ust --target-list=x86_64-softmmu
493
494 check-patch:
495 stage: build
496 image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
497 script: .gitlab-ci.d/check-patch.py
498 except:
499 variables:
500 - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master'
501 variables:
502 GIT_DEPTH: 1000
503 allow_failure: true
504
505 check-dco:
506 stage: build
507 image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
508 script: .gitlab-ci.d/check-dco.py
509 except:
510 variables:
511 - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master'
512 variables:
513 GIT_DEPTH: 1000
514
515 pages:
516 image: $CI_REGISTRY_IMAGE/qemu/ubuntu2004:latest
517 stage: test
518 needs:
519 - job: build-system-ubuntu
520 artifacts: true
521 script:
522 - mkdir public
523 - mv build/docs/index.html public/
524 - for i in devel interop specs system tools user ; do mv build/docs/$i public/ ; done
525 artifacts:
526 paths:
527 - public