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