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