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: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
13 microblazeel-softmmu mips64el-softmmu
14 MAKE_CHECK_ARGS: check-build
15 CONFIGURE_ARGS: --enable-docs --enable-trace-backends=log,simple,syslog
18 extends: .native_test_job_template
20 - job: build-system-alpine
24 MAKE_CHECK_ARGS: check-unit check-qtest
26 avocado-system-alpine:
27 extends: .avocado_test_job_template
29 - job: build-system-alpine
33 MAKE_CHECK_ARGS: check-avocado
37 - .native_build_job_template
38 - .native_build_artifact_template
40 job: amd64-ubuntu2204-container
43 CONFIGURE_ARGS: --enable-docs
44 TARGETS: alpha-softmmu cris-softmmu hppa-softmmu
45 microblazeel-softmmu mips64el-softmmu
46 MAKE_CHECK_ARGS: check-build
49 extends: .native_test_job_template
51 - job: build-system-ubuntu
55 MAKE_CHECK_ARGS: check
57 avocado-system-ubuntu:
58 extends: .avocado_test_job_template
60 - job: build-system-ubuntu
64 MAKE_CHECK_ARGS: check-avocado
68 - .native_build_job_template
69 - .native_build_artifact_template
71 job: amd64-debian-container
74 CONFIGURE_ARGS: --with-coroutine=sigaltstack
75 TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu
76 riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu
77 MAKE_CHECK_ARGS: check-build
80 extends: .native_test_job_template
82 - job: build-system-debian
86 MAKE_CHECK_ARGS: check
88 avocado-system-debian:
89 extends: .avocado_test_job_template
91 - job: build-system-debian
95 MAKE_CHECK_ARGS: check-avocado
98 extends: .native_test_job_template
100 - job: build-system-debian
107 - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-i386
111 - .native_build_job_template
112 - .native_build_artifact_template
114 job: amd64-fedora-container
117 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs
118 TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
119 xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
120 MAKE_CHECK_ARGS: check-build
123 extends: .native_test_job_template
125 - job: build-system-fedora
129 MAKE_CHECK_ARGS: check
131 avocado-system-fedora:
132 extends: .avocado_test_job_template
134 - job: build-system-fedora
138 MAKE_CHECK_ARGS: check-avocado
141 extends: .native_test_job_template
143 - job: build-system-fedora
150 - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-ppc
151 - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-riscv32
155 - .native_build_job_template
156 - .native_build_artifact_template
158 job: amd64-centos8-container
161 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-vfio-user-server
162 --enable-modules --enable-trace-backends=dtrace --enable-docs
163 TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
164 x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
165 MAKE_CHECK_ARGS: check-build
168 extends: .native_test_job_template
170 - job: build-system-centos
174 MAKE_CHECK_ARGS: check
176 avocado-system-centos:
177 extends: .avocado_test_job_template
179 - job: build-system-centos
183 MAKE_CHECK_ARGS: check-avocado
185 build-system-opensuse:
187 - .native_build_job_template
188 - .native_build_artifact_template
190 job: amd64-opensuse-leap-container
193 TARGETS: s390x-softmmu x86_64-softmmu aarch64-softmmu
194 MAKE_CHECK_ARGS: check-build
196 check-system-opensuse:
197 extends: .native_test_job_template
199 - job: build-system-opensuse
203 MAKE_CHECK_ARGS: check
205 avocado-system-opensuse:
206 extends: .avocado_test_job_template
208 - job: build-system-opensuse
212 MAKE_CHECK_ARGS: check-avocado
215 # This jobs explicitly disable TCG (--disable-tcg), KVM is detected by
216 # the configure script. The container doesn't contain Xen headers so
217 # Xen accelerator is not detected / selected. As result it build the
218 # i386-softmmu and x86_64-softmmu with KVM being the single accelerator
220 # Also use a different coroutine implementation (which is only really of
221 # interest to KVM users, i.e. with TCG disabled)
223 extends: .native_build_job_template
225 job: amd64-centos8-container
231 - ../configure --disable-tcg --audio-drv-list="" --with-coroutine=ucontext
232 --disable-docs --disable-sdl --disable-gtk --disable-vnc
233 || { cat config.log meson-logs/meson-log.txt && exit 1; }
236 - make check-qapi-schema
237 - cd tests/qemu-iotests/
238 - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
239 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
240 170 171 183 184 192 194 208 221 226 227 236 253 277 image-fleecing
241 - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122
242 124 132 139 142 144 145 151 152 155 157 165 194 196 200 202
243 208 209 216 218 227 234 246 247 248 250 254 255 257 258
244 260 261 262 263 264 270 272 273 277 279 image-fleecing
247 extends: .native_build_job_template
249 job: amd64-debian-user-cross-container
251 IMAGE: debian-all-test-cross
252 CONFIGURE_ARGS: --disable-tools --disable-system
253 MAKE_CHECK_ARGS: check-tcg
256 extends: .native_build_job_template
258 job: amd64-debian-user-cross-container
260 IMAGE: debian-all-test-cross
261 CONFIGURE_ARGS: --disable-tools --disable-system --static
262 MAKE_CHECK_ARGS: check-tcg
265 extends: .native_build_job_template
267 job: hexagon-cross-container
269 IMAGE: debian-hexagon-cross
270 TARGETS: hexagon-linux-user
271 CONFIGURE_ARGS: --disable-tools --disable-docs --enable-debug-tcg
272 MAKE_CHECK_ARGS: check-tcg
274 # Only build the softmmu targets we have check-tcg tests for
276 extends: .native_build_job_template
278 job: amd64-debian-user-cross-container
280 IMAGE: debian-all-test-cross
281 CONFIGURE_ARGS: --disable-tools --enable-debug
282 TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
283 MAKE_CHECK_ARGS: check-tcg
285 # We build tricore in a very minimal tricore only container
286 build-tricore-softmmu:
287 extends: .native_build_job_template
289 job: tricore-debian-cross-container
291 IMAGE: debian-tricore-cross
292 CONFIGURE_ARGS: --disable-tools --disable-fdt --enable-debug
293 TARGETS: tricore-softmmu
294 MAKE_CHECK_ARGS: check-tcg
297 extends: .native_build_job_template
299 job: amd64-fedora-container
302 CONFIGURE_ARGS: --cc=clang --cxx=clang++
303 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
304 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu s390x-softmmu
305 MAKE_CHECK_ARGS: check-qtest check-tcg
308 extends: .native_build_job_template
310 job: amd64-debian-user-cross-container
313 IMAGE: debian-all-test-cross
314 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --disable-system
315 --target-list-exclude=microblazeel-linux-user,aarch64_be-linux-user,i386-linux-user,m68k-linux-user,mipsn32el-linux-user,xtensaeb-linux-user
316 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
317 MAKE_CHECK_ARGS: check-unit check-tcg
319 # Set LD_JOBS=1 because this requires LTO and ld consumes a large amount of memory.
320 # On gitlab runners, default value sometimes end up calling 2 lds concurrently and
321 # triggers an Out-Of-Memory error
323 # Since slirp callbacks are used in QEMU Timers, we cannot use libslirp with
324 # CFI builds, and thus have to disable it here.
326 # Split in three sets of build/check/avocado to limit the execution time of each
330 - .native_build_job_template
331 - .native_build_artifact_template
333 - job: amd64-fedora-container
338 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
339 --enable-safe-stack --disable-slirp
340 TARGETS: aarch64-softmmu
341 MAKE_CHECK_ARGS: check-build
342 # FIXME: This job is often failing, likely due to out-of-memory problems in
343 # the constrained containers of the shared runners. Thus this is marked as
344 # skipped until the situation has been solved.
349 extends: .native_test_job_template
351 - job: build-cfi-aarch64
355 MAKE_CHECK_ARGS: check
358 extends: .avocado_test_job_template
360 - job: build-cfi-aarch64
364 MAKE_CHECK_ARGS: check-avocado
366 build-cfi-ppc64-s390x:
368 - .native_build_job_template
369 - .native_build_artifact_template
371 - job: amd64-fedora-container
376 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
377 --enable-safe-stack --disable-slirp
378 TARGETS: ppc64-softmmu s390x-softmmu
379 MAKE_CHECK_ARGS: check-build
380 # FIXME: This job is often failing, likely due to out-of-memory problems in
381 # the constrained containers of the shared runners. Thus this is marked as
382 # skipped until the situation has been solved.
386 check-cfi-ppc64-s390x:
387 extends: .native_test_job_template
389 - job: build-cfi-ppc64-s390x
393 MAKE_CHECK_ARGS: check
395 avocado-cfi-ppc64-s390x:
396 extends: .avocado_test_job_template
398 - job: build-cfi-ppc64-s390x
402 MAKE_CHECK_ARGS: check-avocado
406 - .native_build_job_template
407 - .native_build_artifact_template
409 - job: amd64-fedora-container
414 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
415 --enable-safe-stack --disable-slirp
416 TARGETS: x86_64-softmmu
417 MAKE_CHECK_ARGS: check-build
421 extends: .native_test_job_template
423 - job: build-cfi-x86_64
427 MAKE_CHECK_ARGS: check
430 extends: .avocado_test_job_template
432 - job: build-cfi-x86_64
436 MAKE_CHECK_ARGS: check-avocado
439 extends: .native_build_job_template
441 job: amd64-ubuntu2204-container
444 CONFIGURE_ARGS: --enable-tsan --cc=clang --cxx=clang++
445 --enable-trace-backends=ust --disable-slirp
446 TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
448 # gcov is a GCC features
450 extends: .native_build_job_template
452 job: amd64-ubuntu2204-container
456 CONFIGURE_ARGS: --enable-gcov
457 TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
458 MAKE_CHECK_ARGS: check
461 - gcovr --xml-pretty --exclude-unreachable-branches --print-summary
462 -o coverage.xml --root ${CI_PROJECT_DIR} . *.p
463 coverage: /^\s*lines:\s*\d+.\d+\%/
465 name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
469 coverage_format: cobertura
470 path: build/coverage.xml
473 extends: .native_build_job_template
475 job: amd64-fedora-container
479 - mkdir build-oss-fuzz
480 - export LSAN_OPTIONS=suppressions=scripts/oss-fuzz/lsan_suppressions.txt
481 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
482 ./scripts/oss-fuzz/build.sh
483 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
484 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
486 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
487 echo Testing ${fuzzer} ... ;
488 "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
492 extends: .native_build_job_template
494 job: amd64-debian-user-cross-container
496 IMAGE: debian-all-test-cross
498 - TARGETS="aarch64 alpha arm hppa m68k microblaze ppc64 s390x x86_64"
501 - ../configure --enable-tcg-interpreter --disable-docs --disable-gtk --disable-vnc
502 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)"
503 || { cat config.log meson-logs/meson-log.txt && exit 1; }
505 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
506 - for tg in $TARGETS ; do
507 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
508 ./tests/qtest/boot-serial-test || exit 1 ;
509 ./tests/qtest/cdrom-test || exit 1 ;
511 - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
512 - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
515 # Check our reduced build configurations
516 build-without-defaults:
517 extends: .native_build_job_template
519 job: amd64-centos8-container
523 --without-default-devices
524 --without-default-features
527 --disable-qom-cast-debug
529 TARGETS: avr-softmmu mips64-softmmu s390x-softmmu sh4-softmmu
530 sparc64-softmmu hexagon-linux-user i386-linux-user s390x-linux-user
531 MAKE_CHECK_ARGS: check-unit check-qtest-avr check-qtest-mips64
534 extends: .base_job_template
536 image: $CI_REGISTRY_IMAGE/qemu/fedora:latest
538 job: amd64-fedora-container
540 - mkdir subprojects/libvhost-user/build
541 - cd subprojects/libvhost-user/build
545 # No targets are built here, just tools, docs, and unit tests. This
546 # also feeds into the eventual documentation deployment steps later
547 build-tools-and-docs-debian:
549 - .native_build_job_template
550 - .native_build_artifact_template
552 job: amd64-debian-container
553 # when running on 'master' we use pre-existing container
557 MAKE_CHECK_ARGS: check-unit ctags TAGS cscope
558 CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
561 # Prepare for GitLab pages deployment. Anything copied into the
562 # "public" directory will be deployed to $USER.gitlab.io/$PROJECT
564 # GitLab publishes from any branch that triggers a CI pipeline
566 # For the main repo we don't want to publish from 'staging'
567 # since that content may not be pushed, nor do we wish to
568 # publish from 'stable-NNN' branches as that content is outdated.
569 # Thus we restrict to just the default branch
571 # For contributor forks we want to publish from any repo so
572 # that users can see the results of their commits, regardless
573 # of what topic branch they're currently using
575 extends: .base_job_template
576 image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:latest
579 - job: build-tools-and-docs-debian
582 # HTML-ised source tree
584 - htags -anT --tree-view=filetree -m qemu_init
585 -t "Welcome to the QEMU sourcecode"
587 # Project documentation
588 - make -C build install DESTDIR=$(pwd)/temp-install
589 - mv temp-install/usr/local/share/doc/qemu/* public/