2 - local: '/.gitlab-ci.d/stages.yml'
3 - local: '/.gitlab-ci.d/edk2.yml'
4 - local: '/.gitlab-ci.d/opensbi.yml'
5 - local: '/.gitlab-ci.d/containers.yml'
6 - local: '/.gitlab-ci.d/crossbuilds.yml'
7 - local: '/.gitlab-ci.d/buildtest-template.yml'
8 - local: '/.gitlab-ci.d/static_checks.yml'
11 extends: .native_build_job_template
13 - job: amd64-alpine-container
16 TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
17 microblazeel-softmmu mips64el-softmmu
18 MAKE_CHECK_ARGS: check-build
19 CONFIGURE_ARGS: --enable-docs --enable-trace-backends=log,simple,syslog
23 - .git-submodule-status
27 extends: .native_test_job_template
29 - job: build-system-alpine
33 MAKE_CHECK_ARGS: check
35 acceptance-system-alpine:
36 extends: .acceptance_test_job_template
38 - job: build-system-alpine
42 MAKE_CHECK_ARGS: check-acceptance
45 extends: .native_build_job_template
47 job: amd64-ubuntu2004-container
50 CONFIGURE_ARGS: --enable-docs --enable-fdt=system --enable-slirp=system
51 TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
52 microblazeel-softmmu mips64el-softmmu
53 MAKE_CHECK_ARGS: check-build
60 extends: .native_test_job_template
62 - job: build-system-ubuntu
66 MAKE_CHECK_ARGS: check
68 acceptance-system-ubuntu:
69 extends: .acceptance_test_job_template
71 - job: build-system-ubuntu
75 MAKE_CHECK_ARGS: check-acceptance
78 extends: .native_build_job_template
80 job: amd64-debian-container
83 CONFIGURE_ARGS: --enable-fdt=system
84 TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu
85 riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu
86 MAKE_CHECK_ARGS: check-build
93 extends: .native_test_job_template
95 - job: build-system-debian
99 MAKE_CHECK_ARGS: check
101 acceptance-system-debian:
102 extends: .acceptance_test_job_template
104 - job: build-system-debian
108 MAKE_CHECK_ARGS: check-acceptance
111 extends: .native_build_job_template
113 job: amd64-fedora-container
116 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs
117 --enable-fdt=system --enable-slirp=system --enable-capstone=system
118 TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
119 xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
120 MAKE_CHECK_ARGS: check-build
127 extends: .native_test_job_template
129 - job: build-system-fedora
133 MAKE_CHECK_ARGS: check
135 acceptance-system-fedora:
136 extends: .acceptance_test_job_template
138 - job: build-system-fedora
142 MAKE_CHECK_ARGS: check-acceptance
145 extends: .native_build_job_template
147 job: amd64-centos8-container
150 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-fdt=system
151 --enable-modules --enable-trace-backends=dtrace
152 TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
153 x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
154 MAKE_CHECK_ARGS: check-build
161 extends: .native_test_job_template
163 - job: build-system-centos
167 MAKE_CHECK_ARGS: check
169 acceptance-system-centos:
170 extends: .acceptance_test_job_template
172 - job: build-system-centos
176 MAKE_CHECK_ARGS: check-acceptance
178 build-system-opensuse:
179 extends: .native_build_job_template
181 job: amd64-opensuse-leap-container
184 CONFIGURE_ARGS: --enable-fdt=system
185 TARGETS: s390x-softmmu x86_64-softmmu aarch64-softmmu
186 MAKE_CHECK_ARGS: check-build
192 check-system-opensuse:
193 extends: .native_test_job_template
195 - job: build-system-opensuse
199 MAKE_CHECK_ARGS: check
201 acceptance-system-opensuse:
202 extends: .acceptance_test_job_template
204 - job: build-system-opensuse
208 MAKE_CHECK_ARGS: check-acceptance
212 extends: .native_build_job_template
214 job: amd64-fedora-container
227 --disable-coroutine-pool
236 --disable-guest-agent
247 --disable-live-block-migration
249 --disable-malloc-trim
258 --disable-qom-cast-debug
261 --disable-replication
273 --disable-vhost-crypto
276 --disable-vhost-kernel
279 --disable-vhost-vsock
280 --disable-virglrenderer
286 TARGETS: arm-softmmu i386-softmmu ppc64-softmmu mips64-softmmu
287 s390x-softmmu i386-linux-user
288 MAKE_CHECK_ARGS: check-qtest SPEED=slow
290 # This jobs explicitly disable TCG (--disable-tcg), KVM is detected by
291 # the configure script. The container doesn't contain Xen headers so
292 # Xen accelerator is not detected / selected. As result it build the
293 # i386-softmmu and x86_64-softmmu with KVM being the single accelerator
295 # Also use a different coroutine implementation (which is only really of
296 # interest to KVM users, i.e. with TCG disabled)
298 extends: .native_build_job_template
300 job: amd64-centos8-container
306 - ../configure --disable-tcg --audio-drv-list="" --with-coroutine=ucontext
307 || { cat config.log meson-logs/meson-log.txt && exit 1; }
310 - make check-qapi-schema
311 - cd tests/qemu-iotests/
312 - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
313 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
314 170 171 183 184 192 194 197 208 215 221 222 226 227 236 253 277
315 - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122
316 124 132 139 142 144 145 151 152 155 157 165 194 196 197 200 202
317 208 209 215 216 218 222 227 234 246 247 248 250 254 255 257 258
318 260 261 262 263 264 270 272 273 277 279
321 extends: .native_build_job_template
323 job: amd64-debian-user-cross-container
325 IMAGE: debian-all-test-cross
326 CONFIGURE_ARGS: --disable-tools --disable-system
327 MAKE_CHECK_ARGS: check-tcg
330 extends: .native_build_job_template
332 job: amd64-debian-user-cross-container
334 IMAGE: debian-all-test-cross
335 CONFIGURE_ARGS: --disable-tools --disable-system --static
336 MAKE_CHECK_ARGS: check-tcg
338 # Because the hexagon cross-compiler takes so long to build we don't rely
339 # on the CI system to build it and hence this job has an optional dependency
340 # declared. The image is manually uploaded.
342 extends: .native_build_job_template
344 job: hexagon-cross-container
347 IMAGE: debian-hexagon-cross
348 TARGETS: hexagon-linux-user
349 CONFIGURE_ARGS: --disable-tools --disable-docs --enable-debug-tcg
350 MAKE_CHECK_ARGS: check-tcg
352 # Only build the softmmu targets we have check-tcg tests for
354 extends: .native_build_job_template
356 job: amd64-debian-user-cross-container
358 IMAGE: debian-all-test-cross
359 CONFIGURE_ARGS: --disable-tools --enable-debug
360 TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
361 MAKE_CHECK_ARGS: check-tcg
363 # Run check-tcg against linux-user (with plugins)
364 # we skip sparc64-linux-user until it has been fixed somewhat
365 # we skip cris-linux-user as it doesn't use the common run loop
367 extends: .native_build_job_template
369 job: amd64-debian-user-cross-container
371 IMAGE: debian-all-test-cross
372 CONFIGURE_ARGS: --disable-tools --disable-system --enable-plugins --enable-debug-tcg --target-list-exclude=sparc64-linux-user,cris-linux-user
373 MAKE_CHECK_ARGS: check-tcg
377 extends: .native_build_job_template
379 job: amd64-centos7-container
382 CONFIGURE_ARGS: --disable-system --disable-tools --disable-docs
383 MAKE_CHECK_ARGS: check-tcg
385 build-some-softmmu-plugins:
386 extends: .native_build_job_template
388 job: amd64-debian-user-cross-container
390 IMAGE: debian-all-test-cross
391 CONFIGURE_ARGS: --disable-tools --disable-user --enable-plugins --enable-debug-tcg
392 TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
393 MAKE_CHECK_ARGS: check-tcg
396 extends: .native_build_job_template
398 job: amd64-fedora-container
401 CONFIGURE_ARGS: --cc=clang --cxx=clang++
402 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
403 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
404 ppc-softmmu s390x-softmmu
405 MAKE_CHECK_ARGS: check-qtest check-tcg
408 extends: .native_build_job_template
410 job: amd64-debian-user-cross-container
412 IMAGE: debian-all-test-cross
413 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --disable-system
414 --target-list-exclude=microblazeel-linux-user,aarch64_be-linux-user,i386-linux-user,m68k-linux-user,mipsn32el-linux-user,xtensaeb-linux-user
415 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
416 MAKE_CHECK_ARGS: check-unit check-tcg
418 # Set LD_JOBS=1 because this requires LTO and ld consumes a large amount of memory.
419 # On gitlab runners, default value sometimes end up calling 2 lds concurrently and
420 # triggers an Out-Of-Memory error
422 # Since slirp callbacks are used in QEMU Timers, slirp needs to be compiled together
423 # with QEMU and linked as a static library to avoid false positives in CFI checks.
424 # This can be accomplished by using -enable-slirp=git, which avoids the use of
425 # a system-wide version of the library
427 # Split in three sets of build/check/acceptance to limit the execution time of each
430 extends: .native_build_job_template
432 - job: amd64-fedora-container
437 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
438 --enable-safe-stack --enable-slirp=git
439 TARGETS: aarch64-softmmu
440 MAKE_CHECK_ARGS: check-build
448 extends: .native_test_job_template
450 - job: build-cfi-aarch64
454 MAKE_CHECK_ARGS: check
456 acceptance-cfi-aarch64:
457 extends: .acceptance_test_job_template
459 - job: build-cfi-aarch64
463 MAKE_CHECK_ARGS: check-acceptance
465 build-cfi-ppc64-s390x:
466 extends: .native_build_job_template
468 - job: amd64-fedora-container
473 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
474 --enable-safe-stack --enable-slirp=git
475 TARGETS: ppc64-softmmu s390x-softmmu
476 MAKE_CHECK_ARGS: check-build
483 check-cfi-ppc64-s390x:
484 extends: .native_test_job_template
486 - job: build-cfi-ppc64-s390x
490 MAKE_CHECK_ARGS: check
492 acceptance-cfi-ppc64-s390x:
493 extends: .acceptance_test_job_template
495 - job: build-cfi-ppc64-s390x
499 MAKE_CHECK_ARGS: check-acceptance
502 extends: .native_build_job_template
504 - job: amd64-fedora-container
509 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
510 --enable-safe-stack --enable-slirp=git
511 TARGETS: x86_64-softmmu
512 MAKE_CHECK_ARGS: check-build
520 extends: .native_test_job_template
522 - job: build-cfi-x86_64
526 MAKE_CHECK_ARGS: check
528 acceptance-cfi-x86_64:
529 extends: .acceptance_test_job_template
531 - job: build-cfi-x86_64
535 MAKE_CHECK_ARGS: check-acceptance
538 extends: .native_build_job_template
540 job: amd64-ubuntu2004-container
543 CONFIGURE_ARGS: --enable-tsan --cc=clang-10 --cxx=clang++-10
544 --enable-trace-backends=ust --enable-fdt=system --enable-slirp=system
545 TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
546 MAKE_CHECK_ARGS: bench V=1
548 # These targets are on the way out
550 extends: .native_build_job_template
552 job: amd64-debian-user-cross-container
554 IMAGE: debian-all-test-cross
555 CONFIGURE_ARGS: --disable-tools
556 MAKE_CHECK_ARGS: build-tcg
557 TARGETS: ppc64abi32-linux-user
563 # We split the check-tcg step as test failures are expected but we still
564 # want to catch the build breaking.
566 extends: .native_test_job_template
568 - job: build-deprecated
571 IMAGE: debian-all-test-cross
572 MAKE_CHECK_ARGS: check-tcg
575 # gprof/gcov are GCC features
577 extends: .native_build_job_template
579 job: amd64-ubuntu2004-container
582 CONFIGURE_ARGS: --enable-gprof --enable-gcov
583 MAKE_CHECK_ARGS: check
584 TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
587 - ${CI_PROJECT_DIR}/scripts/ci/coverage-summary.sh
590 extends: .native_build_job_template
592 job: amd64-fedora-container
596 - mkdir build-oss-fuzz
597 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
598 ./scripts/oss-fuzz/build.sh
599 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
600 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
602 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
603 echo Testing ${fuzzer} ... ;
604 "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
606 # Unrelated to fuzzer: run some tests with -fsanitize=address
607 - cd build-oss-fuzz && make check-qtest-i386 check-unit
610 extends: .native_build_job_template
612 job: amd64-debian-user-cross-container
614 IMAGE: debian-all-test-cross
616 - TARGETS="aarch64 alpha arm hppa m68k microblaze ppc64 s390x x86_64"
619 - ../configure --enable-tcg-interpreter
620 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" || { cat config.log meson-logs/meson-log.txt && exit 1; }
622 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
623 - for tg in $TARGETS ; do
624 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
625 ./tests/qtest/boot-serial-test || exit 1 ;
626 ./tests/qtest/cdrom-test || exit 1 ;
628 - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
629 - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
632 # Alternate coroutines implementations are only really of interest to KVM users
633 # However we can't test against KVM on Gitlab-CI so we can only run unit tests
634 build-coroutine-sigaltstack:
635 extends: .native_build_job_template
637 job: amd64-ubuntu2004-container
640 CONFIGURE_ARGS: --with-coroutine=sigaltstack --disable-tcg
641 --enable-trace-backends=ftrace
642 MAKE_CHECK_ARGS: check-unit
644 # Most jobs test latest gcrypt or nettle builds
646 # These jobs test old gcrypt and nettle from RHEL7
647 # which had some API differences.
649 extends: .native_build_job_template
651 job: amd64-centos7-container
654 TARGETS: x86_64-softmmu x86_64-linux-user
655 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle
656 MAKE_CHECK_ARGS: check
659 extends: .native_build_job_template
661 job: amd64-centos7-container
664 TARGETS: x86_64-softmmu x86_64-linux-user
665 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt
666 MAKE_CHECK_ARGS: check
669 extends: .native_build_job_template
671 job: amd64-centos7-container
674 TARGETS: x86_64-softmmu x86_64-linux-user
675 CONFIGURE_ARGS: --disable-nettle --disable-gcrypt --enable-gnutls
676 MAKE_CHECK_ARGS: check
679 # Check our reduced build configurations
680 build-without-default-devices:
681 extends: .native_build_job_template
683 job: amd64-centos8-container
686 CONFIGURE_ARGS: --without-default-devices --disable-user
688 build-without-default-features:
689 extends: .native_build_job_template
691 job: amd64-debian-container
694 CONFIGURE_ARGS: --without-default-features --disable-user
695 --target-list-exclude=arm-softmmu,i386-softmmu,mipsel-softmmu,mips64-softmmu,ppc-softmmu
696 MAKE_CHECK_ARGS: check-unit
700 image: $CI_REGISTRY_IMAGE/qemu/fedora:latest
702 job: amd64-fedora-container
704 - dnf install -y meson ninja-build
706 - mkdir subprojects/libvhost-user/build
707 - cd subprojects/libvhost-user/build
711 # No targets are built here, just tools, docs, and unit tests. This
712 # also feeds into the eventual documentation deployment steps later
713 build-tools-and-docs-debian:
714 extends: .native_build_job_template
716 job: amd64-debian-container
719 MAKE_CHECK_ARGS: check-unit check-softfloat ctags TAGS cscope
720 CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
726 # Prepare for GitLab pages deployment. Anything copied into the
727 # "public" directory will be deployed to $USER.gitlab.io/$PROJECT
729 image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:latest
732 - job: build-tools-and-docs-debian
735 # HTML-ised source tree
737 - htags -anT --tree-view=filetree -m qemu_init
738 -t "Welcome to the QEMU sourcecode"
740 # Project documentation
741 - make -C build install DESTDIR=$(pwd)/temp-install
742 - mv temp-install/usr/local/share/doc/qemu/* public/