2 - local: '/.gitlab-ci.d/buildtest-template.yml'
6 - .native_build_job_template
7 - .native_build_artifact_template
9 - job: amd64-alpine-container
12 TARGETS: avr-softmmu loongarch64-softmmu mips64-softmmu mipsel-softmmu
13 MAKE_CHECK_ARGS: check-build
14 CONFIGURE_ARGS: --enable-docs --enable-trace-backends=log,simple,syslog
17 extends: .native_test_job_template
19 - job: build-system-alpine
23 MAKE_CHECK_ARGS: check-unit check-qtest
25 avocado-system-alpine:
26 extends: .avocado_test_job_template
28 - job: build-system-alpine
32 MAKE_CHECK_ARGS: check-avocado
36 - .native_build_job_template
37 - .native_build_artifact_template
39 job: amd64-ubuntu2204-container
42 CONFIGURE_ARGS: --enable-docs
43 TARGETS: alpha-softmmu cris-softmmu hppa-softmmu
44 microblazeel-softmmu mips64el-softmmu
45 MAKE_CHECK_ARGS: check-build
48 extends: .native_test_job_template
50 - job: build-system-ubuntu
54 MAKE_CHECK_ARGS: check
56 avocado-system-ubuntu:
57 extends: .avocado_test_job_template
59 - job: build-system-ubuntu
63 MAKE_CHECK_ARGS: check-avocado
67 - .native_build_job_template
68 - .native_build_artifact_template
70 job: amd64-debian-container
73 CONFIGURE_ARGS: --with-coroutine=sigaltstack
74 TARGETS: arm-softmmu i386-softmmu riscv64-softmmu sh4eb-softmmu
75 sparc-softmmu xtensaeb-softmmu
76 MAKE_CHECK_ARGS: check-build
79 extends: .native_test_job_template
81 - job: build-system-debian
85 MAKE_CHECK_ARGS: check
87 avocado-system-debian:
88 extends: .avocado_test_job_template
90 - job: build-system-debian
94 MAKE_CHECK_ARGS: check-avocado
97 extends: .native_test_job_template
99 - job: build-system-debian
105 - make NINJA=":" check-venv
106 - tests/venv/bin/python3 scripts/device-crash-test -q --tcg-only ./qemu-system-i386
110 - .native_build_job_template
111 - .native_build_artifact_template
113 job: amd64-fedora-container
116 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs
117 TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
118 xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
119 MAKE_CHECK_ARGS: check-build
122 extends: .native_test_job_template
124 - job: build-system-fedora
128 MAKE_CHECK_ARGS: check
130 avocado-system-fedora:
131 extends: .avocado_test_job_template
133 - job: build-system-fedora
137 MAKE_CHECK_ARGS: check-avocado
140 extends: .native_test_job_template
142 - job: build-system-fedora
148 - make NINJA=":" check-venv
149 - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-ppc
150 - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-riscv32
154 - .native_build_job_template
155 - .native_build_artifact_template
157 job: amd64-centos8-container
160 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-vfio-user-server
161 --enable-modules --enable-trace-backends=dtrace --enable-docs
162 TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
163 x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
164 MAKE_CHECK_ARGS: check-build
167 extends: .native_test_job_template
169 - job: build-system-centos
173 MAKE_CHECK_ARGS: check
175 avocado-system-centos:
176 extends: .avocado_test_job_template
178 - job: build-system-centos
182 MAKE_CHECK_ARGS: check-avocado
184 build-system-opensuse:
186 - .native_build_job_template
187 - .native_build_artifact_template
189 job: amd64-opensuse-leap-container
192 TARGETS: s390x-softmmu x86_64-softmmu aarch64-softmmu
193 MAKE_CHECK_ARGS: check-build
195 check-system-opensuse:
196 extends: .native_test_job_template
198 - job: build-system-opensuse
202 MAKE_CHECK_ARGS: check
204 avocado-system-opensuse:
205 extends: .avocado_test_job_template
207 - job: build-system-opensuse
211 MAKE_CHECK_ARGS: check-avocado
214 # This jobs explicitly disable TCG (--disable-tcg), KVM is detected by
215 # the configure script. The container doesn't contain Xen headers so
216 # Xen accelerator is not detected / selected. As result it build the
217 # i386-softmmu and x86_64-softmmu with KVM being the single accelerator
219 # Also use a different coroutine implementation (which is only really of
220 # interest to KVM users, i.e. with TCG disabled)
222 extends: .native_build_job_template
224 job: amd64-centos8-container
230 - ../configure --disable-tcg --audio-drv-list="" --with-coroutine=ucontext
231 --disable-docs --disable-sdl --disable-gtk --disable-vnc
232 || { cat config.log meson-logs/meson-log.txt && exit 1; }
235 - make check-qapi-schema
236 - cd tests/qemu-iotests/
237 - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
238 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
239 170 171 183 184 192 194 208 221 226 227 236 253 277 image-fleecing
240 - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122
241 124 132 139 142 144 145 151 152 155 157 165 194 196 200 202
242 208 209 216 218 227 234 246 247 248 250 254 255 257 258
243 260 261 262 263 264 270 272 273 277 279 image-fleecing
246 extends: .native_build_job_template
248 job: amd64-debian-user-cross-container
250 IMAGE: debian-all-test-cross
251 CONFIGURE_ARGS: --disable-tools --disable-system
252 MAKE_CHECK_ARGS: check-tcg
255 extends: .native_build_job_template
257 job: amd64-debian-user-cross-container
259 IMAGE: debian-all-test-cross
260 CONFIGURE_ARGS: --disable-tools --disable-system --static
261 MAKE_CHECK_ARGS: check-tcg
264 extends: .native_build_job_template
266 job: hexagon-cross-container
268 IMAGE: debian-hexagon-cross
269 TARGETS: hexagon-linux-user
270 CONFIGURE_ARGS: --disable-tools --disable-docs --enable-debug-tcg
271 MAKE_CHECK_ARGS: check-tcg
273 # Only build the softmmu targets we have check-tcg tests for
275 extends: .native_build_job_template
277 job: amd64-debian-user-cross-container
279 IMAGE: debian-all-test-cross
280 CONFIGURE_ARGS: --disable-tools --enable-debug
281 TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
282 MAKE_CHECK_ARGS: check-tcg
284 # We build tricore in a very minimal tricore only container
285 build-tricore-softmmu:
286 extends: .native_build_job_template
288 job: tricore-debian-cross-container
290 IMAGE: debian-tricore-cross
291 CONFIGURE_ARGS: --disable-tools --disable-fdt --enable-debug
292 TARGETS: tricore-softmmu
293 MAKE_CHECK_ARGS: check-tcg
296 extends: .native_build_job_template
298 job: amd64-fedora-container
301 CONFIGURE_ARGS: --cc=clang --cxx=clang++
302 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
303 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu s390x-softmmu
304 MAKE_CHECK_ARGS: check-qtest check-tcg
307 extends: .native_build_job_template
309 job: amd64-debian-user-cross-container
312 IMAGE: debian-all-test-cross
313 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --disable-system
314 --target-list-exclude=microblazeel-linux-user,aarch64_be-linux-user,i386-linux-user,m68k-linux-user,mipsn32el-linux-user,xtensaeb-linux-user
315 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
316 MAKE_CHECK_ARGS: check-unit check-tcg
318 # Set LD_JOBS=1 because this requires LTO and ld consumes a large amount of memory.
319 # On gitlab runners, default value sometimes end up calling 2 lds concurrently and
320 # triggers an Out-Of-Memory error
322 # Since slirp callbacks are used in QEMU Timers, we cannot use libslirp with
323 # CFI builds, and thus have to disable it here.
325 # Split in three sets of build/check/avocado to limit the execution time of each
329 - .native_build_job_template
330 - .native_build_artifact_template
332 - job: amd64-fedora-container
337 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
338 --enable-safe-stack --disable-slirp
339 TARGETS: aarch64-softmmu
340 MAKE_CHECK_ARGS: check-build
341 # FIXME: This job is often failing, likely due to out-of-memory problems in
342 # the constrained containers of the shared runners. Thus this is marked as
343 # skipped until the situation has been solved.
348 extends: .native_test_job_template
350 - job: build-cfi-aarch64
354 MAKE_CHECK_ARGS: check
357 extends: .avocado_test_job_template
359 - job: build-cfi-aarch64
363 MAKE_CHECK_ARGS: check-avocado
365 build-cfi-ppc64-s390x:
367 - .native_build_job_template
368 - .native_build_artifact_template
370 - job: amd64-fedora-container
375 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
376 --enable-safe-stack --disable-slirp
377 TARGETS: ppc64-softmmu s390x-softmmu
378 MAKE_CHECK_ARGS: check-build
379 # FIXME: This job is often failing, likely due to out-of-memory problems in
380 # the constrained containers of the shared runners. Thus this is marked as
381 # skipped until the situation has been solved.
385 check-cfi-ppc64-s390x:
386 extends: .native_test_job_template
388 - job: build-cfi-ppc64-s390x
392 MAKE_CHECK_ARGS: check
394 avocado-cfi-ppc64-s390x:
395 extends: .avocado_test_job_template
397 - job: build-cfi-ppc64-s390x
401 MAKE_CHECK_ARGS: check-avocado
405 - .native_build_job_template
406 - .native_build_artifact_template
408 - job: amd64-fedora-container
413 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
414 --enable-safe-stack --disable-slirp
415 TARGETS: x86_64-softmmu
416 MAKE_CHECK_ARGS: check-build
420 extends: .native_test_job_template
422 - job: build-cfi-x86_64
426 MAKE_CHECK_ARGS: check
429 extends: .avocado_test_job_template
431 - job: build-cfi-x86_64
435 MAKE_CHECK_ARGS: check-avocado
438 extends: .native_build_job_template
440 job: amd64-ubuntu2204-container
443 CONFIGURE_ARGS: --enable-tsan --cc=clang --cxx=clang++
444 --enable-trace-backends=ust --disable-slirp
445 TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
447 # gcov is a GCC features
449 extends: .native_build_job_template
451 job: amd64-ubuntu2204-container
455 CONFIGURE_ARGS: --enable-gcov
456 TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
457 MAKE_CHECK_ARGS: check-unit check-softfloat
460 - gcovr --xml-pretty --exclude-unreachable-branches --print-summary
461 -o coverage.xml --root ${CI_PROJECT_DIR} . *.p
462 coverage: /^\s*lines:\s*\d+.\d+\%/
464 name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
468 - build/meson-logs/testlog.txt
470 junit: build/meson-logs/testlog.junit.xml
472 coverage_format: cobertura
473 path: build/coverage.xml
476 extends: .native_build_job_template
478 job: amd64-fedora-container
482 - mkdir build-oss-fuzz
483 - export LSAN_OPTIONS=suppressions=scripts/oss-fuzz/lsan_suppressions.txt
484 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
485 ./scripts/oss-fuzz/build.sh
486 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
487 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
489 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
490 echo Testing ${fuzzer} ... ;
491 "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
495 extends: .native_build_job_template
497 job: amd64-debian-user-cross-container
499 IMAGE: debian-all-test-cross
501 - TARGETS="aarch64 alpha arm hppa m68k microblaze ppc64 s390x x86_64"
504 - ../configure --enable-tcg-interpreter --disable-docs --disable-gtk --disable-vnc
505 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)"
506 || { cat config.log meson-logs/meson-log.txt && exit 1; }
508 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
509 - for tg in $TARGETS ; do
510 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
511 ./tests/qtest/boot-serial-test || exit 1 ;
512 ./tests/qtest/cdrom-test || exit 1 ;
514 - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
515 - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
518 # Check our reduced build configurations
519 build-without-defaults:
520 extends: .native_build_job_template
522 job: amd64-centos8-container
526 --without-default-devices
527 --without-default-features
530 --disable-qom-cast-debug
532 TARGETS: avr-softmmu mips64-softmmu s390x-softmmu sh4-softmmu
533 sparc64-softmmu hexagon-linux-user i386-linux-user s390x-linux-user
534 MAKE_CHECK_ARGS: check
537 extends: .base_job_template
539 image: $CI_REGISTRY_IMAGE/qemu/fedora:$QEMU_CI_CONTAINER_TAG
541 job: amd64-fedora-container
543 - mkdir subprojects/libvhost-user/build
544 - cd subprojects/libvhost-user/build
548 # No targets are built here, just tools, docs, and unit tests. This
549 # also feeds into the eventual documentation deployment steps later
550 build-tools-and-docs-debian:
552 - .native_build_job_template
553 - .native_build_artifact_template
555 job: amd64-debian-container
556 # when running on 'master' we use pre-existing container
560 MAKE_CHECK_ARGS: check-unit ctags TAGS cscope
561 CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
564 # Prepare for GitLab pages deployment. Anything copied into the
565 # "public" directory will be deployed to $USER.gitlab.io/$PROJECT
567 # GitLab publishes from any branch that triggers a CI pipeline
569 # For the main repo we don't want to publish from 'staging'
570 # since that content may not be pushed, nor do we wish to
571 # publish from 'stable-NNN' branches as that content is outdated.
572 # Thus we restrict to just the default branch
574 # For contributor forks we want to publish from any repo so
575 # that users can see the results of their commits, regardless
576 # of what topic branch they're currently using
578 extends: .base_job_template
579 image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:$QEMU_CI_CONTAINER_TAG
582 - job: build-tools-and-docs-debian
585 # HTML-ised source tree
587 - htags -anT --tree-view=filetree -m qemu_init
588 -t "Welcome to the QEMU sourcecode"
590 # Project documentation
591 - make -C build install DESTDIR=$(pwd)/temp-install
592 - mv temp-install/usr/local/share/doc/qemu/* public/