Merge remote-tracking branch 'remotes/cohuck-gitlab/tags/s390x-20210409' into staging
[qemu/ar7.git] / .gitlab-ci.yml
blob52d65d6c04fca4e32f80126565c3de4678933e82
1 # Currently we have two build stages after our containers are built:
2 #  - build (for traditional build and test or first stage build)
3 #  - test (for test stages, using build artefacts from a build stage)
4 stages:
5   - containers
6   - containers-layer2
7   - build
8   - test
10 include:
11   - local: '/.gitlab-ci.d/edk2.yml'
12   - local: '/.gitlab-ci.d/opensbi.yml'
13   - local: '/.gitlab-ci.d/containers.yml'
14   - local: '/.gitlab-ci.d/crossbuilds.yml'
16 .native_build_job_template: &native_build_job_definition
17   stage: build
18   image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
19   before_script:
20     - JOBS=$(expr $(nproc) + 1)
21   script:
22     - mkdir build
23     - cd build
24     - if test -n "$TARGETS";
25       then
26         ../configure --enable-werror --disable-docs $CONFIGURE_ARGS --target-list="$TARGETS" ;
27       else
28         ../configure --enable-werror --disable-docs $CONFIGURE_ARGS ;
29       fi || { cat config.log meson-logs/meson-log.txt && exit 1; }
30     - if test -n "$LD_JOBS";
31       then
32         meson configure . -Dbackend_max_links="$LD_JOBS" ;
33       fi || exit 1;
34     - make -j"$JOBS"
35     - if test -n "$MAKE_CHECK_ARGS";
36       then
37         make -j"$JOBS" $MAKE_CHECK_ARGS ;
38       fi
40 .native_test_job_template: &native_test_job_definition
41   stage: test
42   image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
43   script:
44     - scripts/git-submodule.sh update
45         $(sed -n '/GIT_SUBMODULES=/ s/.*=// p' build/config-host.mak)
46     - cd build
47     - find . -type f -exec touch {} +
48     # Avoid recompiling by hiding ninja with NINJA=":"
49     - make NINJA=":" $MAKE_CHECK_ARGS
51 .acceptance_template: &acceptance_definition
52   cache:
53     key: "${CI_JOB_NAME}-cache"
54     paths:
55       - ${CI_PROJECT_DIR}/avocado-cache
56     policy: pull-push
57   artifacts:
58     name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
59     when: always
60     expire_in: 2 days
61     paths:
62       - build/tests/results/latest/results.xml
63       - build/tests/results/latest/test-results
64     reports:
65       junit: build/tests/results/latest/results.xml
66   before_script:
67     - mkdir -p ~/.config/avocado
68     - echo "[datadir.paths]" > ~/.config/avocado/avocado.conf
69     - echo "cache_dirs = ['${CI_PROJECT_DIR}/avocado-cache']"
70            >> ~/.config/avocado/avocado.conf
71     - echo -e '[job.output.testlogs]\nstatuses = ["FAIL", "INTERRUPT"]'
72            >> ~/.config/avocado/avocado.conf
73     - if [ -d ${CI_PROJECT_DIR}/avocado-cache ]; then
74         du -chs ${CI_PROJECT_DIR}/avocado-cache ;
75       fi
76     - export AVOCADO_ALLOW_UNTRUSTED_CODE=1
77   after_script:
78     - cd build
79     - du -chs ${CI_PROJECT_DIR}/avocado-cache
81 build-system-alpine:
82   <<: *native_build_job_definition
83   needs:
84     - job: amd64-alpine-container
85   variables:
86     IMAGE: alpine
87     TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
88       moxie-softmmu microblazeel-softmmu mips64el-softmmu
89     MAKE_CHECK_ARGS: check-build
90     CONFIGURE_ARGS: --enable-docs --enable-trace-backends=log,simple,syslog
91   artifacts:
92     expire_in: 2 days
93     paths:
94       - .git-submodule-status
95       - build
97 check-system-alpine:
98   <<: *native_test_job_definition
99   needs:
100     - job: build-system-alpine
101       artifacts: true
102   variables:
103     IMAGE: alpine
104     MAKE_CHECK_ARGS: check
106 acceptance-system-alpine:
107   <<: *native_test_job_definition
108   needs:
109     - job: build-system-alpine
110       artifacts: true
111   variables:
112     IMAGE: alpine
113     MAKE_CHECK_ARGS: check-acceptance
114   <<: *acceptance_definition
116 build-system-ubuntu:
117   <<: *native_build_job_definition
118   needs:
119     job: amd64-ubuntu2004-container
120   variables:
121     IMAGE: ubuntu2004
122     CONFIGURE_ARGS: --enable-docs --enable-fdt=system --enable-slirp=system
123     TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
124       moxie-softmmu microblazeel-softmmu mips64el-softmmu
125     MAKE_CHECK_ARGS: check-build
126   artifacts:
127     expire_in: 2 days
128     paths:
129       - build
131 check-system-ubuntu:
132   <<: *native_test_job_definition
133   needs:
134     - job: build-system-ubuntu
135       artifacts: true
136   variables:
137     IMAGE: ubuntu2004
138     MAKE_CHECK_ARGS: check
140 acceptance-system-ubuntu:
141   <<: *native_test_job_definition
142   needs:
143     - job: build-system-ubuntu
144       artifacts: true
145   variables:
146     IMAGE: ubuntu2004
147     MAKE_CHECK_ARGS: check-acceptance
148   <<: *acceptance_definition
150 build-system-debian:
151   <<: *native_build_job_definition
152   needs:
153     job: amd64-debian-container
154   variables:
155     IMAGE: debian-amd64
156     CONFIGURE_ARGS: --enable-fdt=system
157     TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu
158       riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu
159     MAKE_CHECK_ARGS: check-build
160   artifacts:
161     expire_in: 2 days
162     paths:
163       - build
165 check-system-debian:
166   <<: *native_test_job_definition
167   needs:
168     - job: build-system-debian
169       artifacts: true
170   variables:
171     IMAGE: debian-amd64
172     MAKE_CHECK_ARGS: check
174 acceptance-system-debian:
175   <<: *native_test_job_definition
176   needs:
177     - job: build-system-debian
178       artifacts: true
179   variables:
180     IMAGE: debian-amd64
181     MAKE_CHECK_ARGS: check-acceptance
182   <<: *acceptance_definition
184 build-system-fedora:
185   <<: *native_build_job_definition
186   needs:
187     job: amd64-fedora-container
188   variables:
189     IMAGE: fedora
190     CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs
191              --enable-fdt=system --enable-slirp=system --enable-capstone=system
192     TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
193       xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
194     MAKE_CHECK_ARGS: check-build
195   artifacts:
196     expire_in: 2 days
197     paths:
198       - build
200 check-system-fedora:
201   <<: *native_test_job_definition
202   needs:
203     - job: build-system-fedora
204       artifacts: true
205   variables:
206     IMAGE: fedora
207     MAKE_CHECK_ARGS: check
209 acceptance-system-fedora:
210   <<: *native_test_job_definition
211   needs:
212     - job: build-system-fedora
213       artifacts: true
214   variables:
215     IMAGE: fedora
216     MAKE_CHECK_ARGS: check-acceptance
217   <<: *acceptance_definition
219 build-system-centos:
220   <<: *native_build_job_definition
221   needs:
222     job: amd64-centos8-container
223   variables:
224     IMAGE: centos8
225     CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-fdt=system
226                     --enable-modules --enable-trace-backends=dtrace
227     TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
228       x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
229     MAKE_CHECK_ARGS: check-build
230   artifacts:
231     expire_in: 2 days
232     paths:
233       - build
235 check-system-centos:
236   <<: *native_test_job_definition
237   needs:
238     - job: build-system-centos
239       artifacts: true
240   variables:
241     IMAGE: centos8
242     MAKE_CHECK_ARGS: check
244 acceptance-system-centos:
245   <<: *native_test_job_definition
246   needs:
247     - job: build-system-centos
248       artifacts: true
249   variables:
250     IMAGE: centos8
251     MAKE_CHECK_ARGS: check-acceptance
252   <<: *acceptance_definition
254 build-system-opensuse:
255   <<: *native_build_job_definition
256   needs:
257     job: amd64-opensuse-leap-container
258   variables:
259     IMAGE: opensuse-leap
260     CONFIGURE_ARGS: --enable-fdt=system
261     TARGETS: s390x-softmmu x86_64-softmmu aarch64-softmmu
262     MAKE_CHECK_ARGS: check-build
263   artifacts:
264     expire_in: 2 days
265     paths:
266       - build
268 check-system-opensuse:
269   <<: *native_test_job_definition
270   needs:
271     - job: build-system-opensuse
272       artifacts: true
273   variables:
274     IMAGE: opensuse-leap
275     MAKE_CHECK_ARGS: check
277 acceptance-system-opensuse:
278   <<: *native_test_job_definition
279   needs:
280     - job: build-system-opensuse
281       artifacts: true
282   variables:
283     IMAGE: opensuse-leap
284     MAKE_CHECK_ARGS: check-acceptance
285   <<: *acceptance_definition
288 build-disabled:
289   <<: *native_build_job_definition
290   needs:
291     job: amd64-fedora-container
292   variables:
293     IMAGE: fedora
294     CONFIGURE_ARGS:
295       --disable-attr
296       --disable-auth-pam
297       --disable-avx2
298       --disable-bochs
299       --disable-brlapi
300       --disable-bzip2
301       --disable-cap-ng
302       --disable-capstone
303       --disable-cloop
304       --disable-coroutine-pool
305       --disable-curl
306       --disable-curses
307       --disable-dmg
308       --disable-docs
309       --disable-gcrypt
310       --disable-glusterfs
311       --disable-gnutls
312       --disable-gtk
313       --disable-guest-agent
314       --disable-iconv
315       --disable-keyring
316       --disable-kvm
317       --disable-libiscsi
318       --disable-libpmem
319       --disable-libssh
320       --disable-libudev
321       --disable-libusb
322       --disable-libxml2
323       --disable-linux-aio
324       --disable-live-block-migration
325       --disable-lzo
326       --disable-malloc-trim
327       --disable-mpath
328       --disable-nettle
329       --disable-numa
330       --disable-opengl
331       --disable-parallels
332       --disable-pie
333       --disable-qcow1
334       --disable-qed
335       --disable-qom-cast-debug
336       --disable-rbd
337       --disable-rdma
338       --disable-replication
339       --disable-sdl
340       --disable-seccomp
341       --disable-sheepdog
342       --disable-slirp
343       --disable-smartcard
344       --disable-snappy
345       --disable-sparse
346       --disable-spice
347       --disable-strip
348       --disable-tpm
349       --disable-usb-redir
350       --disable-vdi
351       --disable-vhost-crypto
352       --disable-vhost-net
353       --disable-vhost-scsi
354       --disable-vhost-kernel
355       --disable-vhost-user
356       --disable-vhost-vdpa
357       --disable-vhost-vsock
358       --disable-virglrenderer
359       --disable-vnc
360       --disable-vte
361       --disable-vvfat
362       --disable-xen
363       --disable-zstd
364     TARGETS: arm-softmmu i386-softmmu ppc64-softmmu mips64-softmmu
365       s390x-softmmu i386-linux-user
366     MAKE_CHECK_ARGS: check-qtest SPEED=slow
368 # This jobs explicitly disable TCG (--disable-tcg), KVM is detected by
369 # the configure script. The container doesn't contain Xen headers so
370 # Xen accelerator is not detected / selected. As result it build the
371 # i386-softmmu and x86_64-softmmu with KVM being the single accelerator
372 # available.
373 # Also use a different coroutine implementation (which is only really of
374 # interest to KVM users, i.e. with TCG disabled)
375 build-tcg-disabled:
376   <<: *native_build_job_definition
377   needs:
378     job: amd64-centos8-container
379   variables:
380     IMAGE: centos8
381   script:
382     - mkdir build
383     - cd build
384     - ../configure --disable-tcg --audio-drv-list="" --with-coroutine=ucontext
385       || { cat config.log meson-logs/meson-log.txt && exit 1; }
386     - make -j"$JOBS"
387     - make check-unit
388     - make check-qapi-schema
389     - cd tests/qemu-iotests/
390     - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
391             052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
392             170 171 183 184 192 194 197 208 215 221 222 226 227 236 253 277
393     - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122
394             124 132 139 142 144 145 151 152 155 157 165 194 196 197 200 202
395             208 209 215 216 218 222 227 234 246 247 248 250 254 255 257 258
396             260 261 262 263 264 270 272 273 277 279
398 build-user:
399   <<: *native_build_job_definition
400   needs:
401     job: amd64-debian-user-cross-container
402   variables:
403     IMAGE: debian-all-test-cross
404     CONFIGURE_ARGS: --disable-tools --disable-system
405     MAKE_CHECK_ARGS: check-tcg
407 build-user-static:
408   <<: *native_build_job_definition
409   needs:
410     job: amd64-debian-user-cross-container
411   variables:
412     IMAGE: debian-all-test-cross
413     CONFIGURE_ARGS: --disable-tools --disable-system --static
414     MAKE_CHECK_ARGS: check-tcg
416 # Only build the softmmu targets we have check-tcg tests for
417 build-some-softmmu:
418   <<: *native_build_job_definition
419   needs:
420     job: amd64-debian-user-cross-container
421   variables:
422     IMAGE: debian-all-test-cross
423     CONFIGURE_ARGS: --disable-tools --enable-debug
424     TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
425     MAKE_CHECK_ARGS: check-tcg
427 # Run check-tcg against linux-user (with plugins)
428 # we skip sparc64-linux-user until it has been fixed somewhat
429 # we skip cris-linux-user as it doesn't use the common run loop
430 build-user-plugins:
431   <<: *native_build_job_definition
432   needs:
433     job: amd64-debian-user-cross-container
434   variables:
435     IMAGE: debian-all-test-cross
436     CONFIGURE_ARGS: --disable-tools --disable-system --enable-plugins --enable-debug-tcg --target-list-exclude=sparc64-linux-user,cris-linux-user
437     MAKE_CHECK_ARGS: check-tcg
438   timeout: 1h 30m
440 build-user-centos7:
441   <<: *native_build_job_definition
442   needs:
443     job: amd64-centos7-container
444   variables:
445     IMAGE: centos7
446     CONFIGURE_ARGS: --disable-system --disable-tools --disable-docs
447     MAKE_CHECK_ARGS: check-tcg
449 build-some-softmmu-plugins:
450   <<: *native_build_job_definition
451   needs:
452     job: amd64-debian-user-cross-container
453   variables:
454     IMAGE: debian-all-test-cross
455     CONFIGURE_ARGS: --disable-tools --disable-user --enable-plugins --enable-debug-tcg
456     TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
457     MAKE_CHECK_ARGS: check-tcg
459 clang-system:
460   <<: *native_build_job_definition
461   needs:
462     job: amd64-fedora-container
463   variables:
464     IMAGE: fedora
465     CONFIGURE_ARGS: --cc=clang --cxx=clang++
466       --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
467     TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
468       ppc-softmmu s390x-softmmu
469     MAKE_CHECK_ARGS: check-qtest check-tcg
471 clang-user:
472   <<: *native_build_job_definition
473   needs:
474     job: amd64-debian-user-cross-container
475   variables:
476     IMAGE: debian-all-test-cross
477     CONFIGURE_ARGS: --cc=clang --cxx=clang++ --disable-system
478       --target-list-exclude=microblazeel-linux-user,aarch64_be-linux-user,i386-linux-user,m68k-linux-user,mipsn32el-linux-user,xtensaeb-linux-user
479       --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
480     MAKE_CHECK_ARGS: check-unit check-tcg
482 # Set LD_JOBS=1 because this requires LTO and ld consumes a large amount of memory.
483 # On gitlab runners, default value sometimes end up calling 2 lds concurrently and
484 # triggers an Out-Of-Memory error
486 # Since slirp callbacks are used in QEMU Timers, slirp needs to be compiled together
487 # with QEMU and linked as a static library to avoid false positives in CFI checks.
488 # This can be accomplished by using -enable-slirp=git, which avoids the use of
489 # a system-wide version of the library
491 # Split in three sets of build/check/acceptance to limit the execution time of each
492 # job
493 build-cfi-aarch64:
494   <<: *native_build_job_definition
495   needs:
496   - job: amd64-fedora-container
497   variables:
498     LD_JOBS: 1
499     AR: llvm-ar
500     IMAGE: fedora
501     CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
502       --enable-safe-stack --enable-slirp=git
503     TARGETS: aarch64-softmmu
504     MAKE_CHECK_ARGS: check-build
505   timeout: 70m
506   artifacts:
507     expire_in: 2 days
508     paths:
509       - build
511 check-cfi-aarch64:
512   <<: *native_test_job_definition
513   needs:
514     - job: build-cfi-aarch64
515       artifacts: true
516   variables:
517     IMAGE: fedora
518     MAKE_CHECK_ARGS: check
520 acceptance-cfi-aarch64:
521   <<: *native_test_job_definition
522   needs:
523     - job: build-cfi-aarch64
524       artifacts: true
525   variables:
526     IMAGE: fedora
527     MAKE_CHECK_ARGS: check-acceptance
528   <<: *acceptance_definition
530 build-cfi-ppc64-s390x:
531   <<: *native_build_job_definition
532   needs:
533   - job: amd64-fedora-container
534   variables:
535     LD_JOBS: 1
536     AR: llvm-ar
537     IMAGE: fedora
538     CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
539       --enable-safe-stack --enable-slirp=git
540     TARGETS: ppc64-softmmu s390x-softmmu
541     MAKE_CHECK_ARGS: check-build
542   timeout: 70m
543   artifacts:
544     expire_in: 2 days
545     paths:
546       - build
548 check-cfi-ppc64-s390x:
549   <<: *native_test_job_definition
550   needs:
551     - job: build-cfi-ppc64-s390x
552       artifacts: true
553   variables:
554     IMAGE: fedora
555     MAKE_CHECK_ARGS: check
557 acceptance-cfi-ppc64-s390x:
558   <<: *native_test_job_definition
559   needs:
560     - job: build-cfi-ppc64-s390x
561       artifacts: true
562   variables:
563     IMAGE: fedora
564     MAKE_CHECK_ARGS: check-acceptance
565   <<: *acceptance_definition
567 build-cfi-x86_64:
568   <<: *native_build_job_definition
569   needs:
570   - job: amd64-fedora-container
571   variables:
572     LD_JOBS: 1
573     AR: llvm-ar
574     IMAGE: fedora
575     CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
576       --enable-safe-stack --enable-slirp=git
577     TARGETS: x86_64-softmmu
578     MAKE_CHECK_ARGS: check-build
579   timeout: 70m
580   artifacts:
581     expire_in: 2 days
582     paths:
583       - build
585 check-cfi-x86_64:
586   <<: *native_test_job_definition
587   needs:
588     - job: build-cfi-x86_64
589       artifacts: true
590   variables:
591     IMAGE: fedora
592     MAKE_CHECK_ARGS: check
594 acceptance-cfi-x86_64:
595   <<: *native_test_job_definition
596   needs:
597     - job: build-cfi-x86_64
598       artifacts: true
599   variables:
600     IMAGE: fedora
601     MAKE_CHECK_ARGS: check-acceptance
602   <<: *acceptance_definition
604 tsan-build:
605   <<: *native_build_job_definition
606   needs:
607     job: amd64-ubuntu2004-container
608   variables:
609     IMAGE: ubuntu2004
610     CONFIGURE_ARGS: --enable-tsan --cc=clang-10 --cxx=clang++-10
611           --enable-trace-backends=ust --enable-fdt=system --enable-slirp=system
612     TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
613     MAKE_CHECK_ARGS: bench V=1
615 # These targets are on the way out
616 build-deprecated:
617   <<: *native_build_job_definition
618   needs:
619     job: amd64-debian-user-cross-container
620   variables:
621     IMAGE: debian-all-test-cross
622     CONFIGURE_ARGS: --disable-tools
623     MAKE_CHECK_ARGS: build-tcg
624     TARGETS: ppc64abi32-linux-user lm32-softmmu unicore32-softmmu
625   artifacts:
626     expire_in: 2 days
627     paths:
628       - build
630 # We split the check-tcg step as test failures are expected but we still
631 # want to catch the build breaking.
632 check-deprecated:
633   <<: *native_test_job_definition
634   needs:
635     - job: build-deprecated
636       artifacts: true
637   variables:
638     IMAGE: debian-all-test-cross
639     MAKE_CHECK_ARGS: check-tcg
640   allow_failure: true
642 # gprof/gcov are GCC features
643 gprof-gcov:
644   <<: *native_build_job_definition
645   needs:
646     job: amd64-ubuntu2004-container
647   variables:
648     IMAGE: ubuntu2004
649     CONFIGURE_ARGS: --enable-gprof --enable-gcov
650     MAKE_CHECK_ARGS: check
651     TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
652   timeout: 70m
653   after_script:
654     - ${CI_PROJECT_DIR}/scripts/ci/coverage-summary.sh
656 build-oss-fuzz:
657   <<: *native_build_job_definition
658   needs:
659     job: amd64-fedora-container
660   variables:
661     IMAGE: fedora
662   script:
663     - mkdir build-oss-fuzz
664     - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
665       ./scripts/oss-fuzz/build.sh
666     - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
667     - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
668                       | grep -v slirp); do
669         grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
670         echo Testing ${fuzzer} ... ;
671         "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
672       done
673     # Unrelated to fuzzer: run some tests with -fsanitize=address
674     - cd build-oss-fuzz && make check-qtest-i386 check-unit
676 build-tci:
677   <<: *native_build_job_definition
678   needs:
679     job: amd64-debian-user-cross-container
680   variables:
681     IMAGE: debian-all-test-cross
682   script:
683     - TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64"
684     - mkdir build
685     - cd build
686     - ../configure --enable-tcg-interpreter
687         --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" || { cat config.log meson-logs/meson-log.txt && exit 1; }
688     - make -j"$JOBS"
689     - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
690     - for tg in $TARGETS ; do
691         export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
692         ./tests/qtest/boot-serial-test || exit 1 ;
693         ./tests/qtest/cdrom-test || exit 1 ;
694       done
695     - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
696     - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
697     - make check-tcg
699 # Alternate coroutines implementations are only really of interest to KVM users
700 # However we can't test against KVM on Gitlab-CI so we can only run unit tests
701 build-coroutine-sigaltstack:
702   <<: *native_build_job_definition
703   needs:
704     job: amd64-ubuntu2004-container
705   variables:
706     IMAGE: ubuntu2004
707     CONFIGURE_ARGS: --with-coroutine=sigaltstack --disable-tcg
708                     --enable-trace-backends=ftrace
709     MAKE_CHECK_ARGS: check-unit
711 # Most jobs test latest gcrypt or nettle builds
713 # These jobs test old gcrypt and nettle from RHEL7
714 # which had some API differences.
715 crypto-old-nettle:
716   <<: *native_build_job_definition
717   needs:
718     job: amd64-centos7-container
719   variables:
720     IMAGE: centos7
721     TARGETS: x86_64-softmmu x86_64-linux-user
722     CONFIGURE_ARGS: --disable-gcrypt --enable-nettle
723     MAKE_CHECK_ARGS: check
725 crypto-old-gcrypt:
726   <<: *native_build_job_definition
727   needs:
728     job: amd64-centos7-container
729   variables:
730     IMAGE: centos7
731     TARGETS: x86_64-softmmu x86_64-linux-user
732     CONFIGURE_ARGS: --disable-nettle --enable-gcrypt
733     MAKE_CHECK_ARGS: check
735 crypto-only-gnutls:
736   <<: *native_build_job_definition
737   needs:
738     job: amd64-centos7-container
739   variables:
740     IMAGE: centos7
741     TARGETS: x86_64-softmmu x86_64-linux-user
742     CONFIGURE_ARGS: --disable-nettle --disable-gcrypt --enable-gnutls
743     MAKE_CHECK_ARGS: check
746 # Check our reduced build configurations
747 build-without-default-devices:
748   <<: *native_build_job_definition
749   needs:
750     job: amd64-centos8-container
751   variables:
752     IMAGE: centos8
753     CONFIGURE_ARGS: --without-default-devices --disable-user
755 build-without-default-features:
756   <<: *native_build_job_definition
757   needs:
758     job: amd64-debian-container
759   variables:
760     IMAGE: debian-amd64
761     CONFIGURE_ARGS: --without-default-features --disable-user
762         --target-list-exclude=arm-softmmu,i386-softmmu,mipsel-softmmu,mips64-softmmu,ppc-softmmu
763     MAKE_CHECK_ARGS: check-unit
765 check-patch:
766   stage: build
767   image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
768   needs:
769     job: amd64-centos8-container
770   script: .gitlab-ci.d/check-patch.py
771   except:
772     variables:
773       - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master'
774   variables:
775     GIT_DEPTH: 1000
776   allow_failure: true
778 check-dco:
779   stage: build
780   image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
781   needs:
782     job: amd64-centos8-container
783   script: .gitlab-ci.d/check-dco.py
784   except:
785     variables:
786       - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master'
787   variables:
788     GIT_DEPTH: 1000
790 build-libvhost-user:
791   stage: build
792   image: $CI_REGISTRY_IMAGE/qemu/fedora:latest
793   needs:
794     job: amd64-fedora-container
795   before_script:
796     - dnf install -y meson ninja-build
797   script:
798     - mkdir subprojects/libvhost-user/build
799     - cd subprojects/libvhost-user/build
800     - meson
801     - ninja
803 # No targets are built here, just tools, docs, and unit tests. This
804 # also feeds into the eventual documentation deployment steps later
805 build-tools-and-docs-debian:
806   <<: *native_build_job_definition
807   needs:
808     job: amd64-debian-container
809   variables:
810     IMAGE: debian-amd64
811     MAKE_CHECK_ARGS: check-unit check-softfloat ctags TAGS cscope
812     CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
813   artifacts:
814     expire_in: 2 days
815     paths:
816       - build
818 # Prepare for GitLab pages deployment. Anything copied into the
819 # "public" directory will be deployed to $USER.gitlab.io/$PROJECT
820 pages:
821   image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:latest
822   stage: test
823   needs:
824     - job: build-tools-and-docs-debian
825   script:
826     - mkdir -p public
827     # HTML-ised source tree
828     - make gtags
829     - htags -anT --tree-view=filetree -m qemu_init
830         -t "Welcome to the QEMU sourcecode"
831     - mv HTML public/src
832     # Project documentation
833     - make -C build install DESTDIR=$(pwd)/temp-install
834     - mv temp-install/usr/local/share/doc/qemu/* public/
835   artifacts:
836     paths:
837       - public