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 microblaze-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:microblaze 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
171 extends: .native_test_job_template
173 - job: build-system-centos
177 MAKE_CHECK_ARGS: check
179 avocado-system-centos:
180 extends: .avocado_test_job_template
182 - job: build-system-centos
186 MAKE_CHECK_ARGS: check-avocado
187 AVOCADO_TAGS: arch:ppc64 arch:or1k arch:390x arch:x86_64 arch:rx
190 build-system-opensuse:
192 - .native_build_job_template
193 - .native_build_artifact_template
195 job: amd64-opensuse-leap-container
198 TARGETS: s390x-softmmu x86_64-softmmu aarch64-softmmu
199 MAKE_CHECK_ARGS: check-build
201 check-system-opensuse:
202 extends: .native_test_job_template
204 - job: build-system-opensuse
208 MAKE_CHECK_ARGS: check
210 avocado-system-opensuse:
211 extends: .avocado_test_job_template
213 - job: build-system-opensuse
217 MAKE_CHECK_ARGS: check-avocado
218 AVOCADO_TAGS: arch:s390x arch:x86_64 arch:aarch64
221 # Flaky tests. We don't run these by default and they are allow fail
222 # but often the CI system is the only way to trigger the failures.
227 - .native_build_job_template
228 - .native_build_artifact_template
230 job: amd64-debian-container
234 TARGETS: aarch64-softmmu arm-softmmu mips64el-softmmu
235 ppc64-softmmu rx-softmmu s390x-softmmu sh4-softmmu x86_64-softmmu
236 MAKE_CHECK_ARGS: check-build
238 avocado-system-flaky:
239 extends: .avocado_test_job_template
241 - job: build-system-flaky
246 MAKE_CHECK_ARGS: check-avocado
248 QEMU_TEST_FLAKY_TESTS: 1
251 # This jobs explicitly disable TCG (--disable-tcg), KVM is detected by
252 # the configure script. The container doesn't contain Xen headers so
253 # Xen accelerator is not detected / selected. As result it build the
254 # i386-softmmu and x86_64-softmmu with KVM being the single accelerator
256 # Also use a different coroutine implementation (which is only really of
257 # interest to KVM users, i.e. with TCG disabled)
259 extends: .native_build_job_template
261 job: amd64-centos8-container
267 - ../configure --disable-tcg --audio-drv-list="" --with-coroutine=ucontext
268 --disable-docs --disable-sdl --disable-gtk --disable-vnc
269 || { cat config.log meson-logs/meson-log.txt && exit 1; }
272 - make check-qapi-schema
273 - cd tests/qemu-iotests/
274 - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
275 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
276 170 171 183 184 192 194 208 221 226 227 236 253 277 image-fleecing
277 - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122
278 124 132 139 142 144 145 151 152 155 157 165 194 196 200 202
279 208 209 216 218 227 234 246 247 248 250 254 255 257 258
280 260 261 262 263 264 270 272 273 277 279 image-fleecing
283 extends: .native_build_job_template
285 job: amd64-debian-user-cross-container
287 IMAGE: debian-all-test-cross
288 CONFIGURE_ARGS: --disable-tools --disable-system
289 --target-list-exclude=alpha-linux-user,sh4-linux-user
290 MAKE_CHECK_ARGS: check-tcg
293 extends: .native_build_job_template
295 job: amd64-debian-user-cross-container
297 IMAGE: debian-all-test-cross
298 CONFIGURE_ARGS: --disable-tools --disable-system --static
299 --target-list-exclude=alpha-linux-user,sh4-linux-user
300 MAKE_CHECK_ARGS: check-tcg
302 # targets stuck on older compilers
304 extends: .native_build_job_template
306 job: amd64-debian-legacy-cross-container
308 IMAGE: debian-legacy-test-cross
309 TARGETS: alpha-linux-user alpha-softmmu sh4-linux-user
310 CONFIGURE_ARGS: --disable-tools
311 MAKE_CHECK_ARGS: check-tcg
314 extends: .native_build_job_template
316 job: hexagon-cross-container
318 IMAGE: debian-hexagon-cross
319 TARGETS: hexagon-linux-user
320 CONFIGURE_ARGS: --disable-tools --disable-docs --enable-debug-tcg
321 MAKE_CHECK_ARGS: check-tcg
323 # Build the softmmu targets we have check-tcg tests and compilers in
324 # our omnibus all-test-cross container. Those targets that haven't got
325 # Debian cross compiler support need to use special containers.
327 extends: .native_build_job_template
329 job: amd64-debian-user-cross-container
331 IMAGE: debian-all-test-cross
332 CONFIGURE_ARGS: --disable-tools --enable-debug
333 TARGETS: arm-softmmu aarch64-softmmu i386-softmmu riscv64-softmmu
334 s390x-softmmu x86_64-softmmu
335 MAKE_CHECK_ARGS: check-tcg
338 extends: .native_build_job_template
340 job: loongarch-debian-cross-container
342 IMAGE: debian-loongarch-cross
343 CONFIGURE_ARGS: --disable-tools --enable-debug
344 TARGETS: loongarch64-linux-user loongarch64-softmmu
345 MAKE_CHECK_ARGS: check-tcg
347 # We build tricore in a very minimal tricore only container
348 build-tricore-softmmu:
349 extends: .native_build_job_template
351 job: tricore-debian-cross-container
353 IMAGE: debian-tricore-cross
354 CONFIGURE_ARGS: --disable-tools --disable-fdt --enable-debug
355 TARGETS: tricore-softmmu
356 MAKE_CHECK_ARGS: check-tcg
359 extends: .native_build_job_template
361 job: amd64-fedora-container
364 CONFIGURE_ARGS: --cc=clang --cxx=clang++
365 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
366 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu s390x-softmmu
367 MAKE_CHECK_ARGS: check-qtest check-tcg
370 extends: .native_build_job_template
372 job: amd64-debian-user-cross-container
375 IMAGE: debian-all-test-cross
376 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --disable-system
377 --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
378 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
379 MAKE_CHECK_ARGS: check-unit check-tcg
381 # Set LD_JOBS=1 because this requires LTO and ld consumes a large amount of memory.
382 # On gitlab runners, default value sometimes end up calling 2 lds concurrently and
383 # triggers an Out-Of-Memory error
385 # Since slirp callbacks are used in QEMU Timers, we cannot use libslirp with
386 # CFI builds, and thus have to disable it here.
388 # Split in three sets of build/check/avocado to limit the execution time of each
392 - .native_build_job_template
393 - .native_build_artifact_template
395 - job: amd64-fedora-container
400 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
401 --enable-safe-stack --disable-slirp
402 TARGETS: aarch64-softmmu
403 MAKE_CHECK_ARGS: check-build
404 # FIXME: This job is often failing, likely due to out-of-memory problems in
405 # the constrained containers of the shared runners. Thus this is marked as
406 # skipped until the situation has been solved.
411 extends: .native_test_job_template
413 - job: build-cfi-aarch64
417 MAKE_CHECK_ARGS: check
420 extends: .avocado_test_job_template
422 - job: build-cfi-aarch64
426 MAKE_CHECK_ARGS: check-avocado
428 build-cfi-ppc64-s390x:
430 - .native_build_job_template
431 - .native_build_artifact_template
433 - job: amd64-fedora-container
438 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
439 --enable-safe-stack --disable-slirp
440 TARGETS: ppc64-softmmu s390x-softmmu
441 MAKE_CHECK_ARGS: check-build
442 # FIXME: This job is often failing, likely due to out-of-memory problems in
443 # the constrained containers of the shared runners. Thus this is marked as
444 # skipped until the situation has been solved.
448 check-cfi-ppc64-s390x:
449 extends: .native_test_job_template
451 - job: build-cfi-ppc64-s390x
455 MAKE_CHECK_ARGS: check
457 avocado-cfi-ppc64-s390x:
458 extends: .avocado_test_job_template
460 - job: build-cfi-ppc64-s390x
464 MAKE_CHECK_ARGS: check-avocado
468 - .native_build_job_template
469 - .native_build_artifact_template
471 - job: amd64-fedora-container
476 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
477 --enable-safe-stack --disable-slirp
478 TARGETS: x86_64-softmmu
479 MAKE_CHECK_ARGS: check-build
483 extends: .native_test_job_template
485 - job: build-cfi-x86_64
489 MAKE_CHECK_ARGS: check
492 extends: .avocado_test_job_template
494 - job: build-cfi-x86_64
498 MAKE_CHECK_ARGS: check-avocado
501 extends: .native_build_job_template
503 job: amd64-ubuntu2204-container
506 CONFIGURE_ARGS: --enable-tsan --cc=clang --cxx=clang++
507 --enable-trace-backends=ust --disable-slirp
508 TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
510 # gcov is a GCC features
512 extends: .native_build_job_template
514 job: amd64-ubuntu2204-container
518 CONFIGURE_ARGS: --enable-gcov
519 TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
520 MAKE_CHECK_ARGS: check-unit check-softfloat
523 - gcovr --xml-pretty --exclude-unreachable-branches --print-summary
524 -o coverage.xml --root ${CI_PROJECT_DIR} . *.p
525 coverage: /^\s*lines:\s*\d+.\d+\%/
527 name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
531 - build/meson-logs/testlog.txt
533 junit: build/meson-logs/testlog.junit.xml
535 coverage_format: cobertura
536 path: build/coverage.xml
539 extends: .native_build_job_template
541 job: amd64-fedora-container
545 - mkdir build-oss-fuzz
546 - export LSAN_OPTIONS=suppressions=scripts/oss-fuzz/lsan_suppressions.txt
547 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
548 ./scripts/oss-fuzz/build.sh
549 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
550 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
552 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
553 echo Testing ${fuzzer} ... ;
554 "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
558 extends: .native_build_job_template
560 job: amd64-debian-user-cross-container
562 IMAGE: debian-all-test-cross
564 - TARGETS="aarch64 arm hppa m68k microblaze ppc64 s390x x86_64"
567 - ../configure --enable-tcg-interpreter --disable-docs --disable-gtk --disable-vnc
568 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)"
569 || { cat config.log meson-logs/meson-log.txt && exit 1; }
571 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
572 - for tg in $TARGETS ; do
573 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
574 ./tests/qtest/boot-serial-test || exit 1 ;
575 ./tests/qtest/cdrom-test || exit 1 ;
577 - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
578 - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
581 # Check our reduced build configurations
582 build-without-defaults:
583 extends: .native_build_job_template
585 job: amd64-centos8-container
589 --without-default-devices
590 --without-default-features
593 --disable-qom-cast-debug
595 TARGETS: avr-softmmu mips64-softmmu s390x-softmmu sh4-softmmu
596 sparc64-softmmu hexagon-linux-user i386-linux-user s390x-linux-user
597 MAKE_CHECK_ARGS: check
600 extends: .base_job_template
602 image: $CI_REGISTRY_IMAGE/qemu/fedora:$QEMU_CI_CONTAINER_TAG
604 job: amd64-fedora-container
606 - mkdir subprojects/libvhost-user/build
607 - cd subprojects/libvhost-user/build
611 # No targets are built here, just tools, docs, and unit tests. This
612 # also feeds into the eventual documentation deployment steps later
613 build-tools-and-docs-debian:
615 - .native_build_job_template
616 - .native_build_artifact_template
618 job: amd64-debian-container
619 # when running on 'master' we use pre-existing container
623 MAKE_CHECK_ARGS: check-unit ctags TAGS cscope
624 CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
627 # Prepare for GitLab pages deployment. Anything copied into the
628 # "public" directory will be deployed to $USER.gitlab.io/$PROJECT
630 # GitLab publishes from any branch that triggers a CI pipeline
632 # For the main repo we don't want to publish from 'staging'
633 # since that content may not be pushed, nor do we wish to
634 # publish from 'stable-NNN' branches as that content is outdated.
635 # Thus we restrict to just the default branch
637 # For contributor forks we want to publish from any repo so
638 # that users can see the results of their commits, regardless
639 # of what topic branch they're currently using
641 extends: .base_job_template
642 image: $CI_REGISTRY_IMAGE/qemu/debian:$QEMU_CI_CONTAINER_TAG
645 - job: build-tools-and-docs-debian
648 # HTML-ised source tree
650 - htags -anT --tree-view=filetree -m qemu_init
651 -t "Welcome to the QEMU sourcecode"
653 # Project documentation
654 - make -C build install DESTDIR=$(pwd)/temp-install
655 - mv temp-install/usr/local/share/doc/qemu/* public/