2 - local: '/.gitlab-ci.d/buildtest-template.yml'
6 - .native_build_job_template
7 - .native_build_artifact_template
9 - job: amd64-alpine-container
12 TARGETS: avr-softmmu loongarch64-softmmu mips64-softmmu mipsel-softmmu
13 MAKE_CHECK_ARGS: check-build
14 CONFIGURE_ARGS: --enable-docs --enable-trace-backends=log,simple,syslog
17 extends: .native_test_job_template
19 - job: build-system-alpine
23 MAKE_CHECK_ARGS: check-unit check-qtest
25 avocado-system-alpine:
26 extends: .avocado_test_job_template
28 - job: build-system-alpine
32 MAKE_CHECK_ARGS: check-avocado
33 AVOCADO_TAGS: arch:avr arch:loongarch64 arch:mips64 arch:mipsel
37 - .native_build_job_template
38 - .native_build_artifact_template
40 job: amd64-ubuntu2204-container
43 CONFIGURE_ARGS: --enable-docs
44 TARGETS: alpha-softmmu microblazeel-softmmu mips64el-softmmu
45 MAKE_CHECK_ARGS: check-build
48 extends: .native_test_job_template
50 - job: build-system-ubuntu
54 MAKE_CHECK_ARGS: check
56 avocado-system-ubuntu:
57 extends: .avocado_test_job_template
59 - job: build-system-ubuntu
63 MAKE_CHECK_ARGS: check-avocado
64 AVOCADO_TAGS: arch:alpha arch:microblazeel arch:mips64el
68 - .native_build_job_template
69 - .native_build_artifact_template
71 job: amd64-debian-container
74 CONFIGURE_ARGS: --with-coroutine=sigaltstack
75 TARGETS: arm-softmmu i386-softmmu riscv64-softmmu sh4eb-softmmu
76 sparc-softmmu xtensa-softmmu
77 MAKE_CHECK_ARGS: check-build
80 extends: .native_test_job_template
82 - job: build-system-debian
86 MAKE_CHECK_ARGS: check
88 avocado-system-debian:
89 extends: .avocado_test_job_template
91 - job: build-system-debian
95 MAKE_CHECK_ARGS: check-avocado
96 AVOCADO_TAGS: arch:arm arch:i386 arch:riscv64 arch:sh4 arch:sparc arch:xtensa
99 extends: .native_test_job_template
101 - job: build-system-debian
107 - make NINJA=":" check-venv
108 - pyvenv/bin/python3 scripts/device-crash-test -q --tcg-only ./qemu-system-i386
112 - .native_build_job_template
113 - .native_build_artifact_template
115 job: amd64-fedora-container
118 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs
119 TARGETS: microblaze-softmmu mips-softmmu
120 xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
121 MAKE_CHECK_ARGS: check-build
124 extends: .native_test_job_template
126 - job: build-system-fedora
130 MAKE_CHECK_ARGS: check
132 avocado-system-fedora:
133 extends: .avocado_test_job_template
135 - job: build-system-fedora
139 MAKE_CHECK_ARGS: check-avocado
140 AVOCADO_TAGS: arch:microblaze arch:mips arch:xtensa arch:m68k
141 arch:riscv32 arch:ppc arch:sparc64
144 extends: .native_test_job_template
146 - job: build-system-fedora
152 - make NINJA=":" check-venv
153 - pyvenv/bin/python3 scripts/device-crash-test -q ./qemu-system-ppc
154 - pyvenv/bin/python3 scripts/device-crash-test -q ./qemu-system-riscv32
158 - .native_build_job_template
159 - .native_build_artifact_template
161 job: amd64-centos8-container
164 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-vfio-user-server
165 --enable-modules --enable-trace-backends=dtrace --enable-docs
166 TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
167 x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
168 MAKE_CHECK_ARGS: check-build
170 # Previous QEMU release. Used for cross-version migration tests.
172 extends: .native_build_job_template
179 - build-previous/**/*.p
180 - build-previous/**/*.a.p
181 - build-previous/**/*.fa.p
182 - build-previous/**/*.c.o
183 - build-previous/**/*.c.o.d
184 - build-previous/**/*.fa
186 job: amd64-opensuse-leap-container
189 TARGETS: x86_64-softmmu aarch64-softmmu
191 - export QEMU_PREV_VERSION="$(sed 's/\([0-9.]*\)\.[0-9]*/v\1.0/' VERSION)"
192 - git checkout $QEMU_PREV_VERSION
194 - mv build build-previous
196 .migration-compat-common:
197 extends: .common_test_job_template
199 - job: build-previous-qemu
200 - job: build-system-opensuse
201 # The old QEMU could have bugs unrelated to migration that are
202 # already fixed in the current development branch, so this test
207 MAKE_CHECK_ARGS: check-build
209 # Use the migration-tests from the older QEMU tree. This avoids
210 # testing an old QEMU against new features/tests that it is not
214 - QTEST_QEMU_BINARY_SRC=./qemu-system-${TARGET}
215 QTEST_QEMU_BINARY=../build/qemu-system-${TARGET} ./tests/qtest/migration-test
217 - QTEST_QEMU_BINARY_DST=./qemu-system-${TARGET}
218 QTEST_QEMU_BINARY=../build/qemu-system-${TARGET} ./tests/qtest/migration-test
220 migration-compat-aarch64:
221 extends: .migration-compat-common
225 migration-compat-x86_64:
226 extends: .migration-compat-common
231 extends: .native_test_job_template
233 - job: build-system-centos
237 MAKE_CHECK_ARGS: check
239 avocado-system-centos:
240 extends: .avocado_test_job_template
242 - job: build-system-centos
246 MAKE_CHECK_ARGS: check-avocado
247 AVOCADO_TAGS: arch:ppc64 arch:or1k arch:s390x arch:x86_64 arch:rx
250 build-system-opensuse:
252 - .native_build_job_template
253 - .native_build_artifact_template
255 job: amd64-opensuse-leap-container
258 TARGETS: s390x-softmmu x86_64-softmmu aarch64-softmmu
259 MAKE_CHECK_ARGS: check-build
261 check-system-opensuse:
262 extends: .native_test_job_template
264 - job: build-system-opensuse
268 MAKE_CHECK_ARGS: check
270 avocado-system-opensuse:
271 extends: .avocado_test_job_template
273 - job: build-system-opensuse
277 MAKE_CHECK_ARGS: check-avocado
278 AVOCADO_TAGS: arch:s390x arch:x86_64 arch:aarch64
281 # Flaky tests. We don't run these by default and they are allow fail
282 # but often the CI system is the only way to trigger the failures.
287 - .native_build_job_template
288 - .native_build_artifact_template
290 job: amd64-debian-container
294 TARGETS: aarch64-softmmu arm-softmmu mips64el-softmmu
295 ppc64-softmmu rx-softmmu s390x-softmmu sh4-softmmu x86_64-softmmu
296 MAKE_CHECK_ARGS: check-build
298 avocado-system-flaky:
299 extends: .avocado_test_job_template
301 - job: build-system-flaky
306 MAKE_CHECK_ARGS: check-avocado
308 QEMU_TEST_FLAKY_TESTS: 1
311 # This jobs explicitly disable TCG (--disable-tcg), KVM is detected by
312 # the configure script. The container doesn't contain Xen headers so
313 # Xen accelerator is not detected / selected. As result it build the
314 # i386-softmmu and x86_64-softmmu with KVM being the single accelerator
316 # Also use a different coroutine implementation (which is only really of
317 # interest to KVM users, i.e. with TCG disabled)
319 extends: .native_build_job_template
321 job: amd64-centos8-container
327 - ../configure --disable-tcg --audio-drv-list="" --with-coroutine=ucontext
328 --disable-docs --disable-sdl --disable-gtk --disable-vnc
329 || { cat config.log meson-logs/meson-log.txt && exit 1; }
332 - make check-qapi-schema
333 - cd tests/qemu-iotests/
334 - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
335 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
336 170 171 183 184 192 194 208 221 226 227 236 253 277 image-fleecing
337 - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122
338 124 132 139 142 144 145 151 152 155 157 165 194 196 200 202
339 208 209 216 218 227 234 246 247 248 250 254 255 257 258
340 260 261 262 263 264 270 272 273 277 279 image-fleecing
343 extends: .native_build_job_template
345 job: amd64-debian-user-cross-container
347 IMAGE: debian-all-test-cross
348 CONFIGURE_ARGS: --disable-tools --disable-system
349 --target-list-exclude=alpha-linux-user,sh4-linux-user
350 MAKE_CHECK_ARGS: check-tcg
353 extends: .native_build_job_template
355 job: amd64-debian-user-cross-container
357 IMAGE: debian-all-test-cross
358 CONFIGURE_ARGS: --disable-tools --disable-system --static
359 --target-list-exclude=alpha-linux-user,sh4-linux-user
360 MAKE_CHECK_ARGS: check-tcg
362 # targets stuck on older compilers
364 extends: .native_build_job_template
366 job: amd64-debian-legacy-cross-container
368 IMAGE: debian-legacy-test-cross
369 TARGETS: alpha-linux-user alpha-softmmu sh4-linux-user
370 CONFIGURE_ARGS: --disable-tools
371 MAKE_CHECK_ARGS: check-tcg
374 extends: .native_build_job_template
376 job: hexagon-cross-container
378 IMAGE: debian-hexagon-cross
379 TARGETS: hexagon-linux-user
380 CONFIGURE_ARGS: --disable-tools --disable-docs --enable-debug-tcg
381 MAKE_CHECK_ARGS: check-tcg
383 # Build the softmmu targets we have check-tcg tests and compilers in
384 # our omnibus all-test-cross container. Those targets that haven't got
385 # Debian cross compiler support need to use special containers.
387 extends: .native_build_job_template
389 job: amd64-debian-user-cross-container
391 IMAGE: debian-all-test-cross
392 CONFIGURE_ARGS: --disable-tools --enable-debug
393 TARGETS: arm-softmmu aarch64-softmmu i386-softmmu riscv64-softmmu
394 s390x-softmmu x86_64-softmmu
395 MAKE_CHECK_ARGS: check-tcg
398 extends: .native_build_job_template
400 job: loongarch-debian-cross-container
402 IMAGE: debian-loongarch-cross
403 CONFIGURE_ARGS: --disable-tools --enable-debug
404 TARGETS: loongarch64-linux-user loongarch64-softmmu
405 MAKE_CHECK_ARGS: check-tcg
407 # We build tricore in a very minimal tricore only container
408 build-tricore-softmmu:
409 extends: .native_build_job_template
411 job: tricore-debian-cross-container
413 IMAGE: debian-tricore-cross
414 CONFIGURE_ARGS: --disable-tools --disable-fdt --enable-debug
415 TARGETS: tricore-softmmu
416 MAKE_CHECK_ARGS: check-tcg
419 extends: .native_build_job_template
421 job: amd64-fedora-container
424 CONFIGURE_ARGS: --cc=clang --cxx=clang++
425 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
426 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu s390x-softmmu
427 MAKE_CHECK_ARGS: check-qtest check-tcg
430 extends: .native_build_job_template
432 job: amd64-debian-user-cross-container
435 IMAGE: debian-all-test-cross
436 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --disable-system
437 --target-list-exclude=alpha-linux-user,microblazeel-linux-user,aarch64_be-linux-user,i386-linux-user,m68k-linux-user,mipsn32el-linux-user,xtensaeb-linux-user
438 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
439 MAKE_CHECK_ARGS: check-unit check-tcg
441 # Set LD_JOBS=1 because this requires LTO and ld consumes a large amount of memory.
442 # On gitlab runners, default value sometimes end up calling 2 lds concurrently and
443 # triggers an Out-Of-Memory error
445 # Since slirp callbacks are used in QEMU Timers, we cannot use libslirp with
446 # CFI builds, and thus have to disable it here.
448 # Split in three sets of build/check/avocado to limit the execution time of each
452 - .native_build_job_template
453 - .native_build_artifact_template
455 - job: amd64-fedora-container
460 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
461 --enable-safe-stack --disable-slirp
462 TARGETS: aarch64-softmmu
463 MAKE_CHECK_ARGS: check-build
464 # FIXME: This job is often failing, likely due to out-of-memory problems in
465 # the constrained containers of the shared runners. Thus this is marked as
466 # skipped until the situation has been solved.
471 extends: .native_test_job_template
473 - job: build-cfi-aarch64
477 MAKE_CHECK_ARGS: check
480 extends: .avocado_test_job_template
482 - job: build-cfi-aarch64
486 MAKE_CHECK_ARGS: check-avocado
488 build-cfi-ppc64-s390x:
490 - .native_build_job_template
491 - .native_build_artifact_template
493 - job: amd64-fedora-container
498 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
499 --enable-safe-stack --disable-slirp
500 TARGETS: ppc64-softmmu s390x-softmmu
501 MAKE_CHECK_ARGS: check-build
502 # FIXME: This job is often failing, likely due to out-of-memory problems in
503 # the constrained containers of the shared runners. Thus this is marked as
504 # skipped until the situation has been solved.
508 check-cfi-ppc64-s390x:
509 extends: .native_test_job_template
511 - job: build-cfi-ppc64-s390x
515 MAKE_CHECK_ARGS: check
517 avocado-cfi-ppc64-s390x:
518 extends: .avocado_test_job_template
520 - job: build-cfi-ppc64-s390x
524 MAKE_CHECK_ARGS: check-avocado
528 - .native_build_job_template
529 - .native_build_artifact_template
531 - job: amd64-fedora-container
536 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
537 --enable-safe-stack --disable-slirp
538 TARGETS: x86_64-softmmu
539 MAKE_CHECK_ARGS: check-build
543 extends: .native_test_job_template
545 - job: build-cfi-x86_64
549 MAKE_CHECK_ARGS: check
552 extends: .avocado_test_job_template
554 - job: build-cfi-x86_64
558 MAKE_CHECK_ARGS: check-avocado
561 extends: .native_build_job_template
563 job: amd64-ubuntu2204-container
566 CONFIGURE_ARGS: --enable-tsan --cc=clang --cxx=clang++
567 --enable-trace-backends=ust --disable-slirp
568 TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
570 # gcov is a GCC features
572 extends: .native_build_job_template
574 job: amd64-ubuntu2204-container
578 CONFIGURE_ARGS: --enable-gcov
579 TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
580 MAKE_CHECK_ARGS: check-unit check-softfloat
583 - gcovr --xml-pretty --exclude-unreachable-branches --print-summary
584 -o coverage.xml --root ${CI_PROJECT_DIR} . *.p
585 coverage: /^\s*lines:\s*\d+.\d+\%/
587 name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
591 - build/meson-logs/testlog.txt
593 junit: build/meson-logs/testlog.junit.xml
595 coverage_format: cobertura
596 path: build/coverage.xml
599 extends: .native_build_job_template
601 job: amd64-fedora-container
605 - mkdir build-oss-fuzz
606 - export LSAN_OPTIONS=suppressions=scripts/oss-fuzz/lsan_suppressions.txt
607 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
608 ./scripts/oss-fuzz/build.sh
609 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
610 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
612 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
613 echo Testing ${fuzzer} ... ;
614 "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
618 extends: .native_build_job_template
620 job: amd64-debian-user-cross-container
622 IMAGE: debian-all-test-cross
624 - TARGETS="aarch64 arm hppa m68k microblaze ppc64 s390x x86_64"
627 - ../configure --enable-tcg-interpreter --disable-docs --disable-gtk --disable-vnc
628 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)"
629 || { cat config.log meson-logs/meson-log.txt && exit 1; }
631 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
632 - for tg in $TARGETS ; do
633 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
634 ./tests/qtest/boot-serial-test || exit 1 ;
635 ./tests/qtest/cdrom-test || exit 1 ;
637 - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
638 - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
641 # Check our reduced build configurations
642 build-without-defaults:
643 extends: .native_build_job_template
645 job: amd64-centos8-container
649 --without-default-devices
650 --without-default-features
653 --disable-qom-cast-debug
655 TARGETS: avr-softmmu mips64-softmmu s390x-softmmu sh4-softmmu
656 sparc64-softmmu hexagon-linux-user i386-linux-user s390x-linux-user
657 MAKE_CHECK_ARGS: check
660 extends: .base_job_template
662 image: $CI_REGISTRY_IMAGE/qemu/fedora:$QEMU_CI_CONTAINER_TAG
664 job: amd64-fedora-container
666 - mkdir subprojects/libvhost-user/build
667 - cd subprojects/libvhost-user/build
671 # No targets are built here, just tools, docs, and unit tests. This
672 # also feeds into the eventual documentation deployment steps later
673 build-tools-and-docs-debian:
675 - .native_build_job_template
676 - .native_build_artifact_template
678 job: amd64-debian-container
679 # when running on 'master' we use pre-existing container
683 MAKE_CHECK_ARGS: check-unit ctags TAGS cscope
684 CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
687 # Prepare for GitLab pages deployment. Anything copied into the
688 # "public" directory will be deployed to $USER.gitlab.io/$PROJECT
690 # GitLab publishes from any branch that triggers a CI pipeline
692 # For the main repo we don't want to publish from 'staging'
693 # since that content may not be pushed, nor do we wish to
694 # publish from 'stable-NNN' branches as that content is outdated.
695 # Thus we restrict to just the default branch
697 # For contributor forks we want to publish from any repo so
698 # that users can see the results of their commits, regardless
699 # of what topic branch they're currently using
701 extends: .base_job_template
702 image: $CI_REGISTRY_IMAGE/qemu/debian:$QEMU_CI_CONTAINER_TAG
705 - job: build-tools-and-docs-debian
708 # HTML-ised source tree
710 # We unset variables to work around a bug in some htags versions
711 # which causes it to fail when the environment is large
712 - CI_COMMIT_MESSAGE= CI_COMMIT_TAG_MESSAGE= htags
713 -anT --tree-view=filetree -m qemu_init
714 -t "Welcome to the QEMU sourcecode"
716 # Project documentation
717 - make -C build install DESTDIR=$(pwd)/temp-install
718 - mv temp-install/usr/local/share/doc/qemu/* public/