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 --enable-vfio-user-server
172 TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
173 x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
174 MAKE_CHECK_ARGS: check-build
181 extends: .native_test_job_template
183 - job: build-system-centos
187 MAKE_CHECK_ARGS: check
189 avocado-system-centos:
190 extends: .avocado_test_job_template
192 - job: build-system-centos
196 MAKE_CHECK_ARGS: check-avocado
198 build-system-opensuse:
199 extends: .native_build_job_template
201 job: amd64-opensuse-leap-container
204 CONFIGURE_ARGS: --enable-fdt=system
205 TARGETS: s390x-softmmu x86_64-softmmu aarch64-softmmu
206 MAKE_CHECK_ARGS: check-build
212 check-system-opensuse:
213 extends: .native_test_job_template
215 - job: build-system-opensuse
219 MAKE_CHECK_ARGS: check
221 avocado-system-opensuse:
222 extends: .avocado_test_job_template
224 - job: build-system-opensuse
228 MAKE_CHECK_ARGS: check-avocado
231 # This jobs explicitly disable TCG (--disable-tcg), KVM is detected by
232 # the configure script. The container doesn't contain Xen headers so
233 # Xen accelerator is not detected / selected. As result it build the
234 # i386-softmmu and x86_64-softmmu with KVM being the single accelerator
236 # Also use a different coroutine implementation (which is only really of
237 # interest to KVM users, i.e. with TCG disabled)
239 extends: .native_build_job_template
241 job: amd64-centos8-container
247 - ../configure --disable-tcg --audio-drv-list="" --with-coroutine=ucontext
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
279 # Because the hexagon cross-compiler takes so long to build we don't rely
280 # on the CI system to build it and hence this job has an optional dependency
281 # declared. The image is manually uploaded.
283 extends: .native_build_job_template
285 job: hexagon-cross-container
288 IMAGE: debian-hexagon-cross
289 TARGETS: hexagon-linux-user
290 CONFIGURE_ARGS: --disable-tools --disable-docs --enable-debug-tcg
291 MAKE_CHECK_ARGS: check-tcg
293 # Only build the softmmu targets we have check-tcg tests for
295 extends: .native_build_job_template
297 job: amd64-debian-user-cross-container
299 IMAGE: debian-all-test-cross
300 CONFIGURE_ARGS: --disable-tools --enable-debug
301 TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
302 MAKE_CHECK_ARGS: check-tcg
304 # We build tricore in a very minimal tricore only container
305 build-tricore-softmmu:
306 extends: .native_build_job_template
308 job: tricore-debian-cross-container
310 IMAGE: debian-tricore-cross
311 CONFIGURE_ARGS: --disable-tools --disable-fdt --enable-debug
312 TARGETS: tricore-softmmu
313 MAKE_CHECK_ARGS: check-tcg
316 extends: .native_build_job_template
318 job: amd64-fedora-container
321 CONFIGURE_ARGS: --cc=clang --cxx=clang++
322 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
323 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
324 ppc-softmmu s390x-softmmu
325 MAKE_CHECK_ARGS: check-qtest check-tcg
328 extends: .native_build_job_template
330 job: amd64-debian-user-cross-container
332 IMAGE: debian-all-test-cross
333 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --disable-system
334 --target-list-exclude=microblazeel-linux-user,aarch64_be-linux-user,i386-linux-user,m68k-linux-user,mipsn32el-linux-user,xtensaeb-linux-user
335 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
336 MAKE_CHECK_ARGS: check-unit check-tcg
338 # Set LD_JOBS=1 because this requires LTO and ld consumes a large amount of memory.
339 # On gitlab runners, default value sometimes end up calling 2 lds concurrently and
340 # triggers an Out-Of-Memory error
342 # Since slirp callbacks are used in QEMU Timers, slirp needs to be compiled together
343 # with QEMU and linked as a static library to avoid false positives in CFI checks.
344 # This can be accomplished by using -enable-slirp=git, which avoids the use of
345 # a system-wide version of the library
347 # Split in three sets of build/check/avocado to limit the execution time of each
350 extends: .native_build_job_template
352 - job: amd64-fedora-container
357 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
358 --enable-safe-stack --enable-slirp=git
359 TARGETS: aarch64-softmmu
360 MAKE_CHECK_ARGS: check-build
361 # FIXME: This job is often failing, likely due to out-of-memory problems in
362 # the constrained containers of the shared runners. Thus this is marked as
363 # skipped until the situation has been solved.
372 extends: .native_test_job_template
374 - job: build-cfi-aarch64
378 MAKE_CHECK_ARGS: check
381 extends: .avocado_test_job_template
383 - job: build-cfi-aarch64
387 MAKE_CHECK_ARGS: check-avocado
389 build-cfi-ppc64-s390x:
390 extends: .native_build_job_template
392 - job: amd64-fedora-container
397 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
398 --enable-safe-stack --enable-slirp=git
399 TARGETS: ppc64-softmmu s390x-softmmu
400 MAKE_CHECK_ARGS: check-build
401 # FIXME: This job is often failing, likely due to out-of-memory problems in
402 # the constrained containers of the shared runners. Thus this is marked as
403 # skipped until the situation has been solved.
411 check-cfi-ppc64-s390x:
412 extends: .native_test_job_template
414 - job: build-cfi-ppc64-s390x
418 MAKE_CHECK_ARGS: check
420 avocado-cfi-ppc64-s390x:
421 extends: .avocado_test_job_template
423 - job: build-cfi-ppc64-s390x
427 MAKE_CHECK_ARGS: check-avocado
430 extends: .native_build_job_template
432 - job: amd64-fedora-container
437 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
438 --enable-safe-stack --enable-slirp=git
439 TARGETS: x86_64-softmmu
440 MAKE_CHECK_ARGS: check-build
448 extends: .native_test_job_template
450 - job: build-cfi-x86_64
454 MAKE_CHECK_ARGS: check
457 extends: .avocado_test_job_template
459 - job: build-cfi-x86_64
463 MAKE_CHECK_ARGS: check-avocado
466 extends: .native_build_job_template
468 job: amd64-ubuntu2004-container
471 CONFIGURE_ARGS: --enable-tsan --cc=clang-10 --cxx=clang++-10
472 --enable-trace-backends=ust --enable-fdt=system --enable-slirp=system
473 TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
474 MAKE_CHECK_ARGS: bench V=1
476 # gprof/gcov are GCC features
478 extends: .native_build_job_template
480 job: amd64-ubuntu2004-container
483 CONFIGURE_ARGS: --enable-gprof --enable-gcov
484 TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
491 extends: .native_test_job_template
493 - job: build-gprof-gcov
497 MAKE_CHECK_ARGS: check
499 - ${CI_PROJECT_DIR}/scripts/ci/coverage-summary.sh
502 extends: .native_build_job_template
504 job: amd64-fedora-container
508 - mkdir build-oss-fuzz
509 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
510 ./scripts/oss-fuzz/build.sh
511 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
512 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
514 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
515 echo Testing ${fuzzer} ... ;
516 "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
520 extends: .native_build_job_template
522 job: amd64-debian-user-cross-container
524 IMAGE: debian-all-test-cross
526 - TARGETS="aarch64 alpha arm hppa m68k microblaze ppc64 s390x x86_64"
529 - ../configure --enable-tcg-interpreter
530 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" || { cat config.log meson-logs/meson-log.txt && exit 1; }
532 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
533 - for tg in $TARGETS ; do
534 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
535 ./tests/qtest/boot-serial-test || exit 1 ;
536 ./tests/qtest/cdrom-test || exit 1 ;
538 - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
539 - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
542 # Alternate coroutines implementations are only really of interest to KVM users
543 # However we can't test against KVM on Gitlab-CI so we can only run unit tests
544 build-coroutine-sigaltstack:
545 extends: .native_build_job_template
547 job: amd64-ubuntu2004-container
550 CONFIGURE_ARGS: --with-coroutine=sigaltstack --disable-tcg
551 --enable-trace-backends=ftrace
552 MAKE_CHECK_ARGS: check-unit
554 # Check our reduced build configurations
555 build-without-default-devices:
556 extends: .native_build_job_template
558 job: amd64-centos8-container
561 CONFIGURE_ARGS: --without-default-devices --disable-user
563 build-without-default-features:
564 extends: .native_build_job_template
566 job: amd64-fedora-container
570 --without-default-features
573 --disable-qom-cast-debug
576 TARGETS: avr-softmmu i386-softmmu mips64-softmmu s390x-softmmu sh4-softmmu
577 sparc64-softmmu hexagon-linux-user i386-linux-user s390x-linux-user
578 MAKE_CHECK_ARGS: check-unit check-qtest SPEED=slow
581 extends: .base_job_template
583 image: $CI_REGISTRY_IMAGE/qemu/fedora:latest
585 job: amd64-fedora-container
587 - mkdir subprojects/libvhost-user/build
588 - cd subprojects/libvhost-user/build
592 # No targets are built here, just tools, docs, and unit tests. This
593 # also feeds into the eventual documentation deployment steps later
594 build-tools-and-docs-debian:
595 extends: .native_build_job_template
597 job: amd64-debian-container
598 # when running on 'master' we use pre-existing container
602 MAKE_CHECK_ARGS: check-unit ctags TAGS cscope
603 CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
610 # Prepare for GitLab pages deployment. Anything copied into the
611 # "public" directory will be deployed to $USER.gitlab.io/$PROJECT
613 # GitLab publishes from any branch that triggers a CI pipeline
615 # For the main repo we don't want to publish from 'staging'
616 # since that content may not be pushed, nor do we wish to
617 # publish from 'stable-NNN' branches as that content is outdated.
618 # Thus we restrict to just the default branch
620 # For contributor forks we want to publish from any repo so
621 # that users can see the results of their commits, regardless
622 # of what topic branch they're currently using
624 extends: .base_job_template
625 image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:latest
628 - job: build-tools-and-docs-debian
631 # HTML-ised source tree
633 - htags -anT --tree-view=filetree -m qemu_init
634 -t "Welcome to the QEMU sourcecode"
636 # Project documentation
637 - make -C build install DESTDIR=$(pwd)/temp-install
638 - mv temp-install/usr/local/share/doc/qemu/* public/