OSDN Git Service

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