]> git.proxmox.com Git - mirror_qemu.git/blame - .gitlab-ci.yml
iotests: Test mirror-top filter permissions
[mirror_qemu.git] / .gitlab-ci.yml
CommitLineData
c5008c76
AB
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)
d0caa0a8
DB
4stages:
5 - containers
fa821f23 6 - containers-layer2
d0caa0a8 7 - build
c5008c76 8 - test
d0caa0a8 9
71920809 10include:
922febe2
TH
11 - local: '/.gitlab-ci.d/edk2.yml'
12 - local: '/.gitlab-ci.d/opensbi.yml'
fa821f23 13 - local: '/.gitlab-ci.d/containers.yml'
6bcb5fc0 14 - local: '/.gitlab-ci.d/crossbuilds.yml'
71920809 15
c962864f
DB
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
a9eb2df2 26 ../configure --enable-werror --disable-docs $CONFIGURE_ARGS --target-list="$TARGETS" ;
c962864f 27 else
a9eb2df2 28 ../configure --enable-werror --disable-docs $CONFIGURE_ARGS ;
c47110d9 29 fi || { cat config.log meson-logs/meson-log.txt && exit 1; }
e6d27a9c
DB
30 - if test -n "$LD_JOBS";
31 then
32 meson configure . -Dbackend_max_links="$LD_JOBS" ;
33 fi || exit 1;
c962864f 34 - make -j"$JOBS"
c5008c76
AB
35 - if test -n "$MAKE_CHECK_ARGS";
36 then
a6eeac3b 37 make -j"$JOBS" $MAKE_CHECK_ARGS ;
c5008c76
AB
38 fi
39
40.native_test_job_template: &native_test_job_definition
41 stage: test
42 image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
43 script:
12a917a1 44 - scripts/git-submodule.sh update
5186685e 45 $(sed -n '/GIT_SUBMODULES=/ s/.*=// p' build/config-host.mak)
c5008c76
AB
46 - cd build
47 - find . -type f -exec touch {} +
12a917a1
TH
48 # Avoid recompiling by hiding ninja with NINJA=":"
49 - make NINJA=":" $MAKE_CHECK_ARGS
c5008c76 50
5896c539
TH
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
ec4d2feb 57 artifacts:
df063546
WSM
58 name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
59 when: always
60 expire_in: 2 days
ec4d2feb
CR
61 paths:
62 - build/tests/results/latest/results.xml
df063546 63 - build/tests/results/latest/test-results
ec4d2feb
CR
64 reports:
65 junit: build/tests/results/latest/results.xml
5896c539
TH
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
c071f19b 71 - echo -e '[job.output.testlogs]\nstatuses = ["FAIL", "INTERRUPT"]'
ba2232ba 72 >> ~/.config/avocado/avocado.conf
5896c539
TH
73 - if [ -d ${CI_PROJECT_DIR}/avocado-cache ]; then
74 du -chs ${CI_PROJECT_DIR}/avocado-cache ;
75 fi
67202bae 76 - export AVOCADO_ALLOW_UNTRUSTED_CODE=1
c5008c76
AB
77 after_script:
78 - cd build
5896c539 79 - du -chs ${CI_PROJECT_DIR}/avocado-cache
0a8b05c7 80
b22786ea
JY
81build-system-alpine:
82 <<: *native_build_job_definition
9f3a24cf
PMD
83 needs:
84 - job: amd64-alpine-container
b22786ea
JY
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
65aff820 90 CONFIGURE_ARGS: --enable-docs --enable-trace-backends=log,simple,syslog
b22786ea
JY
91 artifacts:
92 expire_in: 2 days
93 paths:
94 - .git-submodule-status
95 - build
96
97check-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
105
106acceptance-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
115
699616db 116build-system-ubuntu:
c962864f 117 <<: *native_build_job_definition
764a0747
DB
118 needs:
119 job: amd64-ubuntu2004-container
c962864f
DB
120 variables:
121 IMAGE: ubuntu2004
a9eb2df2 122 CONFIGURE_ARGS: --enable-docs --enable-fdt=system --enable-slirp=system
699616db
TH
123 TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
124 moxie-softmmu microblazeel-softmmu mips64el-softmmu
a6eeac3b 125 MAKE_CHECK_ARGS: check-build
c5008c76 126 artifacts:
0a796d63 127 expire_in: 2 days
c5008c76
AB
128 paths:
129 - build
130
699616db 131check-system-ubuntu:
c5008c76
AB
132 <<: *native_test_job_definition
133 needs:
699616db 134 - job: build-system-ubuntu
c5008c76
AB
135 artifacts: true
136 variables:
137 IMAGE: ubuntu2004
c962864f 138 MAKE_CHECK_ARGS: check
0a8b05c7 139
699616db 140acceptance-system-ubuntu:
c5008c76
AB
141 <<: *native_test_job_definition
142 needs:
699616db 143 - job: build-system-ubuntu
c5008c76
AB
144 artifacts: true
145 variables:
146 IMAGE: ubuntu2004
147 MAKE_CHECK_ARGS: check-acceptance
5896c539 148 <<: *acceptance_definition
c5008c76 149
699616db
TH
150build-system-debian:
151 <<: *native_build_job_definition
764a0747
DB
152 needs:
153 job: amd64-debian-container
699616db
TH
154 variables:
155 IMAGE: debian-amd64
db0108d5 156 CONFIGURE_ARGS: --enable-fdt=system
699616db
TH
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:
0a796d63 161 expire_in: 2 days
699616db
TH
162 paths:
163 - build
164
165check-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
173
174acceptance-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
5896c539 182 <<: *acceptance_definition
699616db
TH
183
184build-system-fedora:
c962864f 185 <<: *native_build_job_definition
764a0747
DB
186 needs:
187 job: amd64-fedora-container
c962864f
DB
188 variables:
189 IMAGE: fedora
d0f26e68 190 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs
db0108d5 191 --enable-fdt=system --enable-slirp=system --enable-capstone=system
3ffc7f01 192 TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
699616db 193 xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
a6eeac3b 194 MAKE_CHECK_ARGS: check-build
c5008c76 195 artifacts:
0a796d63 196 expire_in: 2 days
c5008c76
AB
197 paths:
198 - build
199
699616db 200check-system-fedora:
c5008c76
AB
201 <<: *native_test_job_definition
202 needs:
699616db 203 - job: build-system-fedora
c5008c76
AB
204 artifacts: true
205 variables:
206 IMAGE: fedora
c962864f 207 MAKE_CHECK_ARGS: check
0a8b05c7 208
699616db 209acceptance-system-fedora:
c5008c76
AB
210 <<: *native_test_job_definition
211 needs:
699616db 212 - job: build-system-fedora
c5008c76
AB
213 artifacts: true
214 variables:
215 IMAGE: fedora
216 MAKE_CHECK_ARGS: check-acceptance
5896c539 217 <<: *acceptance_definition
c5008c76 218
699616db
TH
219build-system-centos:
220 <<: *native_build_job_definition
764a0747
DB
221 needs:
222 job: amd64-centos8-container
699616db
TH
223 variables:
224 IMAGE: centos8
db0108d5 225 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-fdt=system
a2e5bbf0 226 --enable-modules --enable-trace-backends=dtrace
3ffc7f01 227 TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
699616db
TH
228 x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
229 MAKE_CHECK_ARGS: check-build
230 artifacts:
0a796d63 231 expire_in: 2 days
699616db
TH
232 paths:
233 - build
234
235check-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
243
244acceptance-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
5896c539 252 <<: *acceptance_definition
699616db 253
b115ea3a
CYC
254build-system-opensuse:
255 <<: *native_build_job_definition
764a0747
DB
256 needs:
257 job: amd64-opensuse-leap-container
b115ea3a
CYC
258 variables:
259 IMAGE: opensuse-leap
db0108d5 260 CONFIGURE_ARGS: --enable-fdt=system
b115ea3a
CYC
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
267
268check-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
276
277acceptance-system-opensuse:
f5157dc7
DB
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
b115ea3a
CYC
286
287
0a8b05c7 288build-disabled:
c962864f 289 <<: *native_build_job_definition
764a0747
DB
290 needs:
291 job: amd64-fedora-container
c962864f
DB
292 variables:
293 IMAGE: fedora
94a4f816
PMD
294 CONFIGURE_ARGS:
295 --disable-attr
0c4d885f 296 --disable-auth-pam
94a4f816
PMD
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
0c4d885f 309 --disable-gcrypt
94a4f816
PMD
310 --disable-glusterfs
311 --disable-gnutls
312 --disable-gtk
313 --disable-guest-agent
314 --disable-iconv
0c4d885f 315 --disable-keyring
94a4f816
PMD
316 --disable-kvm
317 --disable-libiscsi
318 --disable-libpmem
319 --disable-libssh
0c4d885f 320 --disable-libudev
94a4f816
PMD
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
0c4d885f 330 --disable-opengl
94a4f816
PMD
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
0c4d885f 345 --disable-sparse
94a4f816
PMD
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
3473f6ed 354 --disable-vhost-kernel
94a4f816
PMD
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
a7524adb
TH
364 TARGETS: arm-softmmu i386-softmmu ppc64-softmmu mips64-softmmu
365 s390x-softmmu i386-linux-user
c962864f 366 MAKE_CHECK_ARGS: check-qtest SPEED=slow
0a8b05c7 367
37b6fd66
PMD
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.
7da153e8
TH
373# Also use a different coroutine implementation (which is only really of
374# interest to KVM users, i.e. with TCG disabled)
0a8b05c7 375build-tcg-disabled:
c962864f 376 <<: *native_build_job_definition
764a0747
DB
377 needs:
378 job: amd64-centos8-container
c962864f
DB
379 variables:
380 IMAGE: centos8
381 script:
382 - mkdir build
383 - cd build
7da153e8
TH
384 - ../configure --disable-tcg --audio-drv-list="" --with-coroutine=ucontext
385 || { cat config.log meson-logs/meson-log.txt && exit 1; }
c962864f
DB
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
c7cf4ddb
TH
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
d8a18da5 393 - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122
c7cf4ddb
TH
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
0a8b05c7
TH
397
398build-user:
c962864f 399 <<: *native_build_job_definition
764a0747
DB
400 needs:
401 job: amd64-debian-user-cross-container
c962864f 402 variables:
62c902e0
AB
403 IMAGE: debian-all-test-cross
404 CONFIGURE_ARGS: --disable-tools --disable-system
405 MAKE_CHECK_ARGS: check-tcg
0a8b05c7 406
d01bc253
PMD
407build-user-static:
408 <<: *native_build_job_definition
764a0747
DB
409 needs:
410 job: amd64-debian-user-cross-container
d01bc253
PMD
411 variables:
412 IMAGE: debian-all-test-cross
413 CONFIGURE_ARGS: --disable-tools --disable-system --static
414 MAKE_CHECK_ARGS: check-tcg
415
ac74e282
AB
416# Only build the softmmu targets we have check-tcg tests for
417build-some-softmmu:
418 <<: *native_build_job_definition
764a0747
DB
419 needs:
420 job: amd64-debian-user-cross-container
ac74e282
AB
421 variables:
422 IMAGE: debian-all-test-cross
ac6d7074 423 CONFIGURE_ARGS: --disable-tools --enable-debug
ac74e282
AB
424 TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
425 MAKE_CHECK_ARGS: check-tcg
426
8cdb2cef
AB
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
430build-user-plugins:
431 <<: *native_build_job_definition
764a0747
DB
432 needs:
433 job: amd64-debian-user-cross-container
8cdb2cef
AB
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
439
4e41d4a3
PMD
440build-user-centos7:
441 <<: *native_build_job_definition
4a859abd
TH
442 needs:
443 job: amd64-centos7-container
4e41d4a3
PMD
444 variables:
445 IMAGE: centos7
446 CONFIGURE_ARGS: --disable-system --disable-tools --disable-docs
447 MAKE_CHECK_ARGS: check-tcg
448
ac74e282
AB
449build-some-softmmu-plugins:
450 <<: *native_build_job_definition
764a0747
DB
451 needs:
452 job: amd64-debian-user-cross-container
ac74e282
AB
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
458
c2b33c43 459clang-system:
c962864f 460 <<: *native_build_job_definition
764a0747
DB
461 needs:
462 job: amd64-fedora-container
c962864f
DB
463 variables:
464 IMAGE: fedora
465 CONFIGURE_ARGS: --cc=clang --cxx=clang++
c2b33c43 466 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
c962864f 467 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
c2b33c43
TH
468 ppc-softmmu s390x-softmmu
469 MAKE_CHECK_ARGS: check-qtest check-tcg
470
471clang-user:
472 <<: *native_build_job_definition
4a859abd
TH
473 needs:
474 job: amd64-debian-user-cross-container
c2b33c43
TH
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
5f55d64b 481
1bb12e17
DB
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
485#
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
490#
491# Split in three sets of build/check/acceptance to limit the execution time of each
492# job
493build-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
9737c8bc 505 timeout: 70m
1bb12e17
DB
506 artifacts:
507 expire_in: 2 days
508 paths:
509 - build
510
511check-cfi-aarch64:
512 <<: *native_test_job_definition
513 needs:
514 - job: build-cfi-aarch64
515 artifacts: true
516 variables:
517 IMAGE: fedora
518 MAKE_CHECK_ARGS: check
519
520acceptance-cfi-aarch64:
521 <<: *native_test_job_definition
522 needs:
523 - job: build-cfi-aarch64
524 artifacts: true
525 variables:
526 IMAGE: fedora
527 MAKE_CHECK_ARGS: check-acceptance
528 <<: *acceptance_definition
529
530build-cfi-ppc64-s390x:
531 <<: *native_build_job_definition
532 needs:
533 - job: amd64-fedora-container
534 variables:
535 LD_JOBS: 1
536 AR: llvm-ar
537 IMAGE: fedora
538 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
539 --enable-safe-stack --enable-slirp=git
540 TARGETS: ppc64-softmmu s390x-softmmu
541 MAKE_CHECK_ARGS: check-build
9737c8bc 542 timeout: 70m
1bb12e17
DB
543 artifacts:
544 expire_in: 2 days
545 paths:
546 - build
547
548check-cfi-ppc64-s390x:
549 <<: *native_test_job_definition
550 needs:
551 - job: build-cfi-ppc64-s390x
552 artifacts: true
553 variables:
554 IMAGE: fedora
555 MAKE_CHECK_ARGS: check
556
557acceptance-cfi-ppc64-s390x:
558 <<: *native_test_job_definition
559 needs:
560 - job: build-cfi-ppc64-s390x
561 artifacts: true
562 variables:
563 IMAGE: fedora
564 MAKE_CHECK_ARGS: check-acceptance
565 <<: *acceptance_definition
566
567build-cfi-x86_64:
568 <<: *native_build_job_definition
569 needs:
570 - job: amd64-fedora-container
571 variables:
572 LD_JOBS: 1
573 AR: llvm-ar
574 IMAGE: fedora
575 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
576 --enable-safe-stack --enable-slirp=git
577 TARGETS: x86_64-softmmu
578 MAKE_CHECK_ARGS: check-build
9737c8bc 579 timeout: 70m
1bb12e17
DB
580 artifacts:
581 expire_in: 2 days
582 paths:
583 - build
584
585check-cfi-x86_64:
586 <<: *native_test_job_definition
587 needs:
588 - job: build-cfi-x86_64
589 artifacts: true
590 variables:
591 IMAGE: fedora
592 MAKE_CHECK_ARGS: check
593
594acceptance-cfi-x86_64:
595 <<: *native_test_job_definition
596 needs:
597 - job: build-cfi-x86_64
598 artifacts: true
599 variables:
600 IMAGE: fedora
601 MAKE_CHECK_ARGS: check-acceptance
602 <<: *acceptance_definition
603
0c99f50c
TH
604tsan-build:
605 <<: *native_build_job_definition
4a859abd
TH
606 needs:
607 job: amd64-ubuntu2004-container
0c99f50c
TH
608 variables:
609 IMAGE: ubuntu2004
a9eb2df2 610 CONFIGURE_ARGS: --enable-tsan --cc=clang-10 --cxx=clang++-10
65aff820 611 --enable-trace-backends=ust --enable-fdt=system --enable-slirp=system
0c99f50c
TH
612 TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
613 MAKE_CHECK_ARGS: bench V=1
614
1c0c06b1
AB
615# These targets are on the way out
616build-deprecated:
617 <<: *native_build_job_definition
764a0747
DB
618 needs:
619 job: amd64-debian-user-cross-container
1c0c06b1
AB
620 variables:
621 IMAGE: debian-all-test-cross
a9eb2df2 622 CONFIGURE_ARGS: --disable-tools
2614670b 623 MAKE_CHECK_ARGS: build-tcg
2cc1a901 624 TARGETS: ppc64abi32-linux-user lm32-softmmu unicore32-softmmu
2614670b
AB
625 artifacts:
626 expire_in: 2 days
627 paths:
628 - build
629
630# We split the check-tcg step as test failures are expected but we still
631# want to catch the build breaking.
632check-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
1c0c06b1
AB
640 allow_failure: true
641
04250c69
PMD
642# gprof/gcov are GCC features
643gprof-gcov:
644 <<: *native_build_job_definition
4a859abd
TH
645 needs:
646 job: amd64-ubuntu2004-container
04250c69
PMD
647 variables:
648 IMAGE: ubuntu2004
649 CONFIGURE_ARGS: --enable-gprof --enable-gcov
650 MAKE_CHECK_ARGS: check
651 TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
652 timeout: 70m
653 after_script:
654 - ${CI_PROJECT_DIR}/scripts/ci/coverage-summary.sh
655
48eac101 656build-oss-fuzz:
b610eba3 657 <<: *native_build_job_definition
764a0747
DB
658 needs:
659 job: amd64-fedora-container
b610eba3
TH
660 variables:
661 IMAGE: fedora
662 script:
48eac101
AB
663 - mkdir build-oss-fuzz
664 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
665 ./scripts/oss-fuzz/build.sh
5ab04d5e 666 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
48eac101
AB
667 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
668 | grep -v slirp); do
669 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
670 echo Testing ${fuzzer} ... ;
320c6e78 671 "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
b610eba3 672 done
5ab04d5e
TH
673 # Unrelated to fuzzer: run some tests with -fsanitize=address
674 - cd build-oss-fuzz && make check-qtest-i386 check-unit
b610eba3 675
5f55d64b 676build-tci:
c962864f 677 <<: *native_build_job_definition
764a0747 678 needs:
53c915c6 679 job: amd64-debian-user-cross-container
c962864f 680 variables:
53c915c6 681 IMAGE: debian-all-test-cross
c962864f
DB
682 script:
683 - TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64"
684 - mkdir build
685 - cd build
686 - ../configure --enable-tcg-interpreter
c47110d9 687 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" || { cat config.log meson-logs/meson-log.txt && exit 1; }
c962864f 688 - make -j"$JOBS"
c962864f
DB
689 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
690 - for tg in $TARGETS ; do
64ed6f92 691 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
c962864f
DB
692 ./tests/qtest/boot-serial-test || exit 1 ;
693 ./tests/qtest/cdrom-test || exit 1 ;
694 done
64ed6f92
PB
695 - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
696 - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
53c915c6 697 - make check-tcg
affcc09c 698
d1a8b308
PMD
699# Alternate coroutines implementations are only really of interest to KVM users
700# However we can't test against KVM on Gitlab-CI so we can only run unit tests
d1a8b308
PMD
701build-coroutine-sigaltstack:
702 <<: *native_build_job_definition
764a0747
DB
703 needs:
704 job: amd64-ubuntu2004-container
d1a8b308
PMD
705 variables:
706 IMAGE: ubuntu2004
707 CONFIGURE_ARGS: --with-coroutine=sigaltstack --disable-tcg
65aff820 708 --enable-trace-backends=ftrace
d1a8b308
PMD
709 MAKE_CHECK_ARGS: check-unit
710
affcc09c
DB
711# Most jobs test latest gcrypt or nettle builds
712#
713# These jobs test old gcrypt and nettle from RHEL7
714# which had some API differences.
34240956 715crypto-old-nettle:
affcc09c 716 <<: *native_build_job_definition
764a0747
DB
717 needs:
718 job: amd64-centos7-container
affcc09c
DB
719 variables:
720 IMAGE: centos7
721 TARGETS: x86_64-softmmu x86_64-linux-user
722 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle
affcc09c
DB
723 MAKE_CHECK_ARGS: check
724
34240956 725crypto-old-gcrypt:
affcc09c 726 <<: *native_build_job_definition
764a0747
DB
727 needs:
728 job: amd64-centos7-container
affcc09c
DB
729 variables:
730 IMAGE: centos7
731 TARGETS: x86_64-softmmu x86_64-linux-user
732 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt
affcc09c
DB
733 MAKE_CHECK_ARGS: check
734
34240956 735crypto-only-gnutls:
affcc09c 736 <<: *native_build_job_definition
764a0747
DB
737 needs:
738 job: amd64-centos7-container
affcc09c
DB
739 variables:
740 IMAGE: centos7
741 TARGETS: x86_64-softmmu x86_64-linux-user
742 CONFIGURE_ARGS: --disable-nettle --disable-gcrypt --enable-gnutls
affcc09c 743 MAKE_CHECK_ARGS: check
1f475472 744
34240956 745
3fed93f3
AB
746# Check our reduced build configurations
747build-without-default-devices:
748 <<: *native_build_job_definition
764a0747
DB
749 needs:
750 job: amd64-centos8-container
3fed93f3
AB
751 variables:
752 IMAGE: centos8
753 CONFIGURE_ARGS: --without-default-devices --disable-user
754
53f41245
AB
755build-without-default-features:
756 <<: *native_build_job_definition
764a0747
DB
757 needs:
758 job: amd64-debian-container
53f41245
AB
759 variables:
760 IMAGE: debian-amd64
761 CONFIGURE_ARGS: --without-default-features --disable-user
8cd95aec 762 --target-list-exclude=arm-softmmu,i386-softmmu,mipsel-softmmu,mips64-softmmu,ppc-softmmu
53f41245
AB
763 MAKE_CHECK_ARGS: check-unit
764
1f475472
DB
765check-patch:
766 stage: build
767 image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
764a0747
DB
768 needs:
769 job: amd64-centos8-container
1f475472
DB
770 script: .gitlab-ci.d/check-patch.py
771 except:
772 variables:
773 - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master'
774 variables:
775 GIT_DEPTH: 1000
776 allow_failure: true
34ed46a2
DB
777
778check-dco:
779 stage: build
780 image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
764a0747
DB
781 needs:
782 job: amd64-centos8-container
34ed46a2
DB
783 script: .gitlab-ci.d/check-dco.py
784 except:
785 variables:
786 - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master'
787 variables:
788 GIT_DEPTH: 1000
4daa9055 789
c4698e36
MAL
790build-libvhost-user:
791 stage: build
792 image: $CI_REGISTRY_IMAGE/qemu/fedora:latest
764a0747
DB
793 needs:
794 job: amd64-fedora-container
c4698e36
MAL
795 before_script:
796 - dnf install -y meson ninja-build
797 script:
798 - mkdir subprojects/libvhost-user/build
799 - cd subprojects/libvhost-user/build
800 - meson
801 - ninja
802
dd188e41
TH
803# No targets are built here, just tools, docs, and unit tests. This
804# also feeds into the eventual documentation deployment steps later
805build-tools-and-docs-debian:
806 <<: *native_build_job_definition
807 needs:
808 job: amd64-debian-container
809 variables:
810 IMAGE: debian-amd64
811 MAKE_CHECK_ARGS: check-unit check-softfloat ctags TAGS cscope
812 CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
813 artifacts:
814 expire_in: 2 days
815 paths:
816 - build
817
a8a3abe0
AB
818# Prepare for GitLab pages deployment. Anything copied into the
819# "public" directory will be deployed to $USER.gitlab.io/$PROJECT
4daa9055 820pages:
a8a3abe0 821 image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:latest
4daa9055
DB
822 stage: test
823 needs:
a8a3abe0 824 - job: build-tools-and-docs-debian
4daa9055 825 script:
a8a3abe0
AB
826 - mkdir -p public
827 # HTML-ised source tree
828 - make gtags
829 - htags -anT --tree-view=filetree -m qemu_init
830 -t "Welcome to the QEMU sourcecode"
831 - mv HTML public/src
832 # Project documentation
b93f4fbd
PM
833 - make -C build install DESTDIR=$(pwd)/temp-install
834 - mv temp-install/usr/local/share/doc/qemu/* public/
4daa9055
DB
835 artifacts:
836 paths:
837 - public