tests/docker: Use --arch-only when building Debian cross image
[qemu/ar7.git] / .gitlab-ci.yml
blobb23364bf3ad85f7def2e5c3f752d72b16c4ce56a
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 $CONFIGURE_ARGS --target-list="$TARGETS" ;
27       else
28         ../configure --enable-werror $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         $(grep GIT_SUBMODULES build/config-host.mak | sed 's/GIT_SUBMODULES=//')
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   variables:
84     IMAGE: alpine
85     TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
86       moxie-softmmu microblazeel-softmmu mips64el-softmmu
87     MAKE_CHECK_ARGS: check-build
88     CONFIGURE_ARGS: --enable-docs
89   artifacts:
90     expire_in: 2 days
91     paths:
92       - .git-submodule-status
93       - build
95 check-system-alpine:
96   <<: *native_test_job_definition
97   needs:
98     - job: build-system-alpine
99       artifacts: true
100   variables:
101     IMAGE: alpine
102     MAKE_CHECK_ARGS: check
104 acceptance-system-alpine:
105   <<: *native_test_job_definition
106   needs:
107     - job: build-system-alpine
108       artifacts: true
109   variables:
110     IMAGE: alpine
111     MAKE_CHECK_ARGS: check-acceptance
112   <<: *acceptance_definition
114 build-system-ubuntu:
115   <<: *native_build_job_definition
116   needs:
117     job: amd64-ubuntu2004-container
118   variables:
119     IMAGE: ubuntu2004
120     CONFIGURE_ARGS: --enable-fdt=system --enable-slirp=system
121     TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
122       moxie-softmmu microblazeel-softmmu mips64el-softmmu
123     MAKE_CHECK_ARGS: check-build
124   artifacts:
125     expire_in: 2 days
126     paths:
127       - build
129 check-system-ubuntu:
130   <<: *native_test_job_definition
131   needs:
132     - job: build-system-ubuntu
133       artifacts: true
134   variables:
135     IMAGE: ubuntu2004
136     MAKE_CHECK_ARGS: check
138 acceptance-system-ubuntu:
139   <<: *native_test_job_definition
140   needs:
141     - job: build-system-ubuntu
142       artifacts: true
143   variables:
144     IMAGE: ubuntu2004
145     MAKE_CHECK_ARGS: check-acceptance
146   <<: *acceptance_definition
148 build-system-debian:
149   <<: *native_build_job_definition
150   needs:
151     job: amd64-debian-container
152   variables:
153     IMAGE: debian-amd64
154     CONFIGURE_ARGS: --enable-fdt=system
155     TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu
156       riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu
157     MAKE_CHECK_ARGS: check-build
158   artifacts:
159     expire_in: 2 days
160     paths:
161       - build
163 check-system-debian:
164   <<: *native_test_job_definition
165   needs:
166     - job: build-system-debian
167       artifacts: true
168   variables:
169     IMAGE: debian-amd64
170     MAKE_CHECK_ARGS: check
172 # No targets are built here, just tools, docs, and unit tests. This
173 # also feeds into the eventual documentation deployment steps later
174 build-tools-and-docs-debian:
175   <<: *native_build_job_definition
176   variables:
177     IMAGE: debian-amd64
178     MAKE_CHECK_ARGS: check-unit check-softfloat ctags TAGS cscope
179     CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
180   artifacts:
181     expire_in: 2 days
182     paths:
183       - build
185 acceptance-system-debian:
186   <<: *native_test_job_definition
187   needs:
188     - job: build-system-debian
189       artifacts: true
190   variables:
191     IMAGE: debian-amd64
192     MAKE_CHECK_ARGS: check-acceptance
193   <<: *acceptance_definition
195 build-system-fedora:
196   <<: *native_build_job_definition
197   needs:
198     job: amd64-fedora-container
199   variables:
200     IMAGE: fedora
201     CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs
202              --enable-fdt=system --enable-slirp=system --enable-capstone=system
203     TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
204       xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
205     MAKE_CHECK_ARGS: check-build
206   artifacts:
207     expire_in: 2 days
208     paths:
209       - build
211 check-system-fedora:
212   <<: *native_test_job_definition
213   needs:
214     - job: build-system-fedora
215       artifacts: true
216   variables:
217     IMAGE: fedora
218     MAKE_CHECK_ARGS: check
220 acceptance-system-fedora:
221   <<: *native_test_job_definition
222   needs:
223     - job: build-system-fedora
224       artifacts: true
225   variables:
226     IMAGE: fedora
227     MAKE_CHECK_ARGS: check-acceptance
228   <<: *acceptance_definition
230 build-system-centos:
231   <<: *native_build_job_definition
232   needs:
233     job: amd64-centos8-container
234   variables:
235     IMAGE: centos8
236     CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-fdt=system
237                     --enable-modules
238     TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
239       x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
240     MAKE_CHECK_ARGS: check-build
241   artifacts:
242     expire_in: 2 days
243     paths:
244       - build
246 check-system-centos:
247   <<: *native_test_job_definition
248   needs:
249     - job: build-system-centos
250       artifacts: true
251   variables:
252     IMAGE: centos8
253     MAKE_CHECK_ARGS: check
255 acceptance-system-centos:
256   <<: *native_test_job_definition
257   needs:
258     - job: build-system-centos
259       artifacts: true
260   variables:
261     IMAGE: centos8
262     MAKE_CHECK_ARGS: check-acceptance
263   <<: *acceptance_definition
265 build-system-opensuse:
266   <<: *native_build_job_definition
267   needs:
268     job: amd64-opensuse-leap-container
269   variables:
270     IMAGE: opensuse-leap
271     CONFIGURE_ARGS: --enable-fdt=system
272     TARGETS: s390x-softmmu x86_64-softmmu aarch64-softmmu
273     MAKE_CHECK_ARGS: check-build
274   artifacts:
275     expire_in: 2 days
276     paths:
277       - build
279 check-system-opensuse:
280   <<: *native_test_job_definition
281   needs:
282     - job: build-system-opensuse
283       artifacts: true
284   variables:
285     IMAGE: opensuse-leap
286     MAKE_CHECK_ARGS: check
288 acceptance-system-opensuse:
289   <<: *native_test_job_definition
290   needs:
291     - job: build-system-opensuse
292       artifacts: true
293   variables:
294     IMAGE: opensuse-leap
295     MAKE_CHECK_ARGS: check-acceptance
296   <<: *acceptance_definition
299 build-disabled:
300   <<: *native_build_job_definition
301   needs:
302     job: amd64-fedora-container
303   variables:
304     IMAGE: fedora
305     CONFIGURE_ARGS:
306       --disable-attr
307       --disable-auth-pam
308       --disable-avx2
309       --disable-bochs
310       --disable-brlapi
311       --disable-bzip2
312       --disable-cap-ng
313       --disable-capstone
314       --disable-cloop
315       --disable-coroutine-pool
316       --disable-curl
317       --disable-curses
318       --disable-dmg
319       --disable-docs
320       --disable-gcrypt
321       --disable-glusterfs
322       --disable-gnutls
323       --disable-gtk
324       --disable-guest-agent
325       --disable-iconv
326       --disable-keyring
327       --disable-kvm
328       --disable-libiscsi
329       --disable-libpmem
330       --disable-libssh
331       --disable-libudev
332       --disable-libusb
333       --disable-libxml2
334       --disable-linux-aio
335       --disable-live-block-migration
336       --disable-lzo
337       --disable-malloc-trim
338       --disable-mpath
339       --disable-nettle
340       --disable-numa
341       --disable-opengl
342       --disable-parallels
343       --disable-pie
344       --disable-qcow1
345       --disable-qed
346       --disable-qom-cast-debug
347       --disable-rbd
348       --disable-rdma
349       --disable-replication
350       --disable-sdl
351       --disable-seccomp
352       --disable-sheepdog
353       --disable-slirp
354       --disable-smartcard
355       --disable-snappy
356       --disable-sparse
357       --disable-spice
358       --disable-strip
359       --disable-tpm
360       --disable-usb-redir
361       --disable-vdi
362       --disable-vhost-crypto
363       --disable-vhost-net
364       --disable-vhost-scsi
365       --disable-vhost-kernel
366       --disable-vhost-user
367       --disable-vhost-vdpa
368       --disable-vhost-vsock
369       --disable-virglrenderer
370       --disable-vnc
371       --disable-vte
372       --disable-vvfat
373       --disable-xen
374       --disable-zstd
375     TARGETS: arm-softmmu i386-softmmu ppc64-softmmu mips64-softmmu
376       s390x-softmmu i386-linux-user
377     MAKE_CHECK_ARGS: check-qtest SPEED=slow
379 # This jobs explicitly disable TCG (--disable-tcg), KVM is detected by
380 # the configure script. The container doesn't contain Xen headers so
381 # Xen accelerator is not detected / selected. As result it build the
382 # i386-softmmu and x86_64-softmmu with KVM being the single accelerator
383 # available.
384 build-tcg-disabled:
385   <<: *native_build_job_definition
386   needs:
387     job: amd64-centos8-container
388   variables:
389     IMAGE: centos8
390   script:
391     - mkdir build
392     - cd build
393     - ../configure --disable-tcg --audio-drv-list="" || { cat config.log meson-logs/meson-log.txt && exit 1; }
394     - make -j"$JOBS"
395     - make check-unit
396     - make check-qapi-schema
397     - cd tests/qemu-iotests/
398     - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
399             052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
400             170 171 183 184 192 194 197 208 215 221 222 226 227 236 253 277
401     - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122
402             124 132 139 142 144 145 151 152 155 157 165 194 196 197 200 202
403             208 209 215 216 218 222 227 234 246 247 248 250 254 255 257 258
404             260 261 262 263 264 270 272 273 277 279
406 build-user:
407   <<: *native_build_job_definition
408   needs:
409     job: amd64-debian-user-cross-container
410   variables:
411     IMAGE: debian-all-test-cross
412     CONFIGURE_ARGS: --disable-tools --disable-system
413     MAKE_CHECK_ARGS: check-tcg
415 build-user-static:
416   <<: *native_build_job_definition
417   needs:
418     job: amd64-debian-user-cross-container
419   variables:
420     IMAGE: debian-all-test-cross
421     CONFIGURE_ARGS: --disable-tools --disable-system --static
422     MAKE_CHECK_ARGS: check-tcg
424 # Only build the softmmu targets we have check-tcg tests for
425 build-some-softmmu:
426   <<: *native_build_job_definition
427   needs:
428     job: amd64-debian-user-cross-container
429   variables:
430     IMAGE: debian-all-test-cross
431     CONFIGURE_ARGS: --disable-tools --enable-debug
432     TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
433     MAKE_CHECK_ARGS: check-tcg
435 # Run check-tcg against linux-user (with plugins)
436 # we skip sparc64-linux-user until it has been fixed somewhat
437 # we skip cris-linux-user as it doesn't use the common run loop
438 build-user-plugins:
439   <<: *native_build_job_definition
440   needs:
441     job: amd64-debian-user-cross-container
442   variables:
443     IMAGE: debian-all-test-cross
444     CONFIGURE_ARGS: --disable-tools --disable-system --enable-plugins --enable-debug-tcg --target-list-exclude=sparc64-linux-user,cris-linux-user
445     MAKE_CHECK_ARGS: check-tcg
446   timeout: 1h 30m
448 build-user-centos7:
449   <<: *native_build_job_definition
450   variables:
451     IMAGE: centos7
452     CONFIGURE_ARGS: --disable-system --disable-tools --disable-docs
453     MAKE_CHECK_ARGS: check-tcg
455 build-some-softmmu-plugins:
456   <<: *native_build_job_definition
457   needs:
458     job: amd64-debian-user-cross-container
459   variables:
460     IMAGE: debian-all-test-cross
461     CONFIGURE_ARGS: --disable-tools --disable-user --enable-plugins --enable-debug-tcg
462     TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
463     MAKE_CHECK_ARGS: check-tcg
465 clang-system:
466   <<: *native_build_job_definition
467   needs:
468     job: amd64-fedora-container
469   variables:
470     IMAGE: fedora
471     CONFIGURE_ARGS: --cc=clang --cxx=clang++
472       --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
473     TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
474       ppc-softmmu s390x-softmmu
475     MAKE_CHECK_ARGS: check-qtest check-tcg
477 clang-user:
478   <<: *native_build_job_definition
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
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
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
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   artifacts:
510     expire_in: 2 days
511     paths:
512       - build
514 check-cfi-aarch64:
515   <<: *native_test_job_definition
516   needs:
517     - job: build-cfi-aarch64
518       artifacts: true
519   variables:
520     IMAGE: fedora
521     MAKE_CHECK_ARGS: check
523 acceptance-cfi-aarch64:
524   <<: *native_test_job_definition
525   needs:
526     - job: build-cfi-aarch64
527       artifacts: true
528   variables:
529     IMAGE: fedora
530     MAKE_CHECK_ARGS: check-acceptance
531   <<: *acceptance_definition
533 build-cfi-ppc64-s390x:
534   <<: *native_build_job_definition
535   needs:
536   - job: amd64-fedora-container
537   variables:
538     LD_JOBS: 1
539     AR: llvm-ar
540     IMAGE: fedora
541     CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
542       --enable-safe-stack --enable-slirp=git
543     TARGETS: ppc64-softmmu s390x-softmmu
544     MAKE_CHECK_ARGS: check-build
545   artifacts:
546     expire_in: 2 days
547     paths:
548       - build
550 check-cfi-ppc64-s390x:
551   <<: *native_test_job_definition
552   needs:
553     - job: build-cfi-ppc64-s390x
554       artifacts: true
555   variables:
556     IMAGE: fedora
557     MAKE_CHECK_ARGS: check
559 acceptance-cfi-ppc64-s390x:
560   <<: *native_test_job_definition
561   needs:
562     - job: build-cfi-ppc64-s390x
563       artifacts: true
564   variables:
565     IMAGE: fedora
566     MAKE_CHECK_ARGS: check-acceptance
567   <<: *acceptance_definition
569 build-cfi-x86_64:
570   <<: *native_build_job_definition
571   needs:
572   - job: amd64-fedora-container
573   variables:
574     LD_JOBS: 1
575     AR: llvm-ar
576     IMAGE: fedora
577     CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
578       --enable-safe-stack --enable-slirp=git
579     TARGETS: x86_64-softmmu
580     MAKE_CHECK_ARGS: check-build
581   artifacts:
582     expire_in: 2 days
583     paths:
584       - build
586 check-cfi-x86_64:
587   <<: *native_test_job_definition
588   needs:
589     - job: build-cfi-x86_64
590       artifacts: true
591   variables:
592     IMAGE: fedora
593     MAKE_CHECK_ARGS: check
595 acceptance-cfi-x86_64:
596   <<: *native_test_job_definition
597   needs:
598     - job: build-cfi-x86_64
599       artifacts: true
600   variables:
601     IMAGE: fedora
602     MAKE_CHECK_ARGS: check-acceptance
603   <<: *acceptance_definition
605 tsan-build:
606   <<: *native_build_job_definition
607   variables:
608     IMAGE: ubuntu2004
609     CONFIGURE_ARGS: --enable-tsan --cc=clang-10 --cxx=clang++-10 --disable-docs
610                     --enable-fdt=system --enable-slirp=system
611     TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
612     MAKE_CHECK_ARGS: bench V=1
614 # These targets are on the way out
615 build-deprecated:
616   <<: *native_build_job_definition
617   needs:
618     job: amd64-debian-user-cross-container
619   variables:
620     IMAGE: debian-all-test-cross
621     CONFIGURE_ARGS: --disable-docs --disable-tools
622     MAKE_CHECK_ARGS: build-tcg
623     TARGETS: ppc64abi32-linux-user tilegx-linux-user lm32-softmmu
624       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   variables:
646     IMAGE: ubuntu2004
647     CONFIGURE_ARGS: --enable-gprof --enable-gcov
648     MAKE_CHECK_ARGS: check
649     TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
650   timeout: 70m
651   after_script:
652     - ${CI_PROJECT_DIR}/scripts/ci/coverage-summary.sh
654 build-oss-fuzz:
655   <<: *native_build_job_definition
656   needs:
657     job: amd64-fedora-container
658   variables:
659     IMAGE: fedora
660   script:
661     - mkdir build-oss-fuzz
662     - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
663       ./scripts/oss-fuzz/build.sh
664     - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
665     - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
666                       | grep -v slirp); do
667         grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
668         echo Testing ${fuzzer} ... ;
669         "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
670       done
671     # Unrelated to fuzzer: run some tests with -fsanitize=address
672     - cd build-oss-fuzz && make check-qtest-i386 check-unit
674 build-tci:
675   <<: *native_build_job_definition
676   needs:
677     job: amd64-debian-user-cross-container
678   variables:
679     IMAGE: debian-all-test-cross
680   script:
681     - TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64"
682     - mkdir build
683     - cd build
684     - ../configure --enable-tcg-interpreter
685         --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" || { cat config.log meson-logs/meson-log.txt && exit 1; }
686     - make -j"$JOBS"
687     - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
688     - for tg in $TARGETS ; do
689         export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
690         ./tests/qtest/boot-serial-test || exit 1 ;
691         ./tests/qtest/cdrom-test || exit 1 ;
692       done
693     - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
694     - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
695     - make check-tcg
697 # Alternate coroutines implementations are only really of interest to KVM users
698 # However we can't test against KVM on Gitlab-CI so we can only run unit tests
699 build-coroutine-ucontext:
700   <<: *native_build_job_definition
701   needs:
702     job: amd64-ubuntu2004-container
703   variables:
704     IMAGE: ubuntu2004
705     CONFIGURE_ARGS: --with-coroutine=ucontext --disable-tcg
706     MAKE_CHECK_ARGS: check-unit
708 build-coroutine-sigaltstack:
709   <<: *native_build_job_definition
710   needs:
711     job: amd64-ubuntu2004-container
712   variables:
713     IMAGE: ubuntu2004
714     CONFIGURE_ARGS: --with-coroutine=sigaltstack --disable-tcg
715     MAKE_CHECK_ARGS: check-unit
717 # Most jobs test latest gcrypt or nettle builds
719 # These jobs test old gcrypt and nettle from RHEL7
720 # which had some API differences.
721 build-crypto-old-nettle:
722   <<: *native_build_job_definition
723   needs:
724     job: amd64-centos7-container
725   variables:
726     IMAGE: centos7
727     TARGETS: x86_64-softmmu x86_64-linux-user
728     CONFIGURE_ARGS: --disable-gcrypt --enable-nettle
729     MAKE_CHECK_ARGS: check-build
730   artifacts:
731     paths:
732       - build
734 check-crypto-old-nettle:
735   <<: *native_test_job_definition
736   needs:
737     - job: build-crypto-old-nettle
738       artifacts: true
739   variables:
740     IMAGE: centos7
741     MAKE_CHECK_ARGS: check
744 build-crypto-old-gcrypt:
745   <<: *native_build_job_definition
746   needs:
747     job: amd64-centos7-container
748   variables:
749     IMAGE: centos7
750     TARGETS: x86_64-softmmu x86_64-linux-user
751     CONFIGURE_ARGS: --disable-nettle --enable-gcrypt
752     MAKE_CHECK_ARGS: check-build
753   artifacts:
754     paths:
755       - build
757 check-crypto-old-gcrypt:
758   <<: *native_test_job_definition
759   needs:
760     - job: build-crypto-old-gcrypt
761       artifacts: true
762   variables:
763     IMAGE: centos7
764     MAKE_CHECK_ARGS: check
767 build-crypto-only-gnutls:
768   <<: *native_build_job_definition
769   needs:
770     job: amd64-centos7-container
771   variables:
772     IMAGE: centos7
773     TARGETS: x86_64-softmmu x86_64-linux-user
774     CONFIGURE_ARGS: --disable-nettle --disable-gcrypt --enable-gnutls
775     MAKE_CHECK_ARGS: check-build
776   artifacts:
777     paths:
778       - build
780 check-crypto-only-gnutls:
781   <<: *native_test_job_definition
782   needs:
783     - job: build-crypto-only-gnutls
784       artifacts: true
785   variables:
786     IMAGE: centos7
787     MAKE_CHECK_ARGS: check
789 # We don't need to exercise every backend with every front-end
790 build-trace-multi-user:
791   <<: *native_build_job_definition
792   needs:
793     job: amd64-ubuntu2004-container
794   variables:
795     IMAGE: ubuntu2004
796     CONFIGURE_ARGS: --enable-trace-backends=log,simple,syslog --disable-system
798 build-trace-ftrace-system:
799   <<: *native_build_job_definition
800   needs:
801     job: amd64-ubuntu2004-container
802   variables:
803     IMAGE: ubuntu2004
804     CONFIGURE_ARGS: --enable-trace-backends=ftrace --target-list=x86_64-softmmu
806 build-trace-ust-system:
807   <<: *native_build_job_definition
808   needs:
809     job: amd64-ubuntu2004-container
810   variables:
811     IMAGE: ubuntu2004
812     CONFIGURE_ARGS: --enable-trace-backends=ust --target-list=x86_64-softmmu
814 # Check our reduced build configurations
815 build-without-default-devices:
816   <<: *native_build_job_definition
817   needs:
818     job: amd64-centos8-container
819   variables:
820     IMAGE: centos8
821     CONFIGURE_ARGS: --without-default-devices --disable-user
823 build-without-default-features:
824   <<: *native_build_job_definition
825   needs:
826     job: amd64-debian-container
827   variables:
828     IMAGE: debian-amd64
829     CONFIGURE_ARGS: --without-default-features --disable-user
830         --target-list-exclude=arm-softmmu,i386-softmmu,mipsel-softmmu,mips64-softmmu,ppc-softmmu
831     MAKE_CHECK_ARGS: check-unit
833 check-patch:
834   stage: build
835   image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
836   needs:
837     job: amd64-centos8-container
838   script: .gitlab-ci.d/check-patch.py
839   except:
840     variables:
841       - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master'
842   variables:
843     GIT_DEPTH: 1000
844   allow_failure: true
846 check-dco:
847   stage: build
848   image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
849   needs:
850     job: amd64-centos8-container
851   script: .gitlab-ci.d/check-dco.py
852   except:
853     variables:
854       - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master'
855   variables:
856     GIT_DEPTH: 1000
858 build-libvhost-user:
859   stage: build
860   image: $CI_REGISTRY_IMAGE/qemu/fedora:latest
861   needs:
862     job: amd64-fedora-container
863   before_script:
864     - dnf install -y meson ninja-build
865   script:
866     - mkdir subprojects/libvhost-user/build
867     - cd subprojects/libvhost-user/build
868     - meson
869     - ninja
871 # Prepare for GitLab pages deployment. Anything copied into the
872 # "public" directory will be deployed to $USER.gitlab.io/$PROJECT
873 pages:
874   image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:latest
875   stage: test
876   needs:
877     - job: build-tools-and-docs-debian
878   script:
879     - mkdir -p public
880     # HTML-ised source tree
881     - make gtags
882     - htags -anT --tree-view=filetree -m qemu_init
883         -t "Welcome to the QEMU sourcecode"
884     - mv HTML public/src
885     # Project documentation
886     - make -C build install DESTDIR=$(pwd)/temp-install
887     - mv temp-install/usr/local/share/doc/qemu/* public/
888   artifacts:
889     paths:
890       - public