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-capstone
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
113 - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-i386
116 extends: .native_build_job_template
118 job: amd64-fedora-container
121 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs
122 --enable-fdt=system --enable-slirp --enable-capstone
123 TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
124 xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
125 MAKE_CHECK_ARGS: check-build
132 extends: .native_test_job_template
134 - job: build-system-fedora
138 MAKE_CHECK_ARGS: check
140 avocado-system-fedora:
141 extends: .avocado_test_job_template
143 - job: build-system-fedora
147 MAKE_CHECK_ARGS: check-avocado
150 extends: .native_test_job_template
152 - job: build-system-fedora
159 - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-ppc
160 - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-riscv32
163 extends: .native_build_job_template
165 job: amd64-centos8-container
168 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-fdt=system
169 --enable-modules --enable-trace-backends=dtrace --enable-docs
170 --enable-vfio-user-server
171 TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
172 x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
173 MAKE_CHECK_ARGS: check-build
180 extends: .native_test_job_template
182 - job: build-system-centos
186 MAKE_CHECK_ARGS: check
188 avocado-system-centos:
189 extends: .avocado_test_job_template
191 - job: build-system-centos
195 MAKE_CHECK_ARGS: check-avocado
197 build-system-opensuse:
198 extends: .native_build_job_template
200 job: amd64-opensuse-leap-container
203 CONFIGURE_ARGS: --enable-fdt=system
204 TARGETS: s390x-softmmu x86_64-softmmu aarch64-softmmu
205 MAKE_CHECK_ARGS: check-build
211 check-system-opensuse:
212 extends: .native_test_job_template
214 - job: build-system-opensuse
218 MAKE_CHECK_ARGS: check
220 avocado-system-opensuse:
221 extends: .avocado_test_job_template
223 - job: build-system-opensuse
227 MAKE_CHECK_ARGS: check-avocado
230 # This jobs explicitly disable TCG (--disable-tcg), KVM is detected by
231 # the configure script. The container doesn't contain Xen headers so
232 # Xen accelerator is not detected / selected. As result it build the
233 # i386-softmmu and x86_64-softmmu with KVM being the single accelerator
235 # Also use a different coroutine implementation (which is only really of
236 # interest to KVM users, i.e. with TCG disabled)
238 extends: .native_build_job_template
240 job: amd64-centos8-container
246 - ../configure --disable-tcg --audio-drv-list="" --with-coroutine=ucontext
247 --disable-docs --disable-sdl --disable-gtk --disable-vnc
248 || { cat config.log meson-logs/meson-log.txt && exit 1; }
251 - make check-qapi-schema
252 - cd tests/qemu-iotests/
253 - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
254 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
255 170 171 183 184 192 194 208 221 226 227 236 253 277 image-fleecing
256 - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122
257 124 132 139 142 144 145 151 152 155 157 165 194 196 200 202
258 208 209 216 218 227 234 246 247 248 250 254 255 257 258
259 260 261 262 263 264 270 272 273 277 279 image-fleecing
262 extends: .native_build_job_template
264 job: amd64-debian-user-cross-container
266 IMAGE: debian-all-test-cross
267 CONFIGURE_ARGS: --disable-tools --disable-system
268 MAKE_CHECK_ARGS: check-tcg
271 extends: .native_build_job_template
273 job: amd64-debian-user-cross-container
275 IMAGE: debian-all-test-cross
276 CONFIGURE_ARGS: --disable-tools --disable-system --static
277 MAKE_CHECK_ARGS: check-tcg
280 extends: .native_build_job_template
282 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
329 IMAGE: debian-all-test-cross
330 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --disable-system
331 --target-list-exclude=microblazeel-linux-user,aarch64_be-linux-user,i386-linux-user,m68k-linux-user,mipsn32el-linux-user,xtensaeb-linux-user
332 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
333 MAKE_CHECK_ARGS: check-unit check-tcg
335 # Set LD_JOBS=1 because this requires LTO and ld consumes a large amount of memory.
336 # On gitlab runners, default value sometimes end up calling 2 lds concurrently and
337 # triggers an Out-Of-Memory error
339 # Since slirp callbacks are used in QEMU Timers, we cannot use libslirp with
340 # CFI builds, and thus have to disable it here.
342 # Split in three sets of build/check/avocado to limit the execution time of each
345 extends: .native_build_job_template
347 - job: amd64-fedora-container
352 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
353 --enable-safe-stack --disable-slirp
354 TARGETS: aarch64-softmmu
355 MAKE_CHECK_ARGS: check-build
356 # FIXME: This job is often failing, likely due to out-of-memory problems in
357 # the constrained containers of the shared runners. Thus this is marked as
358 # skipped until the situation has been solved.
367 extends: .native_test_job_template
369 - job: build-cfi-aarch64
373 MAKE_CHECK_ARGS: check
376 extends: .avocado_test_job_template
378 - job: build-cfi-aarch64
382 MAKE_CHECK_ARGS: check-avocado
384 build-cfi-ppc64-s390x:
385 extends: .native_build_job_template
387 - job: amd64-fedora-container
392 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
393 --enable-safe-stack --disable-slirp
394 TARGETS: ppc64-softmmu s390x-softmmu
395 MAKE_CHECK_ARGS: check-build
396 # FIXME: This job is often failing, likely due to out-of-memory problems in
397 # the constrained containers of the shared runners. Thus this is marked as
398 # skipped until the situation has been solved.
406 check-cfi-ppc64-s390x:
407 extends: .native_test_job_template
409 - job: build-cfi-ppc64-s390x
413 MAKE_CHECK_ARGS: check
415 avocado-cfi-ppc64-s390x:
416 extends: .avocado_test_job_template
418 - job: build-cfi-ppc64-s390x
422 MAKE_CHECK_ARGS: check-avocado
425 extends: .native_build_job_template
427 - job: amd64-fedora-container
432 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
433 --enable-safe-stack --disable-slirp
434 TARGETS: x86_64-softmmu
435 MAKE_CHECK_ARGS: check-build
443 extends: .native_test_job_template
445 - job: build-cfi-x86_64
449 MAKE_CHECK_ARGS: check
452 extends: .avocado_test_job_template
454 - job: build-cfi-x86_64
458 MAKE_CHECK_ARGS: check-avocado
461 extends: .native_build_job_template
463 job: amd64-ubuntu2004-container
466 CONFIGURE_ARGS: --enable-tsan --cc=clang-10 --cxx=clang++-10
467 --enable-trace-backends=ust --enable-fdt=system --disable-slirp
468 TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
469 MAKE_CHECK_ARGS: bench V=1
471 # gprof/gcov are GCC features
473 extends: .native_build_job_template
475 job: amd64-ubuntu2004-container
478 CONFIGURE_ARGS: --enable-gprof --enable-gcov
479 TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
486 extends: .native_test_job_template
488 - job: build-gprof-gcov
492 MAKE_CHECK_ARGS: check
495 - gcovr --xml-pretty --exclude-unreachable-branches --print-summary
496 -o coverage.xml --root ${CI_PROJECT_DIR} . *.p
497 coverage: /^\s*lines:\s*\d+.\d+\%/
499 name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
503 coverage_format: cobertura
504 path: build/coverage.xml
507 extends: .native_build_job_template
509 job: amd64-fedora-container
513 - mkdir build-oss-fuzz
514 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
515 ./scripts/oss-fuzz/build.sh
516 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
517 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
519 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
520 echo Testing ${fuzzer} ... ;
521 "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
525 extends: .native_build_job_template
527 job: amd64-debian-user-cross-container
529 IMAGE: debian-all-test-cross
531 - TARGETS="aarch64 alpha arm hppa m68k microblaze ppc64 s390x x86_64"
534 - ../configure --enable-tcg-interpreter --disable-docs --disable-gtk --disable-vnc
535 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)"
536 || { 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
579 --disable-qom-cast-debug
581 TARGETS: avr-softmmu i386-softmmu mips64-softmmu s390x-softmmu sh4-softmmu
582 sparc64-softmmu hexagon-linux-user i386-linux-user s390x-linux-user
583 MAKE_CHECK_ARGS: check-unit check-qtest SPEED=slow
586 extends: .base_job_template
588 image: $CI_REGISTRY_IMAGE/qemu/fedora:latest
590 job: amd64-fedora-container
592 - mkdir subprojects/libvhost-user/build
593 - cd subprojects/libvhost-user/build
597 # No targets are built here, just tools, docs, and unit tests. This
598 # also feeds into the eventual documentation deployment steps later
599 build-tools-and-docs-debian:
600 extends: .native_build_job_template
602 job: amd64-debian-container
603 # when running on 'master' we use pre-existing container
607 MAKE_CHECK_ARGS: check-unit ctags TAGS cscope
608 CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
615 # Prepare for GitLab pages deployment. Anything copied into the
616 # "public" directory will be deployed to $USER.gitlab.io/$PROJECT
618 # GitLab publishes from any branch that triggers a CI pipeline
620 # For the main repo we don't want to publish from 'staging'
621 # since that content may not be pushed, nor do we wish to
622 # publish from 'stable-NNN' branches as that content is outdated.
623 # Thus we restrict to just the default branch
625 # For contributor forks we want to publish from any repo so
626 # that users can see the results of their commits, regardless
627 # of what topic branch they're currently using
629 extends: .base_job_template
630 image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:latest
633 - job: build-tools-and-docs-debian
636 # HTML-ised source tree
638 - htags -anT --tree-view=filetree -m qemu_init
639 -t "Welcome to the QEMU sourcecode"
641 # Project documentation
642 - make -C build install DESTDIR=$(pwd)/temp-install
643 - mv temp-install/usr/local/share/doc/qemu/* public/