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