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 # This job is disabled until we release 9.0. The existing
221 # migration-test in 8.2 is broken on aarch64. The fix was already
222 # commited, but it will only take effect once 9.0 is out.
223 migration-compat-aarch64:
224 extends: .migration-compat-common
229 migration-compat-x86_64:
230 extends: .migration-compat-common
235 extends: .native_test_job_template
237 - job: build-system-centos
241 MAKE_CHECK_ARGS: check
243 avocado-system-centos:
244 extends: .avocado_test_job_template
246 - job: build-system-centos
250 MAKE_CHECK_ARGS: check-avocado
251 AVOCADO_TAGS: arch:ppc64 arch:or1k arch:s390x arch:x86_64 arch:rx
254 build-system-opensuse:
256 - .native_build_job_template
257 - .native_build_artifact_template
259 job: amd64-opensuse-leap-container
262 TARGETS: s390x-softmmu x86_64-softmmu aarch64-softmmu
263 MAKE_CHECK_ARGS: check-build
265 check-system-opensuse:
266 extends: .native_test_job_template
268 - job: build-system-opensuse
272 MAKE_CHECK_ARGS: check
274 avocado-system-opensuse:
275 extends: .avocado_test_job_template
277 - job: build-system-opensuse
281 MAKE_CHECK_ARGS: check-avocado
282 AVOCADO_TAGS: arch:s390x arch:x86_64 arch:aarch64
285 # Flaky tests. We don't run these by default and they are allow fail
286 # but often the CI system is the only way to trigger the failures.
291 - .native_build_job_template
292 - .native_build_artifact_template
294 job: amd64-debian-container
298 TARGETS: aarch64-softmmu arm-softmmu mips64el-softmmu
299 ppc64-softmmu rx-softmmu s390x-softmmu sh4-softmmu x86_64-softmmu
300 MAKE_CHECK_ARGS: check-build
302 avocado-system-flaky:
303 extends: .avocado_test_job_template
305 - job: build-system-flaky
310 MAKE_CHECK_ARGS: check-avocado
312 QEMU_TEST_FLAKY_TESTS: 1
315 # This jobs explicitly disable TCG (--disable-tcg), KVM is detected by
316 # the configure script. The container doesn't contain Xen headers so
317 # Xen accelerator is not detected / selected. As result it build the
318 # i386-softmmu and x86_64-softmmu with KVM being the single accelerator
320 # Also use a different coroutine implementation (which is only really of
321 # interest to KVM users, i.e. with TCG disabled)
323 extends: .native_build_job_template
325 job: amd64-centos8-container
331 - ../configure --disable-tcg --audio-drv-list="" --with-coroutine=ucontext
332 --disable-docs --disable-sdl --disable-gtk --disable-vnc
333 || { cat config.log meson-logs/meson-log.txt && exit 1; }
336 - make check-qapi-schema
337 - cd tests/qemu-iotests/
338 - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
339 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
340 170 171 183 184 192 194 208 221 226 227 236 253 277 image-fleecing
341 - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122
342 124 132 139 142 144 145 151 152 155 157 165 194 196 200 202
343 208 209 216 218 227 234 246 247 248 250 254 255 257 258
344 260 261 262 263 264 270 272 273 277 279 image-fleecing
347 extends: .native_build_job_template
349 job: amd64-debian-user-cross-container
351 IMAGE: debian-all-test-cross
352 CONFIGURE_ARGS: --disable-tools --disable-system
353 --target-list-exclude=alpha-linux-user,sh4-linux-user
354 MAKE_CHECK_ARGS: check-tcg
357 extends: .native_build_job_template
359 job: amd64-debian-user-cross-container
361 IMAGE: debian-all-test-cross
362 CONFIGURE_ARGS: --disable-tools --disable-system --static
363 --target-list-exclude=alpha-linux-user,sh4-linux-user
364 MAKE_CHECK_ARGS: check-tcg
366 # targets stuck on older compilers
368 extends: .native_build_job_template
370 job: amd64-debian-legacy-cross-container
372 IMAGE: debian-legacy-test-cross
373 TARGETS: alpha-linux-user alpha-softmmu sh4-linux-user
374 CONFIGURE_ARGS: --disable-tools
375 MAKE_CHECK_ARGS: check-tcg
378 extends: .native_build_job_template
380 job: hexagon-cross-container
382 IMAGE: debian-hexagon-cross
383 TARGETS: hexagon-linux-user
384 CONFIGURE_ARGS: --disable-tools --disable-docs --enable-debug-tcg
385 MAKE_CHECK_ARGS: check-tcg
387 # Build the softmmu targets we have check-tcg tests and compilers in
388 # our omnibus all-test-cross container. Those targets that haven't got
389 # Debian cross compiler support need to use special containers.
391 extends: .native_build_job_template
393 job: amd64-debian-user-cross-container
395 IMAGE: debian-all-test-cross
396 CONFIGURE_ARGS: --disable-tools --enable-debug
397 TARGETS: arm-softmmu aarch64-softmmu i386-softmmu riscv64-softmmu
398 s390x-softmmu x86_64-softmmu
399 MAKE_CHECK_ARGS: check-tcg
402 extends: .native_build_job_template
404 job: loongarch-debian-cross-container
406 IMAGE: debian-loongarch-cross
407 CONFIGURE_ARGS: --disable-tools --enable-debug
408 TARGETS: loongarch64-linux-user loongarch64-softmmu
409 MAKE_CHECK_ARGS: check-tcg
411 # We build tricore in a very minimal tricore only container
412 build-tricore-softmmu:
413 extends: .native_build_job_template
415 job: tricore-debian-cross-container
417 IMAGE: debian-tricore-cross
418 CONFIGURE_ARGS: --disable-tools --disable-fdt --enable-debug
419 TARGETS: tricore-softmmu
420 MAKE_CHECK_ARGS: check-tcg
423 extends: .native_build_job_template
425 job: amd64-fedora-container
428 CONFIGURE_ARGS: --cc=clang --cxx=clang++
429 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
430 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu s390x-softmmu
431 MAKE_CHECK_ARGS: check-qtest check-tcg
434 extends: .native_build_job_template
436 job: amd64-debian-user-cross-container
439 IMAGE: debian-all-test-cross
440 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --disable-system
441 --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
442 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
443 MAKE_CHECK_ARGS: check-unit check-tcg
445 # Set LD_JOBS=1 because this requires LTO and ld consumes a large amount of memory.
446 # On gitlab runners, default value sometimes end up calling 2 lds concurrently and
447 # triggers an Out-Of-Memory error
449 # Since slirp callbacks are used in QEMU Timers, we cannot use libslirp with
450 # CFI builds, and thus have to disable it here.
452 # Split in three sets of build/check/avocado to limit the execution time of each
456 - .native_build_job_template
457 - .native_build_artifact_template
459 - job: amd64-fedora-container
464 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
465 --enable-safe-stack --disable-slirp
466 TARGETS: aarch64-softmmu
467 MAKE_CHECK_ARGS: check-build
468 # FIXME: This job is often failing, likely due to out-of-memory problems in
469 # the constrained containers of the shared runners. Thus this is marked as
470 # skipped until the situation has been solved.
475 extends: .native_test_job_template
477 - job: build-cfi-aarch64
481 MAKE_CHECK_ARGS: check
484 extends: .avocado_test_job_template
486 - job: build-cfi-aarch64
490 MAKE_CHECK_ARGS: check-avocado
492 build-cfi-ppc64-s390x:
494 - .native_build_job_template
495 - .native_build_artifact_template
497 - job: amd64-fedora-container
502 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
503 --enable-safe-stack --disable-slirp
504 TARGETS: ppc64-softmmu s390x-softmmu
505 MAKE_CHECK_ARGS: check-build
506 # FIXME: This job is often failing, likely due to out-of-memory problems in
507 # the constrained containers of the shared runners. Thus this is marked as
508 # skipped until the situation has been solved.
512 check-cfi-ppc64-s390x:
513 extends: .native_test_job_template
515 - job: build-cfi-ppc64-s390x
519 MAKE_CHECK_ARGS: check
521 avocado-cfi-ppc64-s390x:
522 extends: .avocado_test_job_template
524 - job: build-cfi-ppc64-s390x
528 MAKE_CHECK_ARGS: check-avocado
532 - .native_build_job_template
533 - .native_build_artifact_template
535 - job: amd64-fedora-container
540 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
541 --enable-safe-stack --disable-slirp
542 TARGETS: x86_64-softmmu
543 MAKE_CHECK_ARGS: check-build
547 extends: .native_test_job_template
549 - job: build-cfi-x86_64
553 MAKE_CHECK_ARGS: check
556 extends: .avocado_test_job_template
558 - job: build-cfi-x86_64
562 MAKE_CHECK_ARGS: check-avocado
565 extends: .native_build_job_template
567 job: amd64-ubuntu2204-container
570 CONFIGURE_ARGS: --enable-tsan --cc=clang --cxx=clang++
571 --enable-trace-backends=ust --disable-slirp
572 TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
574 # gcov is a GCC features
576 extends: .native_build_job_template
578 job: amd64-ubuntu2204-container
582 CONFIGURE_ARGS: --enable-gcov
583 TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
584 MAKE_CHECK_ARGS: check-unit check-softfloat
587 - gcovr --xml-pretty --exclude-unreachable-branches --print-summary
588 -o coverage.xml --root ${CI_PROJECT_DIR} . *.p
589 coverage: /^\s*lines:\s*\d+.\d+\%/
591 name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
595 - build/meson-logs/testlog.txt
597 junit: build/meson-logs/testlog.junit.xml
599 coverage_format: cobertura
600 path: build/coverage.xml
603 extends: .native_build_job_template
605 job: amd64-fedora-container
609 - mkdir build-oss-fuzz
610 - export LSAN_OPTIONS=suppressions=scripts/oss-fuzz/lsan_suppressions.txt
611 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
612 ./scripts/oss-fuzz/build.sh
613 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
614 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
616 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
617 echo Testing ${fuzzer} ... ;
618 "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
622 extends: .native_build_job_template
624 job: amd64-debian-user-cross-container
626 IMAGE: debian-all-test-cross
628 - TARGETS="aarch64 arm hppa m68k microblaze ppc64 s390x x86_64"
631 - ../configure --enable-tcg-interpreter --disable-docs --disable-gtk --disable-vnc
632 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)"
633 || { cat config.log meson-logs/meson-log.txt && exit 1; }
635 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
636 - for tg in $TARGETS ; do
637 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
638 ./tests/qtest/boot-serial-test || exit 1 ;
639 ./tests/qtest/cdrom-test || exit 1 ;
641 - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
642 - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
645 # Check our reduced build configurations
646 build-without-defaults:
647 extends: .native_build_job_template
649 job: amd64-centos8-container
653 --without-default-devices
654 --without-default-features
657 --disable-qom-cast-debug
659 TARGETS: avr-softmmu mips64-softmmu s390x-softmmu sh4-softmmu
660 sparc64-softmmu hexagon-linux-user i386-linux-user s390x-linux-user
661 MAKE_CHECK_ARGS: check
664 extends: .base_job_template
666 image: $CI_REGISTRY_IMAGE/qemu/fedora:$QEMU_CI_CONTAINER_TAG
668 job: amd64-fedora-container
670 - mkdir subprojects/libvhost-user/build
671 - cd subprojects/libvhost-user/build
675 # No targets are built here, just tools, docs, and unit tests. This
676 # also feeds into the eventual documentation deployment steps later
677 build-tools-and-docs-debian:
679 - .native_build_job_template
680 - .native_build_artifact_template
682 job: amd64-debian-container
683 # when running on 'master' we use pre-existing container
687 MAKE_CHECK_ARGS: check-unit ctags TAGS cscope
688 CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
691 # Prepare for GitLab pages deployment. Anything copied into the
692 # "public" directory will be deployed to $USER.gitlab.io/$PROJECT
694 # GitLab publishes from any branch that triggers a CI pipeline
696 # For the main repo we don't want to publish from 'staging'
697 # since that content may not be pushed, nor do we wish to
698 # publish from 'stable-NNN' branches as that content is outdated.
699 # Thus we restrict to just the default branch
701 # For contributor forks we want to publish from any repo so
702 # that users can see the results of their commits, regardless
703 # of what topic branch they're currently using
705 extends: .base_job_template
706 image: $CI_REGISTRY_IMAGE/qemu/debian:$QEMU_CI_CONTAINER_TAG
709 - job: build-tools-and-docs-debian
712 # HTML-ised source tree
714 # We unset variables to work around a bug in some htags versions
715 # which causes it to fail when the environment is large
716 - CI_COMMIT_MESSAGE= CI_COMMIT_TAG_MESSAGE= htags
717 -anT --tree-view=filetree -m qemu_init
718 -t "Welcome to the QEMU sourcecode"
720 # Project documentation
721 - make -C build install DESTDIR=$(pwd)/temp-install
722 - mv temp-install/usr/local/share/doc/qemu/* public/