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
46 TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
47 microblazeel-softmmu mips64el-softmmu
48 MAKE_CHECK_ARGS: check-build
55 extends: .native_test_job_template
57 - job: build-system-ubuntu
61 MAKE_CHECK_ARGS: check
63 avocado-system-ubuntu:
64 extends: .avocado_test_job_template
66 - job: build-system-ubuntu
70 MAKE_CHECK_ARGS: check-avocado
73 extends: .native_build_job_template
75 job: amd64-debian-container
78 TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu
79 riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu
80 MAKE_CHECK_ARGS: check-build
87 extends: .native_test_job_template
89 - job: build-system-debian
93 MAKE_CHECK_ARGS: check
95 avocado-system-debian:
96 extends: .avocado_test_job_template
98 - job: build-system-debian
102 MAKE_CHECK_ARGS: check-avocado
105 extends: .native_test_job_template
107 - job: build-system-debian
114 - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-i386
117 extends: .native_build_job_template
119 job: amd64-fedora-container
122 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs
123 --enable-fdt=system --enable-slirp=system --enable-capstone
124 TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
125 xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
126 MAKE_CHECK_ARGS: check-build
133 extends: .native_test_job_template
135 - job: build-system-fedora
139 MAKE_CHECK_ARGS: check
141 avocado-system-fedora:
142 extends: .avocado_test_job_template
144 - job: build-system-fedora
148 MAKE_CHECK_ARGS: check-avocado
151 extends: .native_test_job_template
153 - job: build-system-fedora
160 - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-ppc
161 - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-riscv32
164 extends: .native_build_job_template
166 job: amd64-centos8-container
169 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-fdt=system
170 --enable-modules --enable-trace-backends=dtrace --enable-docs
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 || { cat config.log meson-logs/meson-log.txt && exit 1; }
250 - make check-qapi-schema
251 - cd tests/qemu-iotests/
252 - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
253 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
254 170 171 183 184 192 194 208 221 226 227 236 253 277 image-fleecing
255 - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122
256 124 132 139 142 144 145 151 152 155 157 165 194 196 200 202
257 208 209 216 218 227 234 246 247 248 250 254 255 257 258
258 260 261 262 263 264 270 272 273 277 279 image-fleecing
261 extends: .native_build_job_template
263 job: amd64-debian-user-cross-container
265 IMAGE: debian-all-test-cross
266 CONFIGURE_ARGS: --disable-tools --disable-system
267 MAKE_CHECK_ARGS: check-tcg
270 extends: .native_build_job_template
272 job: amd64-debian-user-cross-container
274 IMAGE: debian-all-test-cross
275 CONFIGURE_ARGS: --disable-tools --disable-system --static
276 MAKE_CHECK_ARGS: check-tcg
278 # Because the hexagon cross-compiler takes so long to build we don't rely
279 # on the CI system to build it and hence this job has an optional dependency
280 # declared. The image is manually uploaded.
282 extends: .native_build_job_template
284 job: hexagon-cross-container
287 IMAGE: debian-hexagon-cross
288 TARGETS: hexagon-linux-user
289 CONFIGURE_ARGS: --disable-tools --disable-docs --enable-debug-tcg
290 MAKE_CHECK_ARGS: check-tcg
292 # Only build the softmmu targets we have check-tcg tests for
294 extends: .native_build_job_template
296 job: amd64-debian-user-cross-container
298 IMAGE: debian-all-test-cross
299 CONFIGURE_ARGS: --disable-tools --enable-debug
300 TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
301 MAKE_CHECK_ARGS: check-tcg
303 # We build tricore in a very minimal tricore only container
304 build-tricore-softmmu:
305 extends: .native_build_job_template
307 job: tricore-debian-cross-container
309 IMAGE: debian-tricore-cross
310 CONFIGURE_ARGS: --disable-tools --disable-fdt --enable-debug
311 TARGETS: tricore-softmmu
312 MAKE_CHECK_ARGS: check-tcg
315 extends: .native_build_job_template
317 job: amd64-fedora-container
320 CONFIGURE_ARGS: --cc=clang --cxx=clang++
321 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
322 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
323 ppc-softmmu s390x-softmmu
324 MAKE_CHECK_ARGS: check-qtest check-tcg
327 extends: .native_build_job_template
329 job: amd64-debian-user-cross-container
331 IMAGE: debian-all-test-cross
332 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --disable-system
333 --target-list-exclude=microblazeel-linux-user,aarch64_be-linux-user,i386-linux-user,m68k-linux-user,mipsn32el-linux-user,xtensaeb-linux-user
334 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
335 MAKE_CHECK_ARGS: check-unit check-tcg
337 # Set LD_JOBS=1 because this requires LTO and ld consumes a large amount of memory.
338 # On gitlab runners, default value sometimes end up calling 2 lds concurrently and
339 # triggers an Out-Of-Memory error
341 # Since slirp callbacks are used in QEMU Timers, slirp needs to be compiled together
342 # with QEMU and linked as a static library to avoid false positives in CFI checks.
343 # This can be accomplished by using -enable-slirp=git, which avoids the use of
344 # a system-wide version of the library
346 # Split in three sets of build/check/avocado to limit the execution time of each
349 extends: .native_build_job_template
351 - job: amd64-fedora-container
356 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
357 --enable-safe-stack --enable-slirp=git
358 TARGETS: aarch64-softmmu
359 MAKE_CHECK_ARGS: check-build
360 # FIXME: This job is often failing, likely due to out-of-memory problems in
361 # the constrained containers of the shared runners. Thus this is marked as
362 # skipped until the situation has been solved.
371 extends: .native_test_job_template
373 - job: build-cfi-aarch64
377 MAKE_CHECK_ARGS: check
380 extends: .avocado_test_job_template
382 - job: build-cfi-aarch64
386 MAKE_CHECK_ARGS: check-avocado
388 build-cfi-ppc64-s390x:
389 extends: .native_build_job_template
391 - job: amd64-fedora-container
396 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
397 --enable-safe-stack --enable-slirp=git
398 TARGETS: ppc64-softmmu s390x-softmmu
399 MAKE_CHECK_ARGS: check-build
400 # FIXME: This job is often failing, likely due to out-of-memory problems in
401 # the constrained containers of the shared runners. Thus this is marked as
402 # skipped until the situation has been solved.
410 check-cfi-ppc64-s390x:
411 extends: .native_test_job_template
413 - job: build-cfi-ppc64-s390x
417 MAKE_CHECK_ARGS: check
419 avocado-cfi-ppc64-s390x:
420 extends: .avocado_test_job_template
422 - job: build-cfi-ppc64-s390x
426 MAKE_CHECK_ARGS: check-avocado
429 extends: .native_build_job_template
431 - job: amd64-fedora-container
436 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
437 --enable-safe-stack --enable-slirp=git
438 TARGETS: x86_64-softmmu
439 MAKE_CHECK_ARGS: check-build
447 extends: .native_test_job_template
449 - job: build-cfi-x86_64
453 MAKE_CHECK_ARGS: check
456 extends: .avocado_test_job_template
458 - job: build-cfi-x86_64
462 MAKE_CHECK_ARGS: check-avocado
465 extends: .native_build_job_template
467 job: amd64-ubuntu2004-container
470 CONFIGURE_ARGS: --enable-tsan --cc=clang-10 --cxx=clang++-10
471 --enable-trace-backends=ust --enable-fdt=system --enable-slirp=system
472 TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
473 MAKE_CHECK_ARGS: bench V=1
475 # gprof/gcov are GCC features
477 extends: .native_build_job_template
479 job: amd64-ubuntu2004-container
482 CONFIGURE_ARGS: --enable-gprof --enable-gcov
483 TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
490 extends: .native_test_job_template
492 - job: build-gprof-gcov
496 MAKE_CHECK_ARGS: check
498 - ${CI_PROJECT_DIR}/scripts/ci/coverage-summary.sh
501 extends: .native_build_job_template
503 job: amd64-fedora-container
507 - mkdir build-oss-fuzz
508 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
509 ./scripts/oss-fuzz/build.sh
510 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
511 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
513 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
514 echo Testing ${fuzzer} ... ;
515 "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
519 extends: .native_build_job_template
521 job: amd64-debian-user-cross-container
523 IMAGE: debian-all-test-cross
525 - TARGETS="aarch64 alpha arm hppa m68k microblaze ppc64 s390x x86_64"
528 - ../configure --enable-tcg-interpreter
529 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" || { cat config.log meson-logs/meson-log.txt && exit 1; }
531 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
532 - for tg in $TARGETS ; do
533 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
534 ./tests/qtest/boot-serial-test || exit 1 ;
535 ./tests/qtest/cdrom-test || exit 1 ;
537 - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
538 - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
541 # Alternate coroutines implementations are only really of interest to KVM users
542 # However we can't test against KVM on Gitlab-CI so we can only run unit tests
543 build-coroutine-sigaltstack:
544 extends: .native_build_job_template
546 job: amd64-ubuntu2004-container
549 CONFIGURE_ARGS: --with-coroutine=sigaltstack --disable-tcg
550 --enable-trace-backends=ftrace
551 MAKE_CHECK_ARGS: check-unit
553 # Check our reduced build configurations
554 build-without-default-devices:
555 extends: .native_build_job_template
557 job: amd64-centos8-container
560 CONFIGURE_ARGS: --without-default-devices --disable-user
562 build-without-default-features:
563 extends: .native_build_job_template
565 job: amd64-fedora-container
569 --without-default-features
572 --disable-qom-cast-debug
575 TARGETS: avr-softmmu i386-softmmu mips64-softmmu s390x-softmmu sh4-softmmu
576 sparc64-softmmu hexagon-linux-user i386-linux-user s390x-linux-user
577 MAKE_CHECK_ARGS: check-unit check-qtest SPEED=slow
580 extends: .base_job_template
582 image: $CI_REGISTRY_IMAGE/qemu/fedora:latest
584 job: amd64-fedora-container
586 - mkdir subprojects/libvhost-user/build
587 - cd subprojects/libvhost-user/build
591 # No targets are built here, just tools, docs, and unit tests. This
592 # also feeds into the eventual documentation deployment steps later
593 build-tools-and-docs-debian:
594 extends: .native_build_job_template
596 job: amd64-debian-container
597 # when running on 'master' we use pre-existing container
601 MAKE_CHECK_ARGS: check-unit check-softfloat ctags TAGS cscope
602 CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
609 # Prepare for GitLab pages deployment. Anything copied into the
610 # "public" directory will be deployed to $USER.gitlab.io/$PROJECT
612 # GitLab publishes from any branch that triggers a CI pipeline
614 # For the main repo we don't want to publish from 'staging'
615 # since that content may not be pushed, nor do we wish to
616 # publish from 'stable-NNN' branches as that content is outdated.
617 # Thus we restrict to just the default branch
619 # For contributor forks we want to publish from any repo so
620 # that users can see the results of their commits, regardless
621 # of what topic branch they're currently using
623 extends: .base_job_template
624 image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:latest
627 - job: build-tools-and-docs-debian
630 # HTML-ised source tree
632 - htags -anT --tree-view=filetree -m qemu_init
633 -t "Welcome to the QEMU sourcecode"
635 # Project documentation
636 - make -C build install DESTDIR=$(pwd)/temp-install
637 - mv temp-install/usr/local/share/doc/qemu/* public/