memory: Document flatview_for_each_range()
[qemu/ar7.git] / .gitlab-ci.yml
blobf65cb11c4d377641ed8b8322db1b5c86301a0469
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   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
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-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
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   artifacts:
506     expire_in: 2 days
507     paths:
508       - build
510 check-cfi-aarch64:
511   <<: *native_test_job_definition
512   needs:
513     - job: build-cfi-aarch64
514       artifacts: true
515   variables:
516     IMAGE: fedora
517     MAKE_CHECK_ARGS: check
519 acceptance-cfi-aarch64:
520   <<: *native_test_job_definition
521   needs:
522     - job: build-cfi-aarch64
523       artifacts: true
524   variables:
525     IMAGE: fedora
526     MAKE_CHECK_ARGS: check-acceptance
527   <<: *acceptance_definition
529 build-cfi-ppc64-s390x:
530   <<: *native_build_job_definition
531   needs:
532   - job: amd64-fedora-container
533   variables:
534     LD_JOBS: 1
535     AR: llvm-ar
536     IMAGE: fedora
537     CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
538       --enable-safe-stack --enable-slirp=git
539     TARGETS: ppc64-softmmu s390x-softmmu
540     MAKE_CHECK_ARGS: check-build
541   artifacts:
542     expire_in: 2 days
543     paths:
544       - build
546 check-cfi-ppc64-s390x:
547   <<: *native_test_job_definition
548   needs:
549     - job: build-cfi-ppc64-s390x
550       artifacts: true
551   variables:
552     IMAGE: fedora
553     MAKE_CHECK_ARGS: check
555 acceptance-cfi-ppc64-s390x:
556   <<: *native_test_job_definition
557   needs:
558     - job: build-cfi-ppc64-s390x
559       artifacts: true
560   variables:
561     IMAGE: fedora
562     MAKE_CHECK_ARGS: check-acceptance
563   <<: *acceptance_definition
565 build-cfi-x86_64:
566   <<: *native_build_job_definition
567   needs:
568   - job: amd64-fedora-container
569   variables:
570     LD_JOBS: 1
571     AR: llvm-ar
572     IMAGE: fedora
573     CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
574       --enable-safe-stack --enable-slirp=git
575     TARGETS: x86_64-softmmu
576     MAKE_CHECK_ARGS: check-build
577   artifacts:
578     expire_in: 2 days
579     paths:
580       - build
582 check-cfi-x86_64:
583   <<: *native_test_job_definition
584   needs:
585     - job: build-cfi-x86_64
586       artifacts: true
587   variables:
588     IMAGE: fedora
589     MAKE_CHECK_ARGS: check
591 acceptance-cfi-x86_64:
592   <<: *native_test_job_definition
593   needs:
594     - job: build-cfi-x86_64
595       artifacts: true
596   variables:
597     IMAGE: fedora
598     MAKE_CHECK_ARGS: check-acceptance
599   <<: *acceptance_definition
601 tsan-build:
602   <<: *native_build_job_definition
603   needs:
604     job: amd64-ubuntu2004-container
605   variables:
606     IMAGE: ubuntu2004
607     CONFIGURE_ARGS: --enable-tsan --cc=clang-10 --cxx=clang++-10 --disable-docs
608                     --enable-fdt=system --enable-slirp=system
609     TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
610     MAKE_CHECK_ARGS: bench V=1
612 # These targets are on the way out
613 build-deprecated:
614   <<: *native_build_job_definition
615   needs:
616     job: amd64-debian-user-cross-container
617   variables:
618     IMAGE: debian-all-test-cross
619     CONFIGURE_ARGS: --disable-docs --disable-tools
620     MAKE_CHECK_ARGS: build-tcg
621     TARGETS: ppc64abi32-linux-user lm32-softmmu unicore32-softmmu
622   artifacts:
623     expire_in: 2 days
624     paths:
625       - build
627 # We split the check-tcg step as test failures are expected but we still
628 # want to catch the build breaking.
629 check-deprecated:
630   <<: *native_test_job_definition
631   needs:
632     - job: build-deprecated
633       artifacts: true
634   variables:
635     IMAGE: debian-all-test-cross
636     MAKE_CHECK_ARGS: check-tcg
637   allow_failure: true
639 # gprof/gcov are GCC features
640 gprof-gcov:
641   <<: *native_build_job_definition
642   needs:
643     job: amd64-ubuntu2004-container
644   variables:
645     IMAGE: ubuntu2004
646     CONFIGURE_ARGS: --enable-gprof --enable-gcov
647     MAKE_CHECK_ARGS: check
648     TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
649   timeout: 70m
650   after_script:
651     - ${CI_PROJECT_DIR}/scripts/ci/coverage-summary.sh
653 build-oss-fuzz:
654   <<: *native_build_job_definition
655   needs:
656     job: amd64-fedora-container
657   variables:
658     IMAGE: fedora
659   script:
660     - mkdir build-oss-fuzz
661     - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
662       ./scripts/oss-fuzz/build.sh
663     - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
664     - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
665                       | grep -v slirp); do
666         grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
667         echo Testing ${fuzzer} ... ;
668         "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
669       done
670     # Unrelated to fuzzer: run some tests with -fsanitize=address
671     - cd build-oss-fuzz && make check-qtest-i386 check-unit
673 build-tci:
674   <<: *native_build_job_definition
675   needs:
676     job: amd64-debian-user-cross-container
677   variables:
678     IMAGE: debian-all-test-cross
679   script:
680     - TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64"
681     - mkdir build
682     - cd build
683     - ../configure --enable-tcg-interpreter
684         --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" || { cat config.log meson-logs/meson-log.txt && exit 1; }
685     - make -j"$JOBS"
686     - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
687     - for tg in $TARGETS ; do
688         export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
689         ./tests/qtest/boot-serial-test || exit 1 ;
690         ./tests/qtest/cdrom-test || exit 1 ;
691       done
692     - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
693     - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
694     - make check-tcg
696 # Alternate coroutines implementations are only really of interest to KVM users
697 # However we can't test against KVM on Gitlab-CI so we can only run unit tests
698 build-coroutine-sigaltstack:
699   <<: *native_build_job_definition
700   needs:
701     job: amd64-ubuntu2004-container
702   variables:
703     IMAGE: ubuntu2004
704     CONFIGURE_ARGS: --with-coroutine=sigaltstack --disable-tcg
705     MAKE_CHECK_ARGS: check-unit
707 # Most jobs test latest gcrypt or nettle builds
709 # These jobs test old gcrypt and nettle from RHEL7
710 # which had some API differences.
711 crypto-old-nettle:
712   <<: *native_build_job_definition
713   needs:
714     job: amd64-centos7-container
715   variables:
716     IMAGE: centos7
717     TARGETS: x86_64-softmmu x86_64-linux-user
718     CONFIGURE_ARGS: --disable-gcrypt --enable-nettle
719     MAKE_CHECK_ARGS: check
721 crypto-old-gcrypt:
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-nettle --enable-gcrypt
729     MAKE_CHECK_ARGS: check
731 crypto-only-gnutls:
732   <<: *native_build_job_definition
733   needs:
734     job: amd64-centos7-container
735   variables:
736     IMAGE: centos7
737     TARGETS: x86_64-softmmu x86_64-linux-user
738     CONFIGURE_ARGS: --disable-nettle --disable-gcrypt --enable-gnutls
739     MAKE_CHECK_ARGS: check
742 # We don't need to exercise every backend with every front-end
743 build-trace-multi-user:
744   <<: *native_build_job_definition
745   needs:
746     job: amd64-ubuntu2004-container
747   variables:
748     IMAGE: ubuntu2004
749     CONFIGURE_ARGS: --enable-trace-backends=log,simple,syslog --disable-system
751 build-trace-ftrace-system:
752   <<: *native_build_job_definition
753   needs:
754     job: amd64-ubuntu2004-container
755   variables:
756     IMAGE: ubuntu2004
757     CONFIGURE_ARGS: --enable-trace-backends=ftrace --target-list=x86_64-softmmu
759 build-trace-ust-system:
760   <<: *native_build_job_definition
761   needs:
762     job: amd64-ubuntu2004-container
763   variables:
764     IMAGE: ubuntu2004
765     CONFIGURE_ARGS: --enable-trace-backends=ust --target-list=x86_64-softmmu
767 # Check our reduced build configurations
768 build-without-default-devices:
769   <<: *native_build_job_definition
770   needs:
771     job: amd64-centos8-container
772   variables:
773     IMAGE: centos8
774     CONFIGURE_ARGS: --without-default-devices --disable-user
776 build-without-default-features:
777   <<: *native_build_job_definition
778   needs:
779     job: amd64-debian-container
780   variables:
781     IMAGE: debian-amd64
782     CONFIGURE_ARGS: --without-default-features --disable-user
783         --target-list-exclude=arm-softmmu,i386-softmmu,mipsel-softmmu,mips64-softmmu,ppc-softmmu
784     MAKE_CHECK_ARGS: check-unit
786 check-patch:
787   stage: build
788   image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
789   needs:
790     job: amd64-centos8-container
791   script: .gitlab-ci.d/check-patch.py
792   except:
793     variables:
794       - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master'
795   variables:
796     GIT_DEPTH: 1000
797   allow_failure: true
799 check-dco:
800   stage: build
801   image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
802   needs:
803     job: amd64-centos8-container
804   script: .gitlab-ci.d/check-dco.py
805   except:
806     variables:
807       - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master'
808   variables:
809     GIT_DEPTH: 1000
811 build-libvhost-user:
812   stage: build
813   image: $CI_REGISTRY_IMAGE/qemu/fedora:latest
814   needs:
815     job: amd64-fedora-container
816   before_script:
817     - dnf install -y meson ninja-build
818   script:
819     - mkdir subprojects/libvhost-user/build
820     - cd subprojects/libvhost-user/build
821     - meson
822     - ninja
824 # No targets are built here, just tools, docs, and unit tests. This
825 # also feeds into the eventual documentation deployment steps later
826 build-tools-and-docs-debian:
827   <<: *native_build_job_definition
828   needs:
829     job: amd64-debian-container
830   variables:
831     IMAGE: debian-amd64
832     MAKE_CHECK_ARGS: check-unit check-softfloat ctags TAGS cscope
833     CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
834   artifacts:
835     expire_in: 2 days
836     paths:
837       - build
839 # Prepare for GitLab pages deployment. Anything copied into the
840 # "public" directory will be deployed to $USER.gitlab.io/$PROJECT
841 pages:
842   image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:latest
843   stage: test
844   needs:
845     - job: build-tools-and-docs-debian
846   script:
847     - mkdir -p public
848     # HTML-ised source tree
849     - make gtags
850     - htags -anT --tree-view=filetree -m qemu_init
851         -t "Welcome to the QEMU sourcecode"
852     - mv HTML public/src
853     # Project documentation
854     - make -C build install DESTDIR=$(pwd)/temp-install
855     - mv temp-install/usr/local/share/doc/qemu/* public/
856   artifacts:
857     paths:
858       - public