]> git.proxmox.com Git - mirror_qemu.git/blob - .gitlab-ci.d/buildtest.yml
gitlab-ci: Fix ..._RUNNER_AVAILABLE variables and document them
[mirror_qemu.git] / .gitlab-ci.d / buildtest.yml
1 include:
2 - local: '/.gitlab-ci.d/buildtest-template.yml'
3
4 build-system-alpine:
5 extends: .native_build_job_template
6 needs:
7 - job: amd64-alpine-container
8 variables:
9 IMAGE: alpine
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
14 artifacts:
15 expire_in: 2 days
16 paths:
17 - .git-submodule-status
18 - build
19
20 check-system-alpine:
21 extends: .native_test_job_template
22 needs:
23 - job: build-system-alpine
24 artifacts: true
25 variables:
26 IMAGE: alpine
27 MAKE_CHECK_ARGS: check
28
29 acceptance-system-alpine:
30 extends: .acceptance_test_job_template
31 needs:
32 - job: build-system-alpine
33 artifacts: true
34 variables:
35 IMAGE: alpine
36 MAKE_CHECK_ARGS: check-acceptance
37
38 build-system-ubuntu:
39 extends: .native_build_job_template
40 needs:
41 job: amd64-ubuntu2004-container
42 variables:
43 IMAGE: ubuntu2004
44 CONFIGURE_ARGS: --enable-docs --enable-fdt=system --enable-slirp=system
45 TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
46 microblazeel-softmmu mips64el-softmmu
47 MAKE_CHECK_ARGS: check-build
48 artifacts:
49 expire_in: 2 days
50 paths:
51 - build
52
53 check-system-ubuntu:
54 extends: .native_test_job_template
55 needs:
56 - job: build-system-ubuntu
57 artifacts: true
58 variables:
59 IMAGE: ubuntu2004
60 MAKE_CHECK_ARGS: check
61
62 acceptance-system-ubuntu:
63 extends: .acceptance_test_job_template
64 needs:
65 - job: build-system-ubuntu
66 artifacts: true
67 variables:
68 IMAGE: ubuntu2004
69 MAKE_CHECK_ARGS: check-acceptance
70
71 build-system-debian:
72 extends: .native_build_job_template
73 needs:
74 job: amd64-debian-container
75 variables:
76 IMAGE: debian-amd64
77 CONFIGURE_ARGS: --enable-fdt=system
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
81 artifacts:
82 expire_in: 2 days
83 paths:
84 - build
85
86 check-system-debian:
87 extends: .native_test_job_template
88 needs:
89 - job: build-system-debian
90 artifacts: true
91 variables:
92 IMAGE: debian-amd64
93 MAKE_CHECK_ARGS: check
94
95 acceptance-system-debian:
96 extends: .acceptance_test_job_template
97 needs:
98 - job: build-system-debian
99 artifacts: true
100 variables:
101 IMAGE: debian-amd64
102 MAKE_CHECK_ARGS: check-acceptance
103
104 build-system-fedora:
105 extends: .native_build_job_template
106 needs:
107 job: amd64-fedora-container
108 variables:
109 IMAGE: fedora
110 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs
111 --enable-fdt=system --enable-slirp=system --enable-capstone=system
112 TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
113 xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
114 MAKE_CHECK_ARGS: check-build
115 artifacts:
116 expire_in: 2 days
117 paths:
118 - build
119
120 check-system-fedora:
121 extends: .native_test_job_template
122 needs:
123 - job: build-system-fedora
124 artifacts: true
125 variables:
126 IMAGE: fedora
127 MAKE_CHECK_ARGS: check
128
129 acceptance-system-fedora:
130 extends: .acceptance_test_job_template
131 needs:
132 - job: build-system-fedora
133 artifacts: true
134 variables:
135 IMAGE: fedora
136 MAKE_CHECK_ARGS: check-acceptance
137
138 build-system-centos:
139 extends: .native_build_job_template
140 needs:
141 job: amd64-centos8-container
142 variables:
143 IMAGE: centos8
144 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-fdt=system
145 --enable-modules --enable-trace-backends=dtrace
146 TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
147 x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
148 MAKE_CHECK_ARGS: check-build
149 artifacts:
150 expire_in: 2 days
151 paths:
152 - build
153
154 check-system-centos:
155 extends: .native_test_job_template
156 needs:
157 - job: build-system-centos
158 artifacts: true
159 variables:
160 IMAGE: centos8
161 MAKE_CHECK_ARGS: check
162
163 acceptance-system-centos:
164 extends: .acceptance_test_job_template
165 needs:
166 - job: build-system-centos
167 artifacts: true
168 variables:
169 IMAGE: centos8
170 MAKE_CHECK_ARGS: check-acceptance
171
172 build-system-opensuse:
173 extends: .native_build_job_template
174 needs:
175 job: amd64-opensuse-leap-container
176 variables:
177 IMAGE: opensuse-leap
178 CONFIGURE_ARGS: --enable-fdt=system
179 TARGETS: s390x-softmmu x86_64-softmmu aarch64-softmmu
180 MAKE_CHECK_ARGS: check-build
181 artifacts:
182 expire_in: 2 days
183 paths:
184 - build
185
186 check-system-opensuse:
187 extends: .native_test_job_template
188 needs:
189 - job: build-system-opensuse
190 artifacts: true
191 variables:
192 IMAGE: opensuse-leap
193 MAKE_CHECK_ARGS: check
194
195 acceptance-system-opensuse:
196 extends: .acceptance_test_job_template
197 needs:
198 - job: build-system-opensuse
199 artifacts: true
200 variables:
201 IMAGE: opensuse-leap
202 MAKE_CHECK_ARGS: check-acceptance
203
204
205 # This jobs explicitly disable TCG (--disable-tcg), KVM is detected by
206 # the configure script. The container doesn't contain Xen headers so
207 # Xen accelerator is not detected / selected. As result it build the
208 # i386-softmmu and x86_64-softmmu with KVM being the single accelerator
209 # available.
210 # Also use a different coroutine implementation (which is only really of
211 # interest to KVM users, i.e. with TCG disabled)
212 build-tcg-disabled:
213 extends: .native_build_job_template
214 needs:
215 job: amd64-centos8-container
216 variables:
217 IMAGE: centos8
218 script:
219 - mkdir build
220 - cd build
221 - ../configure --disable-tcg --audio-drv-list="" --with-coroutine=ucontext
222 || { cat config.log meson-logs/meson-log.txt && exit 1; }
223 - make -j"$JOBS"
224 - make check-unit
225 - make check-qapi-schema
226 - cd tests/qemu-iotests/
227 - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
228 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
229 170 171 183 184 192 194 208 221 222 226 227 236 253 277
230 - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122
231 124 132 139 142 144 145 151 152 155 157 165 194 196 200 202
232 208 209 216 218 222 227 234 246 247 248 250 254 255 257 258
233 260 261 262 263 264 270 272 273 277 279
234
235 build-user:
236 extends: .native_build_job_template
237 needs:
238 job: amd64-debian-user-cross-container
239 variables:
240 IMAGE: debian-all-test-cross
241 CONFIGURE_ARGS: --disable-tools --disable-system
242 MAKE_CHECK_ARGS: check-tcg
243
244 build-user-static:
245 extends: .native_build_job_template
246 needs:
247 job: amd64-debian-user-cross-container
248 variables:
249 IMAGE: debian-all-test-cross
250 CONFIGURE_ARGS: --disable-tools --disable-system --static
251 MAKE_CHECK_ARGS: check-tcg
252
253 # Because the hexagon cross-compiler takes so long to build we don't rely
254 # on the CI system to build it and hence this job has an optional dependency
255 # declared. The image is manually uploaded.
256 build-user-hexagon:
257 extends: .native_build_job_template
258 needs:
259 job: hexagon-cross-container
260 optional: true
261 variables:
262 IMAGE: debian-hexagon-cross
263 TARGETS: hexagon-linux-user
264 CONFIGURE_ARGS: --disable-tools --disable-docs --enable-debug-tcg
265 MAKE_CHECK_ARGS: check-tcg
266
267 # Only build the softmmu targets we have check-tcg tests for
268 build-some-softmmu:
269 extends: .native_build_job_template
270 needs:
271 job: amd64-debian-user-cross-container
272 variables:
273 IMAGE: debian-all-test-cross
274 CONFIGURE_ARGS: --disable-tools --enable-debug
275 TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
276 MAKE_CHECK_ARGS: check-tcg
277
278 # We build tricore in a very minimal tricore only container
279 build-tricore-softmmu:
280 extends: .native_build_job_template
281 needs:
282 job: tricore-debian-cross-container
283 variables:
284 IMAGE: debian-tricore-cross
285 CONFIGURE_ARGS: --disable-tools --disable-fdt --enable-debug
286 TARGETS: tricore-softmmu
287 MAKE_CHECK_ARGS: check-tcg
288
289 clang-system:
290 extends: .native_build_job_template
291 needs:
292 job: amd64-fedora-container
293 variables:
294 IMAGE: fedora
295 CONFIGURE_ARGS: --cc=clang --cxx=clang++
296 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
297 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
298 ppc-softmmu s390x-softmmu
299 MAKE_CHECK_ARGS: check-qtest check-tcg
300
301 clang-user:
302 extends: .native_build_job_template
303 needs:
304 job: amd64-debian-user-cross-container
305 variables:
306 IMAGE: debian-all-test-cross
307 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --disable-system
308 --target-list-exclude=microblazeel-linux-user,aarch64_be-linux-user,i386-linux-user,m68k-linux-user,mipsn32el-linux-user,xtensaeb-linux-user
309 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
310 MAKE_CHECK_ARGS: check-unit check-tcg
311
312 # Set LD_JOBS=1 because this requires LTO and ld consumes a large amount of memory.
313 # On gitlab runners, default value sometimes end up calling 2 lds concurrently and
314 # triggers an Out-Of-Memory error
315 #
316 # Since slirp callbacks are used in QEMU Timers, slirp needs to be compiled together
317 # with QEMU and linked as a static library to avoid false positives in CFI checks.
318 # This can be accomplished by using -enable-slirp=git, which avoids the use of
319 # a system-wide version of the library
320 #
321 # Split in three sets of build/check/acceptance to limit the execution time of each
322 # job
323 build-cfi-aarch64:
324 extends: .native_build_job_template
325 needs:
326 - job: amd64-fedora-container
327 variables:
328 LD_JOBS: 1
329 AR: llvm-ar
330 IMAGE: fedora
331 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
332 --enable-safe-stack --enable-slirp=git
333 TARGETS: aarch64-softmmu
334 MAKE_CHECK_ARGS: check-build
335 timeout: 70m
336 artifacts:
337 expire_in: 2 days
338 paths:
339 - build
340 rules:
341 # FIXME: This job is often failing, likely due to out-of-memory problems in
342 # the constrained containers of the shared runners. Thus this is marked as
343 # manual until the situation has been solved.
344 - when: manual
345 allow_failure: true
346
347 check-cfi-aarch64:
348 extends: .native_test_job_template
349 needs:
350 - job: build-cfi-aarch64
351 artifacts: true
352 variables:
353 IMAGE: fedora
354 MAKE_CHECK_ARGS: check
355
356 acceptance-cfi-aarch64:
357 extends: .acceptance_test_job_template
358 needs:
359 - job: build-cfi-aarch64
360 artifacts: true
361 variables:
362 IMAGE: fedora
363 MAKE_CHECK_ARGS: check-acceptance
364
365 build-cfi-ppc64-s390x:
366 extends: .native_build_job_template
367 needs:
368 - job: amd64-fedora-container
369 variables:
370 LD_JOBS: 1
371 AR: llvm-ar
372 IMAGE: fedora
373 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
374 --enable-safe-stack --enable-slirp=git
375 TARGETS: ppc64-softmmu s390x-softmmu
376 MAKE_CHECK_ARGS: check-build
377 timeout: 70m
378 artifacts:
379 expire_in: 2 days
380 paths:
381 - build
382 rules:
383 # FIXME: This job is often failing, likely due to out-of-memory problems in
384 # the constrained containers of the shared runners. Thus this is marked as
385 # manual until the situation has been solved.
386 - when: manual
387 allow_failure: true
388
389 check-cfi-ppc64-s390x:
390 extends: .native_test_job_template
391 needs:
392 - job: build-cfi-ppc64-s390x
393 artifacts: true
394 variables:
395 IMAGE: fedora
396 MAKE_CHECK_ARGS: check
397
398 acceptance-cfi-ppc64-s390x:
399 extends: .acceptance_test_job_template
400 needs:
401 - job: build-cfi-ppc64-s390x
402 artifacts: true
403 variables:
404 IMAGE: fedora
405 MAKE_CHECK_ARGS: check-acceptance
406
407 build-cfi-x86_64:
408 extends: .native_build_job_template
409 needs:
410 - job: amd64-fedora-container
411 variables:
412 LD_JOBS: 1
413 AR: llvm-ar
414 IMAGE: fedora
415 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
416 --enable-safe-stack --enable-slirp=git
417 TARGETS: x86_64-softmmu
418 MAKE_CHECK_ARGS: check-build
419 timeout: 70m
420 artifacts:
421 expire_in: 2 days
422 paths:
423 - build
424
425 check-cfi-x86_64:
426 extends: .native_test_job_template
427 needs:
428 - job: build-cfi-x86_64
429 artifacts: true
430 variables:
431 IMAGE: fedora
432 MAKE_CHECK_ARGS: check
433
434 acceptance-cfi-x86_64:
435 extends: .acceptance_test_job_template
436 needs:
437 - job: build-cfi-x86_64
438 artifacts: true
439 variables:
440 IMAGE: fedora
441 MAKE_CHECK_ARGS: check-acceptance
442
443 tsan-build:
444 extends: .native_build_job_template
445 needs:
446 job: amd64-ubuntu2004-container
447 variables:
448 IMAGE: ubuntu2004
449 CONFIGURE_ARGS: --enable-tsan --cc=clang-10 --cxx=clang++-10
450 --enable-trace-backends=ust --enable-fdt=system --enable-slirp=system
451 TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
452 MAKE_CHECK_ARGS: bench V=1
453
454 # These targets are on the way out
455 build-deprecated:
456 extends: .native_build_job_template
457 needs:
458 job: amd64-debian-user-cross-container
459 variables:
460 IMAGE: debian-all-test-cross
461 CONFIGURE_ARGS: --disable-tools
462 MAKE_CHECK_ARGS: build-tcg
463 TARGETS: ppc64abi32-linux-user
464 artifacts:
465 expire_in: 2 days
466 paths:
467 - build
468
469 # We split the check-tcg step as test failures are expected but we still
470 # want to catch the build breaking.
471 check-deprecated:
472 extends: .native_test_job_template
473 needs:
474 - job: build-deprecated
475 artifacts: true
476 variables:
477 IMAGE: debian-all-test-cross
478 MAKE_CHECK_ARGS: check-tcg
479 allow_failure: true
480
481 # gprof/gcov are GCC features
482 build-gprof-gcov:
483 extends: .native_build_job_template
484 needs:
485 job: amd64-ubuntu2004-container
486 variables:
487 IMAGE: ubuntu2004
488 CONFIGURE_ARGS: --enable-gprof --enable-gcov
489 TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
490 artifacts:
491 expire_in: 1 days
492 paths:
493 - build
494
495 check-gprof-gcov:
496 extends: .native_test_job_template
497 needs:
498 - job: build-gprof-gcov
499 artifacts: true
500 variables:
501 IMAGE: ubuntu2004
502 MAKE_CHECK_ARGS: check
503 after_script:
504 - ${CI_PROJECT_DIR}/scripts/ci/coverage-summary.sh
505
506 build-oss-fuzz:
507 extends: .native_build_job_template
508 needs:
509 job: amd64-fedora-container
510 variables:
511 IMAGE: fedora
512 script:
513 - mkdir build-oss-fuzz
514 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
515 ./scripts/oss-fuzz/build.sh
516 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
517 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
518 | grep -v slirp); do
519 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
520 echo Testing ${fuzzer} ... ;
521 "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
522 done
523 # Unrelated to fuzzer: run some tests with -fsanitize=address
524 - cd build-oss-fuzz && make check-qtest-i386 check-unit
525
526 build-tci:
527 extends: .native_build_job_template
528 needs:
529 job: amd64-debian-user-cross-container
530 variables:
531 IMAGE: debian-all-test-cross
532 script:
533 - TARGETS="aarch64 alpha arm hppa m68k microblaze ppc64 s390x x86_64"
534 - mkdir build
535 - cd build
536 - ../configure --enable-tcg-interpreter
537 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" || { cat config.log meson-logs/meson-log.txt && exit 1; }
538 - make -j"$JOBS"
539 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
540 - for tg in $TARGETS ; do
541 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
542 ./tests/qtest/boot-serial-test || exit 1 ;
543 ./tests/qtest/cdrom-test || exit 1 ;
544 done
545 - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
546 - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
547 - make check-tcg
548
549 # Alternate coroutines implementations are only really of interest to KVM users
550 # However we can't test against KVM on Gitlab-CI so we can only run unit tests
551 build-coroutine-sigaltstack:
552 extends: .native_build_job_template
553 needs:
554 job: amd64-ubuntu2004-container
555 variables:
556 IMAGE: ubuntu2004
557 CONFIGURE_ARGS: --with-coroutine=sigaltstack --disable-tcg
558 --enable-trace-backends=ftrace
559 MAKE_CHECK_ARGS: check-unit
560
561 # Check our reduced build configurations
562 build-without-default-devices:
563 extends: .native_build_job_template
564 needs:
565 job: amd64-centos8-container
566 variables:
567 IMAGE: centos8
568 CONFIGURE_ARGS: --without-default-devices --disable-user
569
570 build-without-default-features:
571 extends: .native_build_job_template
572 needs:
573 job: amd64-fedora-container
574 variables:
575 IMAGE: fedora
576 CONFIGURE_ARGS:
577 --without-default-features
578 --disable-capstone
579 --disable-fdt
580 --disable-pie
581 --disable-qom-cast-debug
582 --disable-slirp
583 --disable-strip
584 TARGETS: avr-softmmu i386-softmmu mips64-softmmu s390x-softmmu sh4-softmmu
585 sparc64-softmmu hexagon-linux-user i386-linux-user s390x-linux-user
586 MAKE_CHECK_ARGS: check-unit check-qtest SPEED=slow
587
588 build-libvhost-user:
589 stage: build
590 image: $CI_REGISTRY_IMAGE/qemu/fedora:latest
591 needs:
592 job: amd64-fedora-container
593 script:
594 - mkdir subprojects/libvhost-user/build
595 - cd subprojects/libvhost-user/build
596 - meson
597 - ninja
598
599 # No targets are built here, just tools, docs, and unit tests. This
600 # also feeds into the eventual documentation deployment steps later
601 build-tools-and-docs-debian:
602 extends: .native_build_job_template
603 needs:
604 job: amd64-debian-container
605 variables:
606 IMAGE: debian-amd64
607 MAKE_CHECK_ARGS: check-unit check-softfloat ctags TAGS cscope
608 CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
609 artifacts:
610 expire_in: 2 days
611 paths:
612 - build
613
614 # Prepare for GitLab pages deployment. Anything copied into the
615 # "public" directory will be deployed to $USER.gitlab.io/$PROJECT
616 #
617 # GitLab publishes from any branch that triggers a CI pipeline
618 #
619 # For the main repo we don't want to publish from 'staging'
620 # since that content may not be pushed, nor do we wish to
621 # publish from 'stable-NNN' branches as that content is outdated.
622 # Thus we restrict to just the default branch
623 #
624 # For contributor forks we want to publish from any repo so
625 # that users can see the results of their commits, regardless
626 # of what topic branch they're currently using
627 pages:
628 image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:latest
629 stage: test
630 needs:
631 - job: build-tools-and-docs-debian
632 script:
633 - mkdir -p public
634 # HTML-ised source tree
635 - make gtags
636 - htags -anT --tree-view=filetree -m qemu_init
637 -t "Welcome to the QEMU sourcecode"
638 - mv HTML public/src
639 # Project documentation
640 - make -C build install DESTDIR=$(pwd)/temp-install
641 - mv temp-install/usr/local/share/doc/qemu/* public/
642 artifacts:
643 paths:
644 - public
645 rules:
646 - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
647 when: on_success
648 - if: '$CI_PROJECT_NAMESPACE == "qemu-project"'
649 when: never
650 - if: '$CI_PROJECT_NAMESPACE != "qemu-project"'
651 when: on_success