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
376 build-some-softmmu-plugins:
377 extends: .native_build_job_template
379 job: amd64-debian-user-cross-container
381 IMAGE: debian-all-test-cross
382 CONFIGURE_ARGS: --disable-tools --disable-user --enable-plugins --enable-debug-tcg
383 TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
384 MAKE_CHECK_ARGS: check-tcg
387 extends: .native_build_job_template
389 job: amd64-fedora-container
392 CONFIGURE_ARGS: --cc=clang --cxx=clang++
393 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
394 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
395 ppc-softmmu s390x-softmmu
396 MAKE_CHECK_ARGS: check-qtest check-tcg
399 extends: .native_build_job_template
401 job: amd64-debian-user-cross-container
403 IMAGE: debian-all-test-cross
404 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --disable-system
405 --target-list-exclude=microblazeel-linux-user,aarch64_be-linux-user,i386-linux-user,m68k-linux-user,mipsn32el-linux-user,xtensaeb-linux-user
406 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
407 MAKE_CHECK_ARGS: check-unit check-tcg
409 # Set LD_JOBS=1 because this requires LTO and ld consumes a large amount of memory.
410 # On gitlab runners, default value sometimes end up calling 2 lds concurrently and
411 # triggers an Out-Of-Memory error
413 # Since slirp callbacks are used in QEMU Timers, slirp needs to be compiled together
414 # with QEMU and linked as a static library to avoid false positives in CFI checks.
415 # This can be accomplished by using -enable-slirp=git, which avoids the use of
416 # a system-wide version of the library
418 # Split in three sets of build/check/acceptance to limit the execution time of each
421 extends: .native_build_job_template
423 - job: amd64-fedora-container
428 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
429 --enable-safe-stack --enable-slirp=git
430 TARGETS: aarch64-softmmu
431 MAKE_CHECK_ARGS: check-build
439 extends: .native_test_job_template
441 - job: build-cfi-aarch64
445 MAKE_CHECK_ARGS: check
447 acceptance-cfi-aarch64:
448 extends: .acceptance_test_job_template
450 - job: build-cfi-aarch64
454 MAKE_CHECK_ARGS: check-acceptance
456 build-cfi-ppc64-s390x:
457 extends: .native_build_job_template
459 - job: amd64-fedora-container
464 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
465 --enable-safe-stack --enable-slirp=git
466 TARGETS: ppc64-softmmu s390x-softmmu
467 MAKE_CHECK_ARGS: check-build
474 check-cfi-ppc64-s390x:
475 extends: .native_test_job_template
477 - job: build-cfi-ppc64-s390x
481 MAKE_CHECK_ARGS: check
483 acceptance-cfi-ppc64-s390x:
484 extends: .acceptance_test_job_template
486 - job: build-cfi-ppc64-s390x
490 MAKE_CHECK_ARGS: check-acceptance
493 extends: .native_build_job_template
495 - job: amd64-fedora-container
500 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
501 --enable-safe-stack --enable-slirp=git
502 TARGETS: x86_64-softmmu
503 MAKE_CHECK_ARGS: check-build
511 extends: .native_test_job_template
513 - job: build-cfi-x86_64
517 MAKE_CHECK_ARGS: check
519 acceptance-cfi-x86_64:
520 extends: .acceptance_test_job_template
522 - job: build-cfi-x86_64
526 MAKE_CHECK_ARGS: check-acceptance
529 extends: .native_build_job_template
531 job: amd64-ubuntu2004-container
534 CONFIGURE_ARGS: --enable-tsan --cc=clang-10 --cxx=clang++-10
535 --enable-trace-backends=ust --enable-fdt=system --enable-slirp=system
536 TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
537 MAKE_CHECK_ARGS: bench V=1
539 # These targets are on the way out
541 extends: .native_build_job_template
543 job: amd64-debian-user-cross-container
545 IMAGE: debian-all-test-cross
546 CONFIGURE_ARGS: --disable-tools
547 MAKE_CHECK_ARGS: build-tcg
548 TARGETS: ppc64abi32-linux-user
554 # We split the check-tcg step as test failures are expected but we still
555 # want to catch the build breaking.
557 extends: .native_test_job_template
559 - job: build-deprecated
562 IMAGE: debian-all-test-cross
563 MAKE_CHECK_ARGS: check-tcg
566 # gprof/gcov are GCC features
568 extends: .native_build_job_template
570 job: amd64-ubuntu2004-container
573 CONFIGURE_ARGS: --enable-gprof --enable-gcov
574 MAKE_CHECK_ARGS: check
575 TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
578 - ${CI_PROJECT_DIR}/scripts/ci/coverage-summary.sh
581 extends: .native_build_job_template
583 job: amd64-fedora-container
587 - mkdir build-oss-fuzz
588 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
589 ./scripts/oss-fuzz/build.sh
590 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
591 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
593 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
594 echo Testing ${fuzzer} ... ;
595 "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
597 # Unrelated to fuzzer: run some tests with -fsanitize=address
598 - cd build-oss-fuzz && make check-qtest-i386 check-unit
601 extends: .native_build_job_template
603 job: amd64-debian-user-cross-container
605 IMAGE: debian-all-test-cross
607 - TARGETS="aarch64 alpha arm hppa m68k microblaze ppc64 s390x x86_64"
610 - ../configure --enable-tcg-interpreter
611 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" || { cat config.log meson-logs/meson-log.txt && exit 1; }
613 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
614 - for tg in $TARGETS ; do
615 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
616 ./tests/qtest/boot-serial-test || exit 1 ;
617 ./tests/qtest/cdrom-test || exit 1 ;
619 - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
620 - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
623 # Alternate coroutines implementations are only really of interest to KVM users
624 # However we can't test against KVM on Gitlab-CI so we can only run unit tests
625 build-coroutine-sigaltstack:
626 extends: .native_build_job_template
628 job: amd64-ubuntu2004-container
631 CONFIGURE_ARGS: --with-coroutine=sigaltstack --disable-tcg
632 --enable-trace-backends=ftrace
633 MAKE_CHECK_ARGS: check-unit
635 # Most jobs test latest gcrypt or nettle builds
637 # These jobs test old gcrypt and nettle from RHEL7
638 # which had some API differences.
640 extends: .native_build_job_template
642 job: amd64-centos7-container
645 TARGETS: x86_64-softmmu x86_64-linux-user
646 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle
647 MAKE_CHECK_ARGS: check
650 extends: .native_build_job_template
652 job: amd64-centos7-container
655 TARGETS: x86_64-softmmu x86_64-linux-user
656 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt
657 MAKE_CHECK_ARGS: check
660 extends: .native_build_job_template
662 job: amd64-centos7-container
665 TARGETS: x86_64-softmmu x86_64-linux-user
666 CONFIGURE_ARGS: --disable-nettle --disable-gcrypt --enable-gnutls
667 MAKE_CHECK_ARGS: check
670 # Check our reduced build configurations
671 build-without-default-devices:
672 extends: .native_build_job_template
674 job: amd64-centos8-container
677 CONFIGURE_ARGS: --without-default-devices --disable-user
679 build-without-default-features:
680 extends: .native_build_job_template
682 job: amd64-debian-container
685 CONFIGURE_ARGS: --without-default-features --disable-user
686 --target-list-exclude=arm-softmmu,i386-softmmu,mipsel-softmmu,mips64-softmmu,ppc-softmmu
687 MAKE_CHECK_ARGS: check-unit
691 image: $CI_REGISTRY_IMAGE/qemu/fedora:latest
693 job: amd64-fedora-container
695 - dnf install -y meson ninja-build
697 - mkdir subprojects/libvhost-user/build
698 - cd subprojects/libvhost-user/build
702 # No targets are built here, just tools, docs, and unit tests. This
703 # also feeds into the eventual documentation deployment steps later
704 build-tools-and-docs-debian:
705 extends: .native_build_job_template
707 job: amd64-debian-container
710 MAKE_CHECK_ARGS: check-unit check-softfloat ctags TAGS cscope
711 CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
717 # Prepare for GitLab pages deployment. Anything copied into the
718 # "public" directory will be deployed to $USER.gitlab.io/$PROJECT
720 image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:latest
723 - job: build-tools-and-docs-debian
726 # HTML-ised source tree
728 - htags -anT --tree-view=filetree -m qemu_init
729 -t "Welcome to the QEMU sourcecode"
731 # Project documentation
732 - make -C build install DESTDIR=$(pwd)/temp-install
733 - mv temp-install/usr/local/share/doc/qemu/* public/