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-unit check-qtest
29 avocado-system-alpine:
30 extends: .avocado_test_job_template
32 - job: build-system-alpine
36 MAKE_CHECK_ARGS: check-avocado
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 avocado-system-ubuntu:
63 extends: .avocado_test_job_template
65 - job: build-system-ubuntu
69 MAKE_CHECK_ARGS: check-avocado
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 avocado-system-debian:
95 extends: .avocado_test_job_template
97 - job: build-system-debian
101 MAKE_CHECK_ARGS: check-avocado
104 extends: .native_test_job_template
106 - job: build-system-debian
112 - scripts/device-crash-test -q ./qemu-system-i386
115 extends: .native_build_job_template
117 job: amd64-fedora-container
120 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs
121 --enable-fdt=system --enable-slirp=system --enable-capstone=system
122 TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
123 xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
124 MAKE_CHECK_ARGS: check-build
131 extends: .native_test_job_template
133 - job: build-system-fedora
137 MAKE_CHECK_ARGS: check
139 avocado-system-fedora:
140 extends: .avocado_test_job_template
142 - job: build-system-fedora
146 MAKE_CHECK_ARGS: check-avocado
149 extends: .native_test_job_template
151 - job: build-system-fedora
157 - scripts/device-crash-test -q ./qemu-system-ppc
158 - scripts/device-crash-test -q ./qemu-system-riscv32
161 extends: .native_build_job_template
163 job: amd64-centos8-container
166 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-fdt=system
167 --enable-modules --enable-trace-backends=dtrace --enable-docs
168 TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
169 x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
170 MAKE_CHECK_ARGS: check-build
177 extends: .native_test_job_template
179 - job: build-system-centos
183 MAKE_CHECK_ARGS: check
185 avocado-system-centos:
186 extends: .avocado_test_job_template
188 - job: build-system-centos
192 MAKE_CHECK_ARGS: check-avocado
194 build-system-opensuse:
195 extends: .native_build_job_template
197 job: amd64-opensuse-leap-container
200 CONFIGURE_ARGS: --enable-fdt=system
201 TARGETS: s390x-softmmu x86_64-softmmu aarch64-softmmu
202 MAKE_CHECK_ARGS: check-build
208 check-system-opensuse:
209 extends: .native_test_job_template
211 - job: build-system-opensuse
215 MAKE_CHECK_ARGS: check
217 avocado-system-opensuse:
218 extends: .avocado_test_job_template
220 - job: build-system-opensuse
224 MAKE_CHECK_ARGS: check-avocado
227 # This jobs explicitly disable TCG (--disable-tcg), KVM is detected by
228 # the configure script. The container doesn't contain Xen headers so
229 # Xen accelerator is not detected / selected. As result it build the
230 # i386-softmmu and x86_64-softmmu with KVM being the single accelerator
232 # Also use a different coroutine implementation (which is only really of
233 # interest to KVM users, i.e. with TCG disabled)
235 extends: .native_build_job_template
237 job: amd64-centos8-container
243 - ../configure --disable-tcg --audio-drv-list="" --with-coroutine=ucontext
244 || { cat config.log meson-logs/meson-log.txt && exit 1; }
247 - make check-qapi-schema
248 - cd tests/qemu-iotests/
249 - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
250 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
251 170 171 183 184 192 194 208 221 226 227 236 253 277 image-fleecing
252 - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122
253 124 132 139 142 144 145 151 152 155 157 165 194 196 200 202
254 208 209 216 218 227 234 246 247 248 250 254 255 257 258
255 260 261 262 263 264 270 272 273 277 279 image-fleecing
258 extends: .native_build_job_template
260 job: amd64-debian-user-cross-container
262 IMAGE: debian-all-test-cross
263 CONFIGURE_ARGS: --disable-tools --disable-system
264 MAKE_CHECK_ARGS: check-tcg
267 extends: .native_build_job_template
269 job: amd64-debian-user-cross-container
271 IMAGE: debian-all-test-cross
272 CONFIGURE_ARGS: --disable-tools --disable-system --static
273 MAKE_CHECK_ARGS: check-tcg
275 # Because the hexagon cross-compiler takes so long to build we don't rely
276 # on the CI system to build it and hence this job has an optional dependency
277 # declared. The image is manually uploaded.
279 extends: .native_build_job_template
281 job: hexagon-cross-container
284 IMAGE: debian-hexagon-cross
285 TARGETS: hexagon-linux-user
286 CONFIGURE_ARGS: --disable-tools --disable-docs --enable-debug-tcg
287 MAKE_CHECK_ARGS: check-tcg
289 # Only build the softmmu targets we have check-tcg tests for
291 extends: .native_build_job_template
293 job: amd64-debian-user-cross-container
295 IMAGE: debian-all-test-cross
296 CONFIGURE_ARGS: --disable-tools --enable-debug
297 TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
298 MAKE_CHECK_ARGS: check-tcg
300 # We build tricore in a very minimal tricore only container
301 build-tricore-softmmu:
302 extends: .native_build_job_template
304 job: tricore-debian-cross-container
306 IMAGE: debian-tricore-cross
307 CONFIGURE_ARGS: --disable-tools --disable-fdt --enable-debug
308 TARGETS: tricore-softmmu
309 MAKE_CHECK_ARGS: check-tcg
312 extends: .native_build_job_template
314 job: amd64-fedora-container
317 CONFIGURE_ARGS: --cc=clang --cxx=clang++
318 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
319 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
320 ppc-softmmu s390x-softmmu
321 MAKE_CHECK_ARGS: check-qtest check-tcg
324 extends: .native_build_job_template
326 job: amd64-debian-user-cross-container
328 IMAGE: debian-all-test-cross
329 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --disable-system
330 --target-list-exclude=microblazeel-linux-user,aarch64_be-linux-user,i386-linux-user,m68k-linux-user,mipsn32el-linux-user,xtensaeb-linux-user
331 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
332 MAKE_CHECK_ARGS: check-unit check-tcg
334 # Set LD_JOBS=1 because this requires LTO and ld consumes a large amount of memory.
335 # On gitlab runners, default value sometimes end up calling 2 lds concurrently and
336 # triggers an Out-Of-Memory error
338 # Since slirp callbacks are used in QEMU Timers, slirp needs to be compiled together
339 # with QEMU and linked as a static library to avoid false positives in CFI checks.
340 # This can be accomplished by using -enable-slirp=git, which avoids the use of
341 # a system-wide version of the library
343 # Split in three sets of build/check/avocado to limit the execution time of each
346 extends: .native_build_job_template
348 - job: amd64-fedora-container
353 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
354 --enable-safe-stack --enable-slirp=git
355 TARGETS: aarch64-softmmu
356 MAKE_CHECK_ARGS: check-build
363 # FIXME: This job is often failing, likely due to out-of-memory problems in
364 # the constrained containers of the shared runners. Thus this is marked as
365 # manual until the situation has been solved.
370 extends: .native_test_job_template
372 - job: build-cfi-aarch64
376 MAKE_CHECK_ARGS: check
379 extends: .avocado_test_job_template
381 - job: build-cfi-aarch64
385 MAKE_CHECK_ARGS: check-avocado
387 build-cfi-ppc64-s390x:
388 extends: .native_build_job_template
390 - job: amd64-fedora-container
395 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
396 --enable-safe-stack --enable-slirp=git
397 TARGETS: ppc64-softmmu s390x-softmmu
398 MAKE_CHECK_ARGS: check-build
405 # FIXME: This job is often failing, likely due to out-of-memory problems in
406 # the constrained containers of the shared runners. Thus this is marked as
407 # manual until the situation has been solved.
411 check-cfi-ppc64-s390x:
412 extends: .native_test_job_template
414 - job: build-cfi-ppc64-s390x
418 MAKE_CHECK_ARGS: check
420 avocado-cfi-ppc64-s390x:
421 extends: .avocado_test_job_template
423 - job: build-cfi-ppc64-s390x
427 MAKE_CHECK_ARGS: check-avocado
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: x86_64-softmmu
440 MAKE_CHECK_ARGS: check-build
448 extends: .native_test_job_template
450 - job: build-cfi-x86_64
454 MAKE_CHECK_ARGS: check
457 extends: .avocado_test_job_template
459 - job: build-cfi-x86_64
463 MAKE_CHECK_ARGS: check-avocado
466 extends: .native_build_job_template
468 job: amd64-ubuntu2004-container
471 CONFIGURE_ARGS: --enable-tsan --cc=clang-10 --cxx=clang++-10
472 --enable-trace-backends=ust --enable-fdt=system --enable-slirp=system
473 TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
474 MAKE_CHECK_ARGS: bench V=1
476 # gprof/gcov are GCC features
478 extends: .native_build_job_template
480 job: amd64-ubuntu2004-container
483 CONFIGURE_ARGS: --enable-gprof --enable-gcov
484 TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
491 extends: .native_test_job_template
493 - job: build-gprof-gcov
497 MAKE_CHECK_ARGS: check
499 - ${CI_PROJECT_DIR}/scripts/ci/coverage-summary.sh
502 extends: .native_build_job_template
504 job: amd64-fedora-container
508 - mkdir build-oss-fuzz
509 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
510 ./scripts/oss-fuzz/build.sh
511 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
512 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
514 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
515 echo Testing ${fuzzer} ... ;
516 "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
518 # Unrelated to fuzzer: run some tests with -fsanitize=address
519 - cd build-oss-fuzz && make check-qtest-i386 check-unit
522 extends: .native_build_job_template
524 job: amd64-debian-user-cross-container
526 IMAGE: debian-all-test-cross
528 - TARGETS="aarch64 alpha arm hppa m68k microblaze ppc64 s390x x86_64"
531 - ../configure --enable-tcg-interpreter
532 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" || { cat config.log meson-logs/meson-log.txt && exit 1; }
534 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
535 - for tg in $TARGETS ; do
536 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
537 ./tests/qtest/boot-serial-test || exit 1 ;
538 ./tests/qtest/cdrom-test || exit 1 ;
540 - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
541 - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
544 # Alternate coroutines implementations are only really of interest to KVM users
545 # However we can't test against KVM on Gitlab-CI so we can only run unit tests
546 build-coroutine-sigaltstack:
547 extends: .native_build_job_template
549 job: amd64-ubuntu2004-container
552 CONFIGURE_ARGS: --with-coroutine=sigaltstack --disable-tcg
553 --enable-trace-backends=ftrace
554 MAKE_CHECK_ARGS: check-unit
556 # Check our reduced build configurations
557 build-without-default-devices:
558 extends: .native_build_job_template
560 job: amd64-centos8-container
563 CONFIGURE_ARGS: --without-default-devices --disable-user
565 build-without-default-features:
566 extends: .native_build_job_template
568 job: amd64-fedora-container
572 --without-default-features
575 --disable-qom-cast-debug
578 TARGETS: avr-softmmu i386-softmmu mips64-softmmu s390x-softmmu sh4-softmmu
579 sparc64-softmmu hexagon-linux-user i386-linux-user s390x-linux-user
580 MAKE_CHECK_ARGS: check-unit check-qtest SPEED=slow
584 image: $CI_REGISTRY_IMAGE/qemu/fedora:latest
586 job: amd64-fedora-container
588 - mkdir subprojects/libvhost-user/build
589 - cd subprojects/libvhost-user/build
593 # No targets are built here, just tools, docs, and unit tests. This
594 # also feeds into the eventual documentation deployment steps later
595 build-tools-and-docs-debian:
596 extends: .native_build_job_template
598 job: amd64-debian-container
601 MAKE_CHECK_ARGS: check-unit check-softfloat ctags TAGS cscope
602 CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
608 # Prepare for GitLab pages deployment. Anything copied into the
609 # "public" directory will be deployed to $USER.gitlab.io/$PROJECT
611 # GitLab publishes from any branch that triggers a CI pipeline
613 # For the main repo we don't want to publish from 'staging'
614 # since that content may not be pushed, nor do we wish to
615 # publish from 'stable-NNN' branches as that content is outdated.
616 # Thus we restrict to just the default branch
618 # For contributor forks we want to publish from any repo so
619 # that users can see the results of their commits, regardless
620 # of what topic branch they're currently using
622 image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:latest
625 - job: build-tools-and-docs-debian
628 # HTML-ised source tree
630 - htags -anT --tree-view=filetree -m qemu_init
631 -t "Welcome to the QEMU sourcecode"
633 # Project documentation
634 - make -C build install DESTDIR=$(pwd)/temp-install
635 - mv temp-install/usr/local/share/doc/qemu/* public/
640 - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
642 - if: '$CI_PROJECT_NAMESPACE == "qemu-project"'
644 - if: '$CI_PROJECT_NAMESPACE != "qemu-project"'