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
106 - tests/venv/bin/python3 scripts/device-crash-test -q ./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
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
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 coverage_format: cobertura
469 path: build/coverage.xml
472 extends: .native_build_job_template
474 job: amd64-fedora-container
478 - mkdir build-oss-fuzz
479 - export LSAN_OPTIONS=suppressions=scripts/oss-fuzz/lsan_suppressions.txt
480 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
481 ./scripts/oss-fuzz/build.sh
482 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
483 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
485 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
486 echo Testing ${fuzzer} ... ;
487 "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
491 extends: .native_build_job_template
493 job: amd64-debian-user-cross-container
495 IMAGE: debian-all-test-cross
497 - TARGETS="aarch64 alpha arm hppa m68k microblaze ppc64 s390x x86_64"
500 - ../configure --enable-tcg-interpreter --disable-docs --disable-gtk --disable-vnc
501 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)"
502 || { cat config.log meson-logs/meson-log.txt && exit 1; }
504 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
505 - for tg in $TARGETS ; do
506 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
507 ./tests/qtest/boot-serial-test || exit 1 ;
508 ./tests/qtest/cdrom-test || exit 1 ;
510 - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
511 - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
514 # Check our reduced build configurations
515 build-without-defaults:
516 extends: .native_build_job_template
518 job: amd64-centos8-container
522 --without-default-devices
523 --without-default-features
526 --disable-qom-cast-debug
528 TARGETS: avr-softmmu mips64-softmmu s390x-softmmu sh4-softmmu
529 sparc64-softmmu hexagon-linux-user i386-linux-user s390x-linux-user
530 MAKE_CHECK_ARGS: check-unit check-qtest-avr check-qtest-mips64
533 extends: .base_job_template
535 image: $CI_REGISTRY_IMAGE/qemu/fedora:latest
537 job: amd64-fedora-container
539 - mkdir subprojects/libvhost-user/build
540 - cd subprojects/libvhost-user/build
544 # No targets are built here, just tools, docs, and unit tests. This
545 # also feeds into the eventual documentation deployment steps later
546 build-tools-and-docs-debian:
548 - .native_build_job_template
549 - .native_build_artifact_template
551 job: amd64-debian-container
552 # when running on 'master' we use pre-existing container
556 MAKE_CHECK_ARGS: check-unit ctags TAGS cscope
557 CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
560 # Prepare for GitLab pages deployment. Anything copied into the
561 # "public" directory will be deployed to $USER.gitlab.io/$PROJECT
563 # GitLab publishes from any branch that triggers a CI pipeline
565 # For the main repo we don't want to publish from 'staging'
566 # since that content may not be pushed, nor do we wish to
567 # publish from 'stable-NNN' branches as that content is outdated.
568 # Thus we restrict to just the default branch
570 # For contributor forks we want to publish from any repo so
571 # that users can see the results of their commits, regardless
572 # of what topic branch they're currently using
574 extends: .base_job_template
575 image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:latest
578 - job: build-tools-and-docs-debian
581 # HTML-ised source tree
583 - htags -anT --tree-view=filetree -m qemu_init
584 -t "Welcome to the QEMU sourcecode"
586 # Project documentation
587 - make -C build install DESTDIR=$(pwd)/temp-install
588 - mv temp-install/usr/local/share/doc/qemu/* public/