2 - local: '/.gitlab-ci.d/buildtest-template.yml'
5 extends: .native_build_job_template
7 - job: amd64-alpine-container
10 TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
11 microblazeel-softmmu mips64el-softmmu
12 MAKE_CHECK_ARGS: check-build
13 CONFIGURE_ARGS: --enable-docs --enable-trace-backends=log,simple,syslog
17 - .git-submodule-status
21 extends: .native_test_job_template
23 - job: build-system-alpine
27 MAKE_CHECK_ARGS: check
29 acceptance-system-alpine:
30 extends: .acceptance_test_job_template
32 - job: build-system-alpine
36 MAKE_CHECK_ARGS: check-acceptance
39 extends: .native_build_job_template
41 job: amd64-ubuntu2004-container
44 CONFIGURE_ARGS: --enable-docs --enable-fdt=system --enable-slirp=system
45 TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
46 microblazeel-softmmu mips64el-softmmu
47 MAKE_CHECK_ARGS: check-build
54 extends: .native_test_job_template
56 - job: build-system-ubuntu
60 MAKE_CHECK_ARGS: check
62 acceptance-system-ubuntu:
63 extends: .acceptance_test_job_template
65 - job: build-system-ubuntu
69 MAKE_CHECK_ARGS: check-acceptance
72 extends: .native_build_job_template
74 job: amd64-debian-container
77 TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu
78 riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu
79 MAKE_CHECK_ARGS: check-build
86 extends: .native_test_job_template
88 - job: build-system-debian
92 MAKE_CHECK_ARGS: check
94 acceptance-system-debian:
95 extends: .acceptance_test_job_template
97 - job: build-system-debian
101 MAKE_CHECK_ARGS: check-acceptance
104 extends: .native_build_job_template
106 job: amd64-fedora-container
109 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs
110 --enable-fdt=system --enable-slirp=system --enable-capstone=system
111 TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
112 xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
113 MAKE_CHECK_ARGS: check-build
120 extends: .native_test_job_template
122 - job: build-system-fedora
126 MAKE_CHECK_ARGS: check
128 acceptance-system-fedora:
129 extends: .acceptance_test_job_template
131 - job: build-system-fedora
135 MAKE_CHECK_ARGS: check-acceptance
138 extends: .native_build_job_template
140 job: amd64-centos8-container
143 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-fdt=system
144 --enable-modules --enable-trace-backends=dtrace
145 TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
146 x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
147 MAKE_CHECK_ARGS: check-build
154 extends: .native_test_job_template
156 - job: build-system-centos
160 MAKE_CHECK_ARGS: check
162 acceptance-system-centos:
163 extends: .acceptance_test_job_template
165 - job: build-system-centos
169 MAKE_CHECK_ARGS: check-acceptance
171 build-system-opensuse:
172 extends: .native_build_job_template
174 job: amd64-opensuse-leap-container
177 CONFIGURE_ARGS: --enable-fdt=system
178 TARGETS: s390x-softmmu x86_64-softmmu aarch64-softmmu
179 MAKE_CHECK_ARGS: check-build
185 check-system-opensuse:
186 extends: .native_test_job_template
188 - job: build-system-opensuse
192 MAKE_CHECK_ARGS: check
194 acceptance-system-opensuse:
195 extends: .acceptance_test_job_template
197 - job: build-system-opensuse
201 MAKE_CHECK_ARGS: check-acceptance
204 # This jobs explicitly disable TCG (--disable-tcg), KVM is detected by
205 # the configure script. The container doesn't contain Xen headers so
206 # Xen accelerator is not detected / selected. As result it build the
207 # i386-softmmu and x86_64-softmmu with KVM being the single accelerator
209 # Also use a different coroutine implementation (which is only really of
210 # interest to KVM users, i.e. with TCG disabled)
212 extends: .native_build_job_template
214 job: amd64-centos8-container
220 - ../configure --disable-tcg --audio-drv-list="" --with-coroutine=ucontext
221 || { cat config.log meson-logs/meson-log.txt && exit 1; }
224 - make check-qapi-schema
225 - cd tests/qemu-iotests/
226 - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
227 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
228 170 171 183 184 192 194 208 221 226 227 236 253 277 image-fleecing
229 - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122
230 124 132 139 142 144 145 151 152 155 157 165 194 196 200 202
231 208 209 216 218 227 234 246 247 248 250 254 255 257 258
232 260 261 262 263 264 270 272 273 277 279 image-fleecing
235 extends: .native_build_job_template
237 job: amd64-debian-user-cross-container
239 IMAGE: debian-all-test-cross
240 CONFIGURE_ARGS: --disable-tools --disable-system
241 MAKE_CHECK_ARGS: check-tcg
244 extends: .native_build_job_template
246 job: amd64-debian-user-cross-container
248 IMAGE: debian-all-test-cross
249 CONFIGURE_ARGS: --disable-tools --disable-system --static
250 MAKE_CHECK_ARGS: check-tcg
252 # Because the hexagon cross-compiler takes so long to build we don't rely
253 # on the CI system to build it and hence this job has an optional dependency
254 # declared. The image is manually uploaded.
256 extends: .native_build_job_template
258 job: hexagon-cross-container
261 IMAGE: debian-hexagon-cross
262 TARGETS: hexagon-linux-user
263 CONFIGURE_ARGS: --disable-tools --disable-docs --enable-debug-tcg
264 MAKE_CHECK_ARGS: check-tcg
266 # Only build the softmmu targets we have check-tcg tests for
268 extends: .native_build_job_template
270 job: amd64-debian-user-cross-container
272 IMAGE: debian-all-test-cross
273 CONFIGURE_ARGS: --disable-tools --enable-debug
274 TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
275 MAKE_CHECK_ARGS: check-tcg
277 # We build tricore in a very minimal tricore only container
278 build-tricore-softmmu:
279 extends: .native_build_job_template
281 job: tricore-debian-cross-container
283 IMAGE: debian-tricore-cross
284 CONFIGURE_ARGS: --disable-tools --disable-fdt --enable-debug
285 TARGETS: tricore-softmmu
286 MAKE_CHECK_ARGS: check-tcg
289 extends: .native_build_job_template
291 job: amd64-fedora-container
294 CONFIGURE_ARGS: --cc=clang --cxx=clang++
295 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
296 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
297 ppc-softmmu s390x-softmmu
298 MAKE_CHECK_ARGS: check-qtest check-tcg
301 extends: .native_build_job_template
303 job: amd64-debian-user-cross-container
305 IMAGE: debian-all-test-cross
306 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --disable-system
307 --target-list-exclude=microblazeel-linux-user,aarch64_be-linux-user,i386-linux-user,m68k-linux-user,mipsn32el-linux-user,xtensaeb-linux-user
308 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
309 MAKE_CHECK_ARGS: check-unit check-tcg
311 # Set LD_JOBS=1 because this requires LTO and ld consumes a large amount of memory.
312 # On gitlab runners, default value sometimes end up calling 2 lds concurrently and
313 # triggers an Out-Of-Memory error
315 # Since slirp callbacks are used in QEMU Timers, slirp needs to be compiled together
316 # with QEMU and linked as a static library to avoid false positives in CFI checks.
317 # This can be accomplished by using -enable-slirp=git, which avoids the use of
318 # a system-wide version of the library
320 # Split in three sets of build/check/acceptance to limit the execution time of each
323 extends: .native_build_job_template
325 - job: amd64-fedora-container
330 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
331 --enable-safe-stack --enable-slirp=git
332 TARGETS: aarch64-softmmu
333 MAKE_CHECK_ARGS: check-build
340 # FIXME: This job is often failing, likely due to out-of-memory problems in
341 # the constrained containers of the shared runners. Thus this is marked as
342 # manual until the situation has been solved.
347 extends: .native_test_job_template
349 - job: build-cfi-aarch64
353 MAKE_CHECK_ARGS: check
355 acceptance-cfi-aarch64:
356 extends: .acceptance_test_job_template
358 - job: build-cfi-aarch64
362 MAKE_CHECK_ARGS: check-acceptance
364 build-cfi-ppc64-s390x:
365 extends: .native_build_job_template
367 - job: amd64-fedora-container
372 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
373 --enable-safe-stack --enable-slirp=git
374 TARGETS: ppc64-softmmu s390x-softmmu
375 MAKE_CHECK_ARGS: check-build
382 # FIXME: This job is often failing, likely due to out-of-memory problems in
383 # the constrained containers of the shared runners. Thus this is marked as
384 # manual until the situation has been solved.
388 check-cfi-ppc64-s390x:
389 extends: .native_test_job_template
391 - job: build-cfi-ppc64-s390x
395 MAKE_CHECK_ARGS: check
397 acceptance-cfi-ppc64-s390x:
398 extends: .acceptance_test_job_template
400 - job: build-cfi-ppc64-s390x
404 MAKE_CHECK_ARGS: check-acceptance
407 extends: .native_build_job_template
409 - job: amd64-fedora-container
414 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
415 --enable-safe-stack --enable-slirp=git
416 TARGETS: x86_64-softmmu
417 MAKE_CHECK_ARGS: check-build
425 extends: .native_test_job_template
427 - job: build-cfi-x86_64
431 MAKE_CHECK_ARGS: check
433 acceptance-cfi-x86_64:
434 extends: .acceptance_test_job_template
436 - job: build-cfi-x86_64
440 MAKE_CHECK_ARGS: check-acceptance
443 extends: .native_build_job_template
445 job: amd64-ubuntu2004-container
448 CONFIGURE_ARGS: --enable-tsan --cc=clang-10 --cxx=clang++-10
449 --enable-trace-backends=ust --enable-fdt=system --enable-slirp=system
450 TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
451 MAKE_CHECK_ARGS: bench V=1
453 # These targets are on the way out
455 extends: .native_build_job_template
457 job: amd64-debian-user-cross-container
459 IMAGE: debian-all-test-cross
460 CONFIGURE_ARGS: --disable-tools
461 MAKE_CHECK_ARGS: build-tcg
462 TARGETS: ppc64abi32-linux-user
468 # We split the check-tcg step as test failures are expected but we still
469 # want to catch the build breaking.
471 extends: .native_test_job_template
473 - job: build-deprecated
476 IMAGE: debian-all-test-cross
477 MAKE_CHECK_ARGS: check-tcg
480 # gprof/gcov are GCC features
482 extends: .native_build_job_template
484 job: amd64-ubuntu2004-container
487 CONFIGURE_ARGS: --enable-gprof --enable-gcov
488 TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
495 extends: .native_test_job_template
497 - job: build-gprof-gcov
501 MAKE_CHECK_ARGS: check
503 - ${CI_PROJECT_DIR}/scripts/ci/coverage-summary.sh
506 extends: .native_build_job_template
508 job: amd64-fedora-container
512 - mkdir build-oss-fuzz
513 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
514 ./scripts/oss-fuzz/build.sh
515 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
516 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
518 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
519 echo Testing ${fuzzer} ... ;
520 "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
522 # Unrelated to fuzzer: run some tests with -fsanitize=address
523 - cd build-oss-fuzz && make check-qtest-i386 check-unit
526 extends: .native_build_job_template
528 job: amd64-debian-user-cross-container
530 IMAGE: debian-all-test-cross
532 - TARGETS="aarch64 alpha arm hppa m68k microblaze ppc64 s390x x86_64"
535 - ../configure --enable-tcg-interpreter
536 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" || { cat config.log meson-logs/meson-log.txt && exit 1; }
538 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
539 - for tg in $TARGETS ; do
540 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
541 ./tests/qtest/boot-serial-test || exit 1 ;
542 ./tests/qtest/cdrom-test || exit 1 ;
544 - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
545 - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
548 # Alternate coroutines implementations are only really of interest to KVM users
549 # However we can't test against KVM on Gitlab-CI so we can only run unit tests
550 build-coroutine-sigaltstack:
551 extends: .native_build_job_template
553 job: amd64-ubuntu2004-container
556 CONFIGURE_ARGS: --with-coroutine=sigaltstack --disable-tcg
557 --enable-trace-backends=ftrace
558 MAKE_CHECK_ARGS: check-unit
560 # Check our reduced build configurations
561 build-without-default-devices:
562 extends: .native_build_job_template
564 job: amd64-centos8-container
567 CONFIGURE_ARGS: --without-default-devices --disable-user
569 build-without-default-features:
570 extends: .native_build_job_template
572 job: amd64-fedora-container
576 --without-default-features
580 --disable-qom-cast-debug
583 TARGETS: avr-softmmu i386-softmmu mips64-softmmu s390x-softmmu sh4-softmmu
584 sparc64-softmmu hexagon-linux-user i386-linux-user s390x-linux-user
585 MAKE_CHECK_ARGS: check-unit check-qtest SPEED=slow
589 image: $CI_REGISTRY_IMAGE/qemu/fedora:latest
591 job: amd64-fedora-container
593 - mkdir subprojects/libvhost-user/build
594 - cd subprojects/libvhost-user/build
598 # No targets are built here, just tools, docs, and unit tests. This
599 # also feeds into the eventual documentation deployment steps later
600 build-tools-and-docs-debian:
601 extends: .native_build_job_template
603 job: amd64-debian-container
606 MAKE_CHECK_ARGS: check-unit check-softfloat ctags TAGS cscope
607 CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
613 # Prepare for GitLab pages deployment. Anything copied into the
614 # "public" directory will be deployed to $USER.gitlab.io/$PROJECT
616 # GitLab publishes from any branch that triggers a CI pipeline
618 # For the main repo we don't want to publish from 'staging'
619 # since that content may not be pushed, nor do we wish to
620 # publish from 'stable-NNN' branches as that content is outdated.
621 # Thus we restrict to just the default branch
623 # For contributor forks we want to publish from any repo so
624 # that users can see the results of their commits, regardless
625 # of what topic branch they're currently using
627 image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:latest
630 - job: build-tools-and-docs-debian
633 # HTML-ised source tree
635 - htags -anT --tree-view=filetree -m qemu_init
636 -t "Welcome to the QEMU sourcecode"
638 # Project documentation
639 - make -C build install DESTDIR=$(pwd)/temp-install
640 - mv temp-install/usr/local/share/doc/qemu/* public/
645 - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
647 - if: '$CI_PROJECT_NAMESPACE == "qemu-project"'
649 - if: '$CI_PROJECT_NAMESPACE != "qemu-project"'