hmp-commands: expand type of icount to "l" in replay commands
[qemu.git] / .gitlab-ci.yml
blob6a0d311cf40579b614f655e4bc485ad216bf751f
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:
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
44 .native_test_job_template:
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
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
85 build-system-alpine:
86   extends: .native_build_job_template
87   needs:
88     - job: amd64-alpine-container
89   variables:
90     IMAGE: alpine
91     TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
92       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
101 check-system-alpine:
102   extends: .native_test_job_template
103   needs:
104     - job: build-system-alpine
105       artifacts: true
106   variables:
107     IMAGE: alpine
108     MAKE_CHECK_ARGS: check
110 acceptance-system-alpine:
111   extends: .native_test_job_template
112   needs:
113     - job: build-system-alpine
114       artifacts: true
115   variables:
116     IMAGE: alpine
117     MAKE_CHECK_ARGS: check-acceptance
118   <<: *acceptance_definition
120 build-system-ubuntu:
121   extends: .native_build_job_template
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       microblazeel-softmmu mips64el-softmmu
129     MAKE_CHECK_ARGS: check-build
130   artifacts:
131     expire_in: 2 days
132     paths:
133       - build
135 check-system-ubuntu:
136   extends: .native_test_job_template
137   needs:
138     - job: build-system-ubuntu
139       artifacts: true
140   variables:
141     IMAGE: ubuntu2004
142     MAKE_CHECK_ARGS: check
144 acceptance-system-ubuntu:
145   extends: .native_test_job_template
146   needs:
147     - job: build-system-ubuntu
148       artifacts: true
149   variables:
150     IMAGE: ubuntu2004
151     MAKE_CHECK_ARGS: check-acceptance
152   <<: *acceptance_definition
154 build-system-debian:
155   extends: .native_build_job_template
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
169 check-system-debian:
170   extends: .native_test_job_template
171   needs:
172     - job: build-system-debian
173       artifacts: true
174   variables:
175     IMAGE: debian-amd64
176     MAKE_CHECK_ARGS: check
178 acceptance-system-debian:
179   extends: .native_test_job_template
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
188 build-system-fedora:
189   extends: .native_build_job_template
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
204 check-system-fedora:
205   extends: .native_test_job_template
206   needs:
207     - job: build-system-fedora
208       artifacts: true
209   variables:
210     IMAGE: fedora
211     MAKE_CHECK_ARGS: check
213 acceptance-system-fedora:
214   extends: .native_test_job_template
215   needs:
216     - job: build-system-fedora
217       artifacts: true
218   variables:
219     IMAGE: fedora
220     MAKE_CHECK_ARGS: check-acceptance
221   <<: *acceptance_definition
223 build-system-centos:
224   extends: .native_build_job_template
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
239 check-system-centos:
240   extends: .native_test_job_template
241   needs:
242     - job: build-system-centos
243       artifacts: true
244   variables:
245     IMAGE: centos8
246     MAKE_CHECK_ARGS: check
248 acceptance-system-centos:
249   extends: .native_test_job_template
250   needs:
251     - job: build-system-centos
252       artifacts: true
253   variables:
254     IMAGE: centos8
255     MAKE_CHECK_ARGS: check-acceptance
256   <<: *acceptance_definition
258 build-system-opensuse:
259   extends: .native_build_job_template
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
272 check-system-opensuse:
273   extends: .native_test_job_template
274   needs:
275     - job: build-system-opensuse
276       artifacts: true
277   variables:
278     IMAGE: opensuse-leap
279     MAKE_CHECK_ARGS: check
281 acceptance-system-opensuse:
282   extends: .native_test_job_template
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
292 build-disabled:
293   extends: .native_build_job_template
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-slirp
346       --disable-smartcard
347       --disable-snappy
348       --disable-sparse
349       --disable-spice
350       --disable-strip
351       --disable-tpm
352       --disable-usb-redir
353       --disable-vdi
354       --disable-vhost-crypto
355       --disable-vhost-net
356       --disable-vhost-scsi
357       --disable-vhost-kernel
358       --disable-vhost-user
359       --disable-vhost-vdpa
360       --disable-vhost-vsock
361       --disable-virglrenderer
362       --disable-vnc
363       --disable-vte
364       --disable-vvfat
365       --disable-xen
366       --disable-zstd
367     TARGETS: arm-softmmu i386-softmmu ppc64-softmmu mips64-softmmu
368       s390x-softmmu i386-linux-user
369     MAKE_CHECK_ARGS: check-qtest SPEED=slow
371 # This jobs explicitly disable TCG (--disable-tcg), KVM is detected by
372 # the configure script. The container doesn't contain Xen headers so
373 # Xen accelerator is not detected / selected. As result it build the
374 # i386-softmmu and x86_64-softmmu with KVM being the single accelerator
375 # available.
376 # Also use a different coroutine implementation (which is only really of
377 # interest to KVM users, i.e. with TCG disabled)
378 build-tcg-disabled:
379   extends: .native_build_job_template
380   needs:
381     job: amd64-centos8-container
382   variables:
383     IMAGE: centos8
384   script:
385     - mkdir build
386     - cd build
387     - ../configure --disable-tcg --audio-drv-list="" --with-coroutine=ucontext
388       || { cat config.log meson-logs/meson-log.txt && exit 1; }
389     - make -j"$JOBS"
390     - make check-unit
391     - make check-qapi-schema
392     - cd tests/qemu-iotests/
393     - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
394             052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
395             170 171 183 184 192 194 197 208 215 221 222 226 227 236 253 277
396     - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122
397             124 132 139 142 144 145 151 152 155 157 165 194 196 197 200 202
398             208 209 215 216 218 222 227 234 246 247 248 250 254 255 257 258
399             260 261 262 263 264 270 272 273 277 279
401 build-user:
402   extends: .native_build_job_template
403   needs:
404     job: amd64-debian-user-cross-container
405   variables:
406     IMAGE: debian-all-test-cross
407     CONFIGURE_ARGS: --disable-tools --disable-system
408     MAKE_CHECK_ARGS: check-tcg
410 build-user-static:
411   extends: .native_build_job_template
412   needs:
413     job: amd64-debian-user-cross-container
414   variables:
415     IMAGE: debian-all-test-cross
416     CONFIGURE_ARGS: --disable-tools --disable-system --static
417     MAKE_CHECK_ARGS: check-tcg
419 # Because the hexagon cross-compiler takes so long to build we don't rely
420 # on the CI system to build it and hence this job has an optional dependency
421 # declared. The image is manually uploaded.
422 build-user-hexagon:
423   extends: .native_build_job_template
424   needs:
425     job: hexagon-cross-container
426     optional: true
427   variables:
428     IMAGE: debian-hexagon-cross
429     TARGETS: hexagon-linux-user
430     CONFIGURE_ARGS: --disable-tools --disable-docs --enable-debug-tcg
431     MAKE_CHECK_ARGS: check-tcg
433 # Only build the softmmu targets we have check-tcg tests for
434 build-some-softmmu:
435   extends: .native_build_job_template
436   needs:
437     job: amd64-debian-user-cross-container
438   variables:
439     IMAGE: debian-all-test-cross
440     CONFIGURE_ARGS: --disable-tools --enable-debug
441     TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
442     MAKE_CHECK_ARGS: check-tcg
444 # Run check-tcg against linux-user (with plugins)
445 # we skip sparc64-linux-user until it has been fixed somewhat
446 # we skip cris-linux-user as it doesn't use the common run loop
447 build-user-plugins:
448   extends: .native_build_job_template
449   needs:
450     job: amd64-debian-user-cross-container
451   variables:
452     IMAGE: debian-all-test-cross
453     CONFIGURE_ARGS: --disable-tools --disable-system --enable-plugins --enable-debug-tcg --target-list-exclude=sparc64-linux-user,cris-linux-user
454     MAKE_CHECK_ARGS: check-tcg
455   timeout: 1h 30m
457 build-user-centos7:
458   extends: .native_build_job_template
459   needs:
460     job: amd64-centos7-container
461   variables:
462     IMAGE: centos7
463     CONFIGURE_ARGS: --disable-system --disable-tools --disable-docs
464     MAKE_CHECK_ARGS: check-tcg
466 build-some-softmmu-plugins:
467   extends: .native_build_job_template
468   needs:
469     job: amd64-debian-user-cross-container
470   variables:
471     IMAGE: debian-all-test-cross
472     CONFIGURE_ARGS: --disable-tools --disable-user --enable-plugins --enable-debug-tcg
473     TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
474     MAKE_CHECK_ARGS: check-tcg
476 clang-system:
477   extends: .native_build_job_template
478   needs:
479     job: amd64-fedora-container
480   variables:
481     IMAGE: fedora
482     CONFIGURE_ARGS: --cc=clang --cxx=clang++
483       --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
484     TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
485       ppc-softmmu s390x-softmmu
486     MAKE_CHECK_ARGS: check-qtest check-tcg
488 clang-user:
489   extends: .native_build_job_template
490   needs:
491     job: amd64-debian-user-cross-container
492   variables:
493     IMAGE: debian-all-test-cross
494     CONFIGURE_ARGS: --cc=clang --cxx=clang++ --disable-system
495       --target-list-exclude=microblazeel-linux-user,aarch64_be-linux-user,i386-linux-user,m68k-linux-user,mipsn32el-linux-user,xtensaeb-linux-user
496       --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
497     MAKE_CHECK_ARGS: check-unit check-tcg
499 # Set LD_JOBS=1 because this requires LTO and ld consumes a large amount of memory.
500 # On gitlab runners, default value sometimes end up calling 2 lds concurrently and
501 # triggers an Out-Of-Memory error
503 # Since slirp callbacks are used in QEMU Timers, slirp needs to be compiled together
504 # with QEMU and linked as a static library to avoid false positives in CFI checks.
505 # This can be accomplished by using -enable-slirp=git, which avoids the use of
506 # a system-wide version of the library
508 # Split in three sets of build/check/acceptance to limit the execution time of each
509 # job
510 build-cfi-aarch64:
511   extends: .native_build_job_template
512   needs:
513   - job: amd64-fedora-container
514   variables:
515     LD_JOBS: 1
516     AR: llvm-ar
517     IMAGE: fedora
518     CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
519       --enable-safe-stack --enable-slirp=git
520     TARGETS: aarch64-softmmu
521     MAKE_CHECK_ARGS: check-build
522   timeout: 70m
523   artifacts:
524     expire_in: 2 days
525     paths:
526       - build
528 check-cfi-aarch64:
529   extends: .native_test_job_template
530   needs:
531     - job: build-cfi-aarch64
532       artifacts: true
533   variables:
534     IMAGE: fedora
535     MAKE_CHECK_ARGS: check
537 acceptance-cfi-aarch64:
538   extends: .native_test_job_template
539   needs:
540     - job: build-cfi-aarch64
541       artifacts: true
542   variables:
543     IMAGE: fedora
544     MAKE_CHECK_ARGS: check-acceptance
545   <<: *acceptance_definition
547 build-cfi-ppc64-s390x:
548   extends: .native_build_job_template
549   needs:
550   - job: amd64-fedora-container
551   variables:
552     LD_JOBS: 1
553     AR: llvm-ar
554     IMAGE: fedora
555     CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
556       --enable-safe-stack --enable-slirp=git
557     TARGETS: ppc64-softmmu s390x-softmmu
558     MAKE_CHECK_ARGS: check-build
559   timeout: 70m
560   artifacts:
561     expire_in: 2 days
562     paths:
563       - build
565 check-cfi-ppc64-s390x:
566   extends: .native_test_job_template
567   needs:
568     - job: build-cfi-ppc64-s390x
569       artifacts: true
570   variables:
571     IMAGE: fedora
572     MAKE_CHECK_ARGS: check
574 acceptance-cfi-ppc64-s390x:
575   extends: .native_test_job_template
576   needs:
577     - job: build-cfi-ppc64-s390x
578       artifacts: true
579   variables:
580     IMAGE: fedora
581     MAKE_CHECK_ARGS: check-acceptance
582   <<: *acceptance_definition
584 build-cfi-x86_64:
585   extends: .native_build_job_template
586   needs:
587   - job: amd64-fedora-container
588   variables:
589     LD_JOBS: 1
590     AR: llvm-ar
591     IMAGE: fedora
592     CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
593       --enable-safe-stack --enable-slirp=git
594     TARGETS: x86_64-softmmu
595     MAKE_CHECK_ARGS: check-build
596   timeout: 70m
597   artifacts:
598     expire_in: 2 days
599     paths:
600       - build
602 check-cfi-x86_64:
603   extends: .native_test_job_template
604   needs:
605     - job: build-cfi-x86_64
606       artifacts: true
607   variables:
608     IMAGE: fedora
609     MAKE_CHECK_ARGS: check
611 acceptance-cfi-x86_64:
612   extends: .native_test_job_template
613   needs:
614     - job: build-cfi-x86_64
615       artifacts: true
616   variables:
617     IMAGE: fedora
618     MAKE_CHECK_ARGS: check-acceptance
619   <<: *acceptance_definition
621 tsan-build:
622   extends: .native_build_job_template
623   needs:
624     job: amd64-ubuntu2004-container
625   variables:
626     IMAGE: ubuntu2004
627     CONFIGURE_ARGS: --enable-tsan --cc=clang-10 --cxx=clang++-10
628           --enable-trace-backends=ust --enable-fdt=system --enable-slirp=system
629     TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
630     MAKE_CHECK_ARGS: bench V=1
632 # These targets are on the way out
633 build-deprecated:
634   extends: .native_build_job_template
635   needs:
636     job: amd64-debian-user-cross-container
637   variables:
638     IMAGE: debian-all-test-cross
639     CONFIGURE_ARGS: --disable-tools
640     MAKE_CHECK_ARGS: build-tcg
641     TARGETS: ppc64abi32-linux-user
642   artifacts:
643     expire_in: 2 days
644     paths:
645       - build
647 # We split the check-tcg step as test failures are expected but we still
648 # want to catch the build breaking.
649 check-deprecated:
650   extends: .native_test_job_template
651   needs:
652     - job: build-deprecated
653       artifacts: true
654   variables:
655     IMAGE: debian-all-test-cross
656     MAKE_CHECK_ARGS: check-tcg
657   allow_failure: true
659 # gprof/gcov are GCC features
660 gprof-gcov:
661   extends: .native_build_job_template
662   needs:
663     job: amd64-ubuntu2004-container
664   variables:
665     IMAGE: ubuntu2004
666     CONFIGURE_ARGS: --enable-gprof --enable-gcov
667     MAKE_CHECK_ARGS: check
668     TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
669   timeout: 70m
670   after_script:
671     - ${CI_PROJECT_DIR}/scripts/ci/coverage-summary.sh
673 build-oss-fuzz:
674   extends: .native_build_job_template
675   needs:
676     job: amd64-fedora-container
677   variables:
678     IMAGE: fedora
679   script:
680     - mkdir build-oss-fuzz
681     - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
682       ./scripts/oss-fuzz/build.sh
683     - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
684     - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
685                       | grep -v slirp); do
686         grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
687         echo Testing ${fuzzer} ... ;
688         "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
689       done
690     # Unrelated to fuzzer: run some tests with -fsanitize=address
691     - cd build-oss-fuzz && make check-qtest-i386 check-unit
693 build-tci:
694   extends: .native_build_job_template
695   needs:
696     job: amd64-debian-user-cross-container
697   variables:
698     IMAGE: debian-all-test-cross
699   script:
700     - TARGETS="aarch64 alpha arm hppa m68k microblaze ppc64 s390x x86_64"
701     - mkdir build
702     - cd build
703     - ../configure --enable-tcg-interpreter
704         --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" || { cat config.log meson-logs/meson-log.txt && exit 1; }
705     - make -j"$JOBS"
706     - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
707     - for tg in $TARGETS ; do
708         export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
709         ./tests/qtest/boot-serial-test || exit 1 ;
710         ./tests/qtest/cdrom-test || exit 1 ;
711       done
712     - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
713     - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
714     - make check-tcg
716 # Alternate coroutines implementations are only really of interest to KVM users
717 # However we can't test against KVM on Gitlab-CI so we can only run unit tests
718 build-coroutine-sigaltstack:
719   extends: .native_build_job_template
720   needs:
721     job: amd64-ubuntu2004-container
722   variables:
723     IMAGE: ubuntu2004
724     CONFIGURE_ARGS: --with-coroutine=sigaltstack --disable-tcg
725                     --enable-trace-backends=ftrace
726     MAKE_CHECK_ARGS: check-unit
728 # Most jobs test latest gcrypt or nettle builds
730 # These jobs test old gcrypt and nettle from RHEL7
731 # which had some API differences.
732 crypto-old-nettle:
733   extends: .native_build_job_template
734   needs:
735     job: amd64-centos7-container
736   variables:
737     IMAGE: centos7
738     TARGETS: x86_64-softmmu x86_64-linux-user
739     CONFIGURE_ARGS: --disable-gcrypt --enable-nettle
740     MAKE_CHECK_ARGS: check
742 crypto-old-gcrypt:
743   extends: .native_build_job_template
744   needs:
745     job: amd64-centos7-container
746   variables:
747     IMAGE: centos7
748     TARGETS: x86_64-softmmu x86_64-linux-user
749     CONFIGURE_ARGS: --disable-nettle --enable-gcrypt
750     MAKE_CHECK_ARGS: check
752 crypto-only-gnutls:
753   extends: .native_build_job_template
754   needs:
755     job: amd64-centos7-container
756   variables:
757     IMAGE: centos7
758     TARGETS: x86_64-softmmu x86_64-linux-user
759     CONFIGURE_ARGS: --disable-nettle --disable-gcrypt --enable-gnutls
760     MAKE_CHECK_ARGS: check
763 # Check our reduced build configurations
764 build-without-default-devices:
765   extends: .native_build_job_template
766   needs:
767     job: amd64-centos8-container
768   variables:
769     IMAGE: centos8
770     CONFIGURE_ARGS: --without-default-devices --disable-user
772 build-without-default-features:
773   extends: .native_build_job_template
774   needs:
775     job: amd64-debian-container
776   variables:
777     IMAGE: debian-amd64
778     CONFIGURE_ARGS: --without-default-features --disable-user
779         --target-list-exclude=arm-softmmu,i386-softmmu,mipsel-softmmu,mips64-softmmu,ppc-softmmu
780     MAKE_CHECK_ARGS: check-unit
782 check-patch:
783   stage: build
784   image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
785   needs:
786     job: amd64-centos8-container
787   script: .gitlab-ci.d/check-patch.py
788   except:
789     variables:
790       - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master'
791   variables:
792     GIT_DEPTH: 1000
793   allow_failure: true
795 check-dco:
796   stage: build
797   image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
798   needs:
799     job: amd64-centos8-container
800   script: .gitlab-ci.d/check-dco.py
801   except:
802     variables:
803       - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master'
804   variables:
805     GIT_DEPTH: 1000
807 build-libvhost-user:
808   stage: build
809   image: $CI_REGISTRY_IMAGE/qemu/fedora:latest
810   needs:
811     job: amd64-fedora-container
812   before_script:
813     - dnf install -y meson ninja-build
814   script:
815     - mkdir subprojects/libvhost-user/build
816     - cd subprojects/libvhost-user/build
817     - meson
818     - ninja
820 # No targets are built here, just tools, docs, and unit tests. This
821 # also feeds into the eventual documentation deployment steps later
822 build-tools-and-docs-debian:
823   extends: .native_build_job_template
824   needs:
825     job: amd64-debian-container
826   variables:
827     IMAGE: debian-amd64
828     MAKE_CHECK_ARGS: check-unit check-softfloat ctags TAGS cscope
829     CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
830   artifacts:
831     expire_in: 2 days
832     paths:
833       - build
835 # Prepare for GitLab pages deployment. Anything copied into the
836 # "public" directory will be deployed to $USER.gitlab.io/$PROJECT
837 pages:
838   image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:latest
839   stage: test
840   needs:
841     - job: build-tools-and-docs-debian
842   script:
843     - mkdir -p public
844     # HTML-ised source tree
845     - make gtags
846     - htags -anT --tree-view=filetree -m qemu_init
847         -t "Welcome to the QEMU sourcecode"
848     - mv HTML public/src
849     # Project documentation
850     - make -C build install DESTDIR=$(pwd)/temp-install
851     - mv temp-install/usr/local/share/doc/qemu/* public/
852   artifacts:
853     paths:
854       - public