master
yml 800 lines 23.8 KB
Raw
1 include:
2 - local: '/.gitlab-ci.d/buildtest-template.yml'
3
4 build-system-alpine:
5 extends:
6 - .native_build_job_template
7 - .native_build_artifact_template
8 needs:
9 - job: amd64-alpine-container
10 variables:
11 IMAGE: alpine
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
15
16 check-system-alpine:
17 extends: .native_test_job_template
18 needs:
19 - job: build-system-alpine
20 artifacts: true
21 variables:
22 IMAGE: alpine
23 MAKE_CHECK_ARGS: check-unit check-qtest
24
25 functional-system-alpine:
26 extends: .functional_test_job_template
27 needs:
28 - job: build-system-alpine
29 artifacts: true
30 variables:
31 IMAGE: alpine
32 MAKE_CHECK_ARGS: check-functional
33
34 build-system-ubuntu:
35 extends:
36 - .native_build_job_template
37 - .native_build_artifact_template
38 needs:
39 - job: amd64-ubuntu2404-container
40 variables:
41 IMAGE: ubuntu2404
42 CONFIGURE_ARGS: --enable-docs --enable-rust
43 TARGETS: alpha-softmmu microblaze-softmmu mips64el-softmmu
44 MAKE_CHECK_ARGS: check-build
45
46 check-system-ubuntu:
47 extends: .native_test_job_template
48 needs:
49 - job: build-system-ubuntu
50 artifacts: true
51 variables:
52 IMAGE: ubuntu2404
53 MAKE_CHECK_ARGS: check
54
55 functional-system-ubuntu:
56 extends: .functional_test_job_template
57 needs:
58 - job: build-system-ubuntu
59 artifacts: true
60 variables:
61 IMAGE: ubuntu2404
62 MAKE_CHECK_ARGS: check-functional
63
64 build-system-debian:
65 extends:
66 - .native_build_job_template
67 - .native_build_artifact_template
68 needs:
69 - job: amd64-debian-container
70 variables:
71 IMAGE: debian
72 CONFIGURE_ARGS: --with-coroutine=sigaltstack --enable-rust
73 TARGETS: arm-softmmu hexagon-softmmu i386-softmmu riscv64-softmmu
74 sh4eb-softmmu sparc-softmmu xtensa-softmmu
75 MAKE_CHECK_ARGS: check-build
76
77 check-system-debian:
78 extends: .native_test_job_template
79 needs:
80 - job: build-system-debian
81 artifacts: true
82 variables:
83 IMAGE: debian
84 MAKE_CHECK_ARGS: check
85
86 functional-system-debian:
87 extends: .functional_test_job_template
88 needs:
89 - job: build-system-debian
90 artifacts: true
91 variables:
92 IMAGE: debian
93 MAKE_CHECK_ARGS: check-functional
94
95 crash-test-debian:
96 extends: .native_test_job_template
97 needs:
98 - job: build-system-debian
99 artifacts: true
100 variables:
101 IMAGE: debian
102 script:
103 - cd build
104 - ./run scripts/device-crash-test -q --tcg-only ./qemu-system-i386
105
106 build-system-fedora:
107 extends:
108 - .native_build_job_template
109 - .native_build_artifact_template
110 needs:
111 - job: amd64-fedora-container
112 variables:
113 IMAGE: fedora
114 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs --enable-crypto-afalg --enable-rust
115 TARGETS: mips-softmmu
116 xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
117 MAKE_CHECK_ARGS: check-build check-doc
118
119 build-system-fedora-rust-nightly:
120 extends:
121 - .native_build_job_template
122 - .native_build_artifact_template
123 needs:
124 - job: amd64-fedora-rust-nightly-container
125 variables:
126 IMAGE: fedora-rust-nightly
127 CONFIGURE_ARGS: --disable-docs --enable-rust --enable-strict-rust-lints
128 TARGETS: aarch64-softmmu
129 MAKE_CHECK_ARGS: check-build check-doc
130
131 allow_failure: true
132
133 check-system-fedora:
134 extends: .native_test_job_template
135 needs:
136 - job: build-system-fedora
137 artifacts: true
138 variables:
139 IMAGE: fedora
140 MAKE_CHECK_ARGS: check
141
142 functional-system-fedora:
143 extends: .functional_test_job_template
144 needs:
145 - job: build-system-fedora
146 artifacts: true
147 variables:
148 IMAGE: fedora
149 MAKE_CHECK_ARGS: check-functional
150
151 crash-test-fedora:
152 extends: .native_test_job_template
153 needs:
154 - job: build-system-fedora
155 artifacts: true
156 variables:
157 IMAGE: fedora
158 script:
159 - cd build
160 - ./run scripts/device-crash-test -q ./qemu-system-ppc
161 - ./run scripts/device-crash-test -q ./qemu-system-riscv32
162
163 build-system-centos:
164 extends:
165 - .native_build_job_template
166 - .native_build_artifact_template
167 needs:
168 - job: amd64-centos9-container
169 variables:
170 IMAGE: centos9
171 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-vfio-user-server
172 --enable-modules --enable-trace-backends=dtrace --enable-docs
173 TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
174 x86_64-softmmu rx-softmmu sh4-softmmu
175 MAKE_CHECK_ARGS: check-build
176
177
178 # NB: block-XXX jobs use 'centos' since that is the build
179 # job that provides the x86_64-softmmu. Some I/O tests
180 # are currently buggy and blindly assume characteristics
181 # of x86 (such as PCIe) causing failures with other arches
182
183 block:
184 extends: .native_test_job_template
185 needs:
186 - job: build-system-centos
187 artifacts: true
188 variables:
189 IMAGE: centos9
190 MAKE_CHECK_ARGS: "check-block-$FORMAT"
191 parallel:
192 matrix:
193 - FORMAT: [luks, nbd, parallels, qcow2, qed, raw, vdi, vhdx, vmdk, vpc]
194
195 # Previous QEMU release. Used for cross-version migration tests.
196 build-previous-qemu:
197 extends: .native_build_job_template
198 artifacts:
199 when: on_success
200 expire_in: 2 days
201 paths:
202 - build-previous/qemu-bundle
203 - build-previous/qemu-system-aarch64
204 - build-previous/qemu-system-x86_64
205 - build-previous/tests/qtest/migration-test
206 - build-previous/scripts
207 needs:
208 - job: amd64-opensuse-leap-container
209 variables:
210 IMAGE: opensuse-leap
211 TARGETS: x86_64-softmmu aarch64-softmmu
212 # Override the default flags as we need more to grab the old version
213 GIT_FETCH_EXTRA_FLAGS: --prune --quiet
214 before_script:
215 - source scripts/ci/gitlab-ci-section
216 # Skip if this series contains the release bump commit. During the
217 # release process there might be a window of commits when the
218 # version tag is not yet present in the remote and git fetch would
219 # fail.
220 - if grep -q "\.0$" VERSION; then exit 0; fi
221 - export QEMU_PREV_VERSION="$(sed 's/\([0-9.]*\)\.[0-9]*/v\1.0/' VERSION)"
222 - git remote add upstream https://gitlab.com/qemu-project/qemu
223 - git fetch upstream refs/tags/$QEMU_PREV_VERSION:refs/tags/$QEMU_PREV_VERSION
224 - git checkout $QEMU_PREV_VERSION
225 after_script:
226 - mv build build-previous
227
228 .migration-compat-common:
229 extends: .common_test_job_template
230 needs:
231 - job: build-previous-qemu
232 - job: build-system-opensuse
233 # The old QEMU could have bugs unrelated to migration that are
234 # already fixed in the current development branch, so this test
235 # might fail.
236 allow_failure: true
237 variables:
238 IMAGE: opensuse-leap
239 MAKE_CHECK_ARGS: check-build
240 script:
241 # Skip for round release numbers, this job is only relevant for
242 # testing a development tree.
243 - if grep -q "\.0$" VERSION; then exit 0; fi
244 # Use the migration-tests from the older QEMU tree. This avoids
245 # testing an old QEMU against new features/tests that it is not
246 # compatible with.
247 - cd build-previous
248 # old to new
249 - QTEST_QEMU_BINARY_SRC=./qemu-system-${TARGET}
250 QTEST_QEMU_BINARY=../build/qemu-system-${TARGET} ./tests/qtest/migration-test
251 # new to old
252 - QTEST_QEMU_BINARY_DST=./qemu-system-${TARGET}
253 QTEST_QEMU_BINARY=../build/qemu-system-${TARGET} ./tests/qtest/migration-test
254
255 # This job needs to be disabled until we can have an aarch64 CPU model that
256 # will both (1) support both KVM and TCG, and (2) provide a stable ABI.
257 # Currently only "-cpu max" can provide (1), however it doesn't guarantee
258 # (2). Mark this test skipped until later.
259 migration-compat-aarch64:
260 extends: .migration-compat-common
261 variables:
262 TARGET: aarch64
263 QEMU_JOB_SKIPPED: 1
264
265 migration-compat-x86_64:
266 extends: .migration-compat-common
267 variables:
268 TARGET: x86_64
269
270 check-system-centos:
271 extends: .native_test_job_template
272 needs:
273 - job: build-system-centos
274 artifacts: true
275 variables:
276 IMAGE: centos9
277 MAKE_CHECK_ARGS: check
278
279 functional-system-centos:
280 extends: .functional_test_job_template
281 needs:
282 - job: build-system-centos
283 artifacts: true
284 variables:
285 IMAGE: centos9
286 MAKE_CHECK_ARGS: check-functional
287
288 build-system-opensuse:
289 extends:
290 - .native_build_job_template
291 - .native_build_artifact_template
292 needs:
293 - job: amd64-opensuse-leap-container
294 variables:
295 IMAGE: opensuse-leap
296 TARGETS: s390x-softmmu x86_64-softmmu aarch64-softmmu
297 MAKE_CHECK_ARGS: check-build
298
299 check-system-opensuse:
300 extends: .native_test_job_template
301 needs:
302 - job: build-system-opensuse
303 artifacts: true
304 variables:
305 IMAGE: opensuse-leap
306 MAKE_CHECK_ARGS: check
307
308 functional-system-opensuse:
309 extends: .functional_test_job_template
310 needs:
311 - job: build-system-opensuse
312 artifacts: true
313 variables:
314 IMAGE: opensuse-leap
315 MAKE_CHECK_ARGS: check-functional
316
317 #
318 # Flaky tests. We don't run these by default and they are allow fail
319 # but often the CI system is the only way to trigger the failures.
320 #
321
322 build-system-flaky:
323 extends:
324 - .native_build_job_template
325 - .native_build_artifact_template
326 needs:
327 - job: amd64-debian-container
328 variables:
329 IMAGE: debian
330 QEMU_JOB_OPTIONAL: 1
331 TARGETS: aarch64-softmmu arm-softmmu mips64el-softmmu
332 ppc64-softmmu rx-softmmu s390x-softmmu sh4-softmmu x86_64-softmmu
333 MAKE_CHECK_ARGS: check-build
334
335 functional-system-flaky:
336 extends: .functional_test_job_template
337 needs:
338 - job: build-system-flaky
339 artifacts: true
340 allow_failure: true
341 variables:
342 IMAGE: debian
343 MAKE_CHECK_ARGS: check-functional
344 QEMU_JOB_OPTIONAL: 1
345 QEMU_TEST_FLAKY_TESTS: 1
346
347 # This jobs explicitly disable TCG (--disable-tcg), KVM is detected by
348 # the configure script. The container doesn't contain Xen headers so
349 # Xen accelerator is not detected / selected. As result it build the
350 # i386-softmmu and x86_64-softmmu with KVM being the single accelerator
351 # available.
352 # Also use a different coroutine implementation (which is only really of
353 # interest to KVM users, i.e. with TCG disabled)
354 build-tcg-disabled:
355 extends: .native_build_job_template
356 needs:
357 - job: amd64-centos9-container
358 variables:
359 IMAGE: centos9
360 script:
361 - mkdir build
362 - cd build
363 - ../configure --disable-tcg --audio-drv-list="" --with-coroutine=ucontext
364 --disable-docs --disable-sdl --disable-gtk --disable-vnc
365 || { cat config.log meson-logs/meson-log.txt && exit 1; }
366 - make -j"$JOBS"
367 - make check-unit
368 - make check-qapi-schema
369 - make distclean
370
371 build-user:
372 extends: .native_build_job_template
373 needs:
374 - job: amd64-debian-user-cross-container
375 variables:
376 IMAGE: debian-all-test-cross
377 CONFIGURE_ARGS: --disable-tools --disable-system
378 --target-list-exclude=alpha-linux-user,sh4-linux-user
379 MAKE_CHECK_ARGS: check-tcg
380
381 build-user-static:
382 extends: .native_build_job_template
383 needs:
384 - job: amd64-debian-user-cross-container
385 variables:
386 IMAGE: debian-all-test-cross
387 CONFIGURE_ARGS: --disable-tools --disable-system --static
388 MAKE_CHECK_ARGS: check-tcg
389
390 build-user-hexagon:
391 extends: .native_build_job_template
392 needs:
393 - job: hexagon-cross-container
394 variables:
395 IMAGE: debian-hexagon-cross
396 TARGETS: hexagon-linux-user
397 CONFIGURE_ARGS: --disable-tools --disable-docs --enable-debug-tcg
398 MAKE_CHECK_ARGS: check-tcg
399
400 # Build the softmmu targets we have check-tcg tests and compilers in
401 # our omnibus all-test-cross container. Those targets that haven't got
402 # Debian cross compiler support need to use special containers.
403 build-some-softmmu:
404 extends: .native_build_job_template
405 needs:
406 - job: amd64-debian-user-cross-container
407 variables:
408 IMAGE: debian-all-test-cross
409 CONFIGURE_ARGS: --disable-tools --enable-debug
410 TARGETS: arm-softmmu aarch64-softmmu i386-softmmu riscv64-softmmu
411 s390x-softmmu x86_64-softmmu
412 MAKE_CHECK_ARGS: check-tcg
413
414 build-loongarch64:
415 extends: .native_build_job_template
416 needs:
417 - job: loongarch-debian-cross-container
418 variables:
419 IMAGE: debian-loongarch-cross
420 CONFIGURE_ARGS: --disable-tools --enable-debug
421 TARGETS: loongarch64-linux-user loongarch64-softmmu
422 MAKE_CHECK_ARGS: check-tcg
423
424 # We build tricore in a very minimal tricore only container
425 build-tricore-softmmu:
426 extends: .native_build_job_template
427 needs:
428 - job: tricore-debian-cross-container
429 variables:
430 IMAGE: debian-tricore-cross
431 CONFIGURE_ARGS: --disable-tools --disable-fdt --enable-debug
432 TARGETS: tricore-softmmu
433 MAKE_CHECK_ARGS: check-tcg
434
435 clang-system:
436 extends: .native_build_job_template
437 needs:
438 - job: amd64-fedora-container
439 variables:
440 IMAGE: fedora
441 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-ubsan
442 --extra-cflags=-fno-sanitize-recover=undefined
443 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu s390x-softmmu
444 MAKE_CHECK_ARGS: check-qtest check-tcg
445
446 clang-user:
447 extends: .native_build_job_template
448 needs:
449 - job: amd64-debian-user-cross-container
450 timeout: 70m
451 variables:
452 IMAGE: debian-all-test-cross
453 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --disable-system --enable-ubsan
454 --target-list-exclude=alpha-linux-user,microblazeel-linux-user,aarch64_be-linux-user,i386-linux-user,m68k-linux-user,mipsn32el-linux-user,xtensaeb-linux-user
455 --extra-cflags=-fno-sanitize-recover=undefined
456 MAKE_CHECK_ARGS: check-unit check-tcg
457
458 # Set LD_JOBS=1 because this requires LTO and ld consumes a large amount of memory.
459 # On gitlab runners, default value sometimes end up calling 2 lds concurrently and
460 # triggers an Out-Of-Memory error
461 #
462 # Since slirp callbacks are used in QEMU Timers, we cannot use libslirp with
463 # CFI builds, and thus have to disable it here.
464 #
465 # Split in three sets of build/check/functional to limit the execution time
466 # of each job
467 build-cfi-aarch64:
468 extends:
469 - .native_build_job_template
470 - .native_build_artifact_template
471 needs:
472 - job: amd64-fedora-container
473 variables:
474 LD_JOBS: 1
475 AR: llvm-ar
476 IMAGE: fedora
477 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi
478 --enable-safe-stack --disable-slirp
479 TARGETS: aarch64-softmmu
480 MAKE_CHECK_ARGS: check-build
481 # FIXME: This job is often failing, likely due to out-of-memory problems in
482 # the constrained containers of the shared runners. Thus this is marked as
483 # skipped until the situation has been solved.
484 QEMU_JOB_SKIPPED: 1
485 timeout: 90m
486
487 check-cfi-aarch64:
488 extends: .native_test_job_template
489 needs:
490 - job: build-cfi-aarch64
491 artifacts: true
492 variables:
493 IMAGE: fedora
494 MAKE_CHECK_ARGS: check
495
496 functional-cfi-aarch64:
497 extends: .functional_test_job_template
498 needs:
499 - job: build-cfi-aarch64
500 artifacts: true
501 variables:
502 IMAGE: fedora
503 MAKE_CHECK_ARGS: check-functional
504
505 build-cfi-ppc64-s390x:
506 extends:
507 - .native_build_job_template
508 - .native_build_artifact_template
509 needs:
510 - job: amd64-fedora-container
511 variables:
512 LD_JOBS: 1
513 AR: llvm-ar
514 IMAGE: fedora
515 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi
516 --enable-safe-stack --disable-slirp
517 TARGETS: ppc64-softmmu s390x-softmmu
518 MAKE_CHECK_ARGS: check-build
519 # FIXME: This job is often failing, likely due to out-of-memory problems in
520 # the constrained containers of the shared runners. Thus this is marked as
521 # skipped until the situation has been solved.
522 QEMU_JOB_SKIPPED: 1
523 timeout: 80m
524
525 check-cfi-ppc64-s390x:
526 extends: .native_test_job_template
527 needs:
528 - job: build-cfi-ppc64-s390x
529 artifacts: true
530 variables:
531 IMAGE: fedora
532 MAKE_CHECK_ARGS: check
533
534 functional-cfi-ppc64-s390x:
535 extends: .functional_test_job_template
536 needs:
537 - job: build-cfi-ppc64-s390x
538 artifacts: true
539 variables:
540 IMAGE: fedora
541 MAKE_CHECK_ARGS: check-functional
542
543 build-cfi-x86_64:
544 extends:
545 - .native_build_job_template
546 - .native_build_artifact_template
547 needs:
548 - job: amd64-fedora-container
549 variables:
550 LD_JOBS: 1
551 AR: llvm-ar
552 IMAGE: fedora
553 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi
554 --enable-safe-stack --disable-slirp
555 TARGETS: x86_64-softmmu
556 MAKE_CHECK_ARGS: check-build
557 timeout: 70m
558
559 check-cfi-x86_64:
560 extends: .native_test_job_template
561 needs:
562 - job: build-cfi-x86_64
563 artifacts: true
564 variables:
565 IMAGE: fedora
566 MAKE_CHECK_ARGS: check
567
568 functional-cfi-x86_64:
569 extends: .functional_test_job_template
570 needs:
571 - job: build-cfi-x86_64
572 artifacts: true
573 variables:
574 IMAGE: fedora
575 MAKE_CHECK_ARGS: check-functional
576
577 tsan-build:
578 extends: .native_build_job_template
579 needs:
580 - job: amd64-ubuntu2404-container
581 variables:
582 IMAGE: ubuntu2404
583 CONFIGURE_ARGS: --enable-tsan --cc=clang --cxx=clang++
584 --enable-trace-backends=ust --disable-slirp
585 TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
586 # Remove when we switch to a distro with clang >= 18
587 # https://github.com/google/sanitizers/issues/1716
588 MAKE: setarch -R make
589
590 # gcov is a GCC features
591 gcov:
592 extends: .native_build_job_template
593 needs:
594 - job: amd64-ubuntu2404-container
595 timeout: 80m
596 variables:
597 IMAGE: ubuntu2404
598 CONFIGURE_ARGS: --enable-gcov
599 TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
600 MAKE_CHECK_ARGS: check-unit check-softfloat
601 after_script:
602 - cd build
603 - gcovr --xml-pretty --exclude-unreachable-branches --print-summary
604 -o coverage.xml --root ${CI_PROJECT_DIR} . *.p
605 coverage: /^\s*lines:\s*\d+.\d+\%/
606 artifacts:
607 name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
608 when: always
609 expire_in: 2 days
610 paths:
611 - build/meson-logs
612 reports:
613 junit: build/meson-logs/*.junit.xml
614 coverage_report:
615 coverage_format: cobertura
616 path: build/coverage.xml
617
618 build-oss-fuzz:
619 extends: .native_build_job_template
620 needs:
621 - job: amd64-fedora-container
622 variables:
623 IMAGE: fedora
624 script:
625 - mkdir build-oss-fuzz
626 - export LSAN_OPTIONS=suppressions=scripts/lsan_suppressions.txt
627 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
628 ./scripts/oss-fuzz/build.sh
629 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
630 - failures=0
631 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
632 | grep -v slirp); do
633 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
634 echo Testing ${fuzzer} ... ;
635 "${fuzzer}" -runs=1 -seed=1 || { echo "FAILED:"" ${fuzzer} exit code is $?"; failures=$(($failures+1)); };
636 done
637 - echo "Number of failures:"" $failures"
638 - test $failures = 0
639
640 build-tci:
641 extends: .native_build_job_template
642 needs:
643 - job: amd64-debian-user-cross-container
644 variables:
645 IMAGE: debian-all-test-cross
646 script:
647 - TARGETS="aarch64 arm hppa m68k microblaze ppc64 s390x x86_64"
648 - mkdir build
649 - cd build
650 - ../configure --enable-tcg-interpreter --disable-kvm --disable-docs --disable-gtk --disable-vnc
651 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)"
652 || { cat config.log meson-logs/meson-log.txt && exit 1; }
653 - make -j"$JOBS"
654 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test
655 - for tg in $TARGETS ; do
656 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
657 ./tests/qtest/boot-serial-test || exit 1 ;
658 ./tests/qtest/cdrom-test || exit 1 ;
659 done
660 - make check-tcg
661
662 # Check our reduced build configurations
663 build-without-defaults:
664 extends: .native_build_job_template
665 needs:
666 - job: amd64-centos9-container
667 variables:
668 IMAGE: centos9
669 CONFIGURE_ARGS:
670 --without-default-devices
671 --without-default-features
672 --disable-fdt
673 --disable-pie
674 --disable-qom-cast-debug
675 --disable-strip
676 --disable-hmp
677 --target-list-exclude=aarch64-softmmu,mips64-softmmu,mipsel-softmmu,ppc64-softmmu,sh4el-softmmu,xtensa-softmmu,x86_64-softmmu
678 MAKE_CHECK_ARGS: check
679
680 build-libvhost-user:
681 extends: .base_job_template
682 stage: build
683 image: $CI_REGISTRY_IMAGE/qemu/fedora:$QEMU_CI_CONTAINER_TAG
684 needs:
685 - job: amd64-fedora-container
686 script:
687 - mkdir subprojects/libvhost-user/build
688 - cd subprojects/libvhost-user/build
689 - meson
690 - ninja
691
692 # No targets are built here, just tools, docs, and unit tests. This
693 # also feeds into the eventual documentation deployment steps later
694 build-tools-and-docs-debian:
695 extends:
696 - .native_build_job_template
697 - .native_build_artifact_template
698 needs:
699 - job: amd64-debian-container
700 # when running on 'master' we use pre-existing container
701 optional: true
702 variables:
703 IMAGE: debian
704 MAKE_CHECK_ARGS: check-unit ctags TAGS cscope
705 CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
706 QEMU_JOB_PUBLISH: 1
707
708 # Prepare for GitLab pages deployment. Anything copied into the
709 # "public" directory will be deployed to $USER.gitlab.io/$PROJECT
710 #
711 # GitLab publishes from any branch that triggers a CI pipeline
712 #
713 # For the main repo we don't want to publish from 'staging'
714 # since that content may not be pushed, nor do we wish to
715 # publish from 'stable-NNN' branches as that content is outdated.
716 # Thus we restrict to just the default branch
717 #
718 # For contributor forks we want to publish from any repo so
719 # that users can see the results of their commits, regardless
720 # of what topic branch they're currently using
721 pages:
722 extends: .base_job_template
723 image: $CI_REGISTRY_IMAGE/qemu/debian:$QEMU_CI_CONTAINER_TAG
724 stage: test
725 needs:
726 - job: build-tools-and-docs-debian
727 script:
728 - mkdir -p public
729 # HTML-ised source tree
730 - make gtags
731 # We unset variables to work around a bug in some htags versions
732 # which causes it to fail when the environment is large
733 - CI_COMMIT_MESSAGE= CI_COMMIT_TAG_MESSAGE= CI_COMMIT_DESCRIPTION= htags
734 -anT --tree-view=filetree -m qemu_init
735 -t "Welcome to the QEMU sourcecode"
736 - mv HTML public/src
737 # Project documentation
738 - make -C build install DESTDIR=$(pwd)/temp-install
739 - mv temp-install/usr/local/share/doc/qemu/* public/
740 artifacts:
741 when: on_success
742 paths:
743 - public
744 variables:
745 QEMU_JOB_PUBLISH: 1
746
747 coverity:
748 image: $CI_REGISTRY_IMAGE/qemu/fedora:$QEMU_CI_CONTAINER_TAG
749 stage: build
750 allow_failure: true
751 timeout: 3h
752 needs:
753 - job: amd64-fedora-container
754 optional: true
755 before_script:
756 - dnf install -y curl wget file
757 script:
758 # would be nice to cancel the job if over quota (https://gitlab.com/gitlab-org/gitlab/-/issues/256089)
759 # for example:
760 # curl --request POST --header "PRIVATE-TOKEN: $CI_JOB_TOKEN" "${CI_SERVER_URL}/api/v4/projects/${CI_PROJECT_ID}/jobs/${CI_JOB_ID}/cancel
761 - 'scripts/coverity-scan/run-coverity-scan --check-upload-only || { exitcode=$?; if test $exitcode = 1; then
762 exit 0;
763 else
764 exit $exitcode;
765 fi; };
766 scripts/coverity-scan/run-coverity-scan --update-tools-only > update-tools.log 2>&1 || { cat update-tools.log; exit 1; };
767 scripts/coverity-scan/run-coverity-scan --no-update-tools'
768 rules:
769 - if: '$COVERITY_TOKEN == null'
770 when: never
771 - if: '$COVERITY_EMAIL == null'
772 when: never
773 # Never included on upstream pipelines, except for schedules
774 - if: '$CI_PROJECT_NAMESPACE == $QEMU_CI_UPSTREAM && $CI_PIPELINE_SOURCE == "schedule"'
775 when: on_success
776 - if: '$CI_PROJECT_NAMESPACE == $QEMU_CI_UPSTREAM'
777 when: never
778 # Forks don't get any pipeline unless QEMU_CI=1 or QEMU_CI=2 is set
779 - if: '$QEMU_CI != "1" && $QEMU_CI != "2"'
780 when: never
781 # Always manual on forks even if $QEMU_CI == "2"
782 - when: manual
783
784 build-wasm64-64bit:
785 extends: .wasm_build_job_template
786 timeout: 2h
787 needs:
788 - job: wasm64-emsdk-cross-container
789 variables:
790 IMAGE: emsdk-wasm64-cross
791 CONFIGURE_ARGS: --static --cpu=wasm64 --disable-tools --enable-debug --enable-tcg-interpreter
792
793 build-wasm64-32bit:
794 extends: .wasm_build_job_template
795 timeout: 2h
796 needs:
797 - job: wasm64-emsdk-cross-container
798 variables:
799 IMAGE: emsdk-wasm64-cross
800 CONFIGURE_ARGS: --static --cpu=wasm64 --wasm64-32bit-address-limit --disable-tools --enable-debug --enable-tcg-interpreter