]> git.ipfire.org Git - thirdparty/qemu.git/blame - .gitlab-ci.yml
gitlab: add build-user-hexagon test
[thirdparty/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
6683da09 16.native_build_job_template:
c962864f
DB
17 stage: build
18 image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
19 before_script:
20 - JOBS=$(expr $(nproc) + 1)
21 script:
1b874108
PB
22 - if test -n "$LD_JOBS";
23 then
24 scripts/git-submodule.sh update meson ;
25 fi
c962864f
DB
26 - mkdir build
27 - cd build
28 - if test -n "$TARGETS";
29 then
1b874108 30 ../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=internal} $CONFIGURE_ARGS --target-list="$TARGETS" ;
c962864f 31 else
1b874108 32 ../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=internal} $CONFIGURE_ARGS ;
c47110d9 33 fi || { cat config.log meson-logs/meson-log.txt && exit 1; }
e6d27a9c
DB
34 - if test -n "$LD_JOBS";
35 then
1b874108 36 ../meson/meson.py configure . -Dbackend_max_links="$LD_JOBS" ;
e6d27a9c 37 fi || exit 1;
c962864f 38 - make -j"$JOBS"
c5008c76
AB
39 - if test -n "$MAKE_CHECK_ARGS";
40 then
a6eeac3b 41 make -j"$JOBS" $MAKE_CHECK_ARGS ;
c5008c76
AB
42 fi
43
e267ce59 44.native_test_job_template:
c5008c76
AB
45 stage: test
46 image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
47 script:
12a917a1 48 - scripts/git-submodule.sh update
5186685e 49 $(sed -n '/GIT_SUBMODULES=/ s/.*=// p' build/config-host.mak)
c5008c76
AB
50 - cd build
51 - find . -type f -exec touch {} +
12a917a1
TH
52 # Avoid recompiling by hiding ninja with NINJA=":"
53 - make NINJA=":" $MAKE_CHECK_ARGS
c5008c76 54
5896c539
TH
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
ec4d2feb 61 artifacts:
df063546
WSM
62 name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
63 when: always
64 expire_in: 2 days
ec4d2feb
CR
65 paths:
66 - build/tests/results/latest/results.xml
df063546 67 - build/tests/results/latest/test-results
ec4d2feb
CR
68 reports:
69 junit: build/tests/results/latest/results.xml
5896c539
TH
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
c071f19b 75 - echo -e '[job.output.testlogs]\nstatuses = ["FAIL", "INTERRUPT"]'
ba2232ba 76 >> ~/.config/avocado/avocado.conf
5896c539
TH
77 - if [ -d ${CI_PROJECT_DIR}/avocado-cache ]; then
78 du -chs ${CI_PROJECT_DIR}/avocado-cache ;
79 fi
67202bae 80 - export AVOCADO_ALLOW_UNTRUSTED_CODE=1
c5008c76
AB
81 after_script:
82 - cd build
5896c539 83 - du -chs ${CI_PROJECT_DIR}/avocado-cache
0a8b05c7 84
b22786ea 85build-system-alpine:
6683da09 86 extends: .native_build_job_template
9f3a24cf
PMD
87 needs:
88 - job: amd64-alpine-container
b22786ea
JY
89 variables:
90 IMAGE: alpine
91 TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
875bb7e3 92 microblazeel-softmmu mips64el-softmmu
b22786ea 93 MAKE_CHECK_ARGS: check-build
65aff820 94 CONFIGURE_ARGS: --enable-docs --enable-trace-backends=log,simple,syslog
b22786ea
JY
95 artifacts:
96 expire_in: 2 days
97 paths:
98 - .git-submodule-status
99 - build
100
101check-system-alpine:
e267ce59 102 extends: .native_test_job_template
b22786ea
JY
103 needs:
104 - job: build-system-alpine
105 artifacts: true
106 variables:
107 IMAGE: alpine
108 MAKE_CHECK_ARGS: check
109
110acceptance-system-alpine:
e267ce59 111 extends: .native_test_job_template
b22786ea
JY
112 needs:
113 - job: build-system-alpine
114 artifacts: true
115 variables:
116 IMAGE: alpine
117 MAKE_CHECK_ARGS: check-acceptance
118 <<: *acceptance_definition
119
699616db 120build-system-ubuntu:
6683da09 121 extends: .native_build_job_template
764a0747
DB
122 needs:
123 job: amd64-ubuntu2004-container
c962864f
DB
124 variables:
125 IMAGE: ubuntu2004
a9eb2df2 126 CONFIGURE_ARGS: --enable-docs --enable-fdt=system --enable-slirp=system
699616db 127 TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
875bb7e3 128 microblazeel-softmmu mips64el-softmmu
a6eeac3b 129 MAKE_CHECK_ARGS: check-build
c5008c76 130 artifacts:
0a796d63 131 expire_in: 2 days
c5008c76
AB
132 paths:
133 - build
134
699616db 135check-system-ubuntu:
e267ce59 136 extends: .native_test_job_template
c5008c76 137 needs:
699616db 138 - job: build-system-ubuntu
c5008c76
AB
139 artifacts: true
140 variables:
141 IMAGE: ubuntu2004
c962864f 142 MAKE_CHECK_ARGS: check
0a8b05c7 143
699616db 144acceptance-system-ubuntu:
e267ce59 145 extends: .native_test_job_template
c5008c76 146 needs:
699616db 147 - job: build-system-ubuntu
c5008c76
AB
148 artifacts: true
149 variables:
150 IMAGE: ubuntu2004
151 MAKE_CHECK_ARGS: check-acceptance
5896c539 152 <<: *acceptance_definition
c5008c76 153
699616db 154build-system-debian:
6683da09 155 extends: .native_build_job_template
764a0747
DB
156 needs:
157 job: amd64-debian-container
699616db
TH
158 variables:
159 IMAGE: debian-amd64
db0108d5 160 CONFIGURE_ARGS: --enable-fdt=system
699616db
TH
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:
0a796d63 165 expire_in: 2 days
699616db
TH
166 paths:
167 - build
168
169check-system-debian:
e267ce59 170 extends: .native_test_job_template
699616db
TH
171 needs:
172 - job: build-system-debian
173 artifacts: true
174 variables:
175 IMAGE: debian-amd64
176 MAKE_CHECK_ARGS: check
177
178acceptance-system-debian:
e267ce59 179 extends: .native_test_job_template
699616db
TH
180 needs:
181 - job: build-system-debian
182 artifacts: true
183 variables:
184 IMAGE: debian-amd64
185 MAKE_CHECK_ARGS: check-acceptance
5896c539 186 <<: *acceptance_definition
699616db
TH
187
188build-system-fedora:
6683da09 189 extends: .native_build_job_template
764a0747
DB
190 needs:
191 job: amd64-fedora-container
c962864f
DB
192 variables:
193 IMAGE: fedora
d0f26e68 194 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs
db0108d5 195 --enable-fdt=system --enable-slirp=system --enable-capstone=system
3ffc7f01 196 TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
699616db 197 xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
a6eeac3b 198 MAKE_CHECK_ARGS: check-build
c5008c76 199 artifacts:
0a796d63 200 expire_in: 2 days
c5008c76
AB
201 paths:
202 - build
203
699616db 204check-system-fedora:
e267ce59 205 extends: .native_test_job_template
c5008c76 206 needs:
699616db 207 - job: build-system-fedora
c5008c76
AB
208 artifacts: true
209 variables:
210 IMAGE: fedora
c962864f 211 MAKE_CHECK_ARGS: check
0a8b05c7 212
699616db 213acceptance-system-fedora:
e267ce59 214 extends: .native_test_job_template
c5008c76 215 needs:
699616db 216 - job: build-system-fedora
c5008c76
AB
217 artifacts: true
218 variables:
219 IMAGE: fedora
220 MAKE_CHECK_ARGS: check-acceptance
5896c539 221 <<: *acceptance_definition
c5008c76 222
699616db 223build-system-centos:
6683da09 224 extends: .native_build_job_template
764a0747
DB
225 needs:
226 job: amd64-centos8-container
699616db
TH
227 variables:
228 IMAGE: centos8
db0108d5 229 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-fdt=system
a2e5bbf0 230 --enable-modules --enable-trace-backends=dtrace
3ffc7f01 231 TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
699616db
TH
232 x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
233 MAKE_CHECK_ARGS: check-build
234 artifacts:
0a796d63 235 expire_in: 2 days
699616db
TH
236 paths:
237 - build
238
239check-system-centos:
e267ce59 240 extends: .native_test_job_template
699616db
TH
241 needs:
242 - job: build-system-centos
243 artifacts: true
244 variables:
245 IMAGE: centos8
246 MAKE_CHECK_ARGS: check
247
248acceptance-system-centos:
e267ce59 249 extends: .native_test_job_template
699616db
TH
250 needs:
251 - job: build-system-centos
252 artifacts: true
253 variables:
254 IMAGE: centos8
255 MAKE_CHECK_ARGS: check-acceptance
5896c539 256 <<: *acceptance_definition
699616db 257
b115ea3a 258build-system-opensuse:
6683da09 259 extends: .native_build_job_template
764a0747
DB
260 needs:
261 job: amd64-opensuse-leap-container
b115ea3a
CYC
262 variables:
263 IMAGE: opensuse-leap
db0108d5 264 CONFIGURE_ARGS: --enable-fdt=system
b115ea3a
CYC
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
271
272check-system-opensuse:
e267ce59 273 extends: .native_test_job_template
b115ea3a
CYC
274 needs:
275 - job: build-system-opensuse
276 artifacts: true
277 variables:
278 IMAGE: opensuse-leap
279 MAKE_CHECK_ARGS: check
280
281acceptance-system-opensuse:
e267ce59 282 extends: .native_test_job_template
f5157dc7
DB
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
b115ea3a
CYC
290
291
0a8b05c7 292build-disabled:
6683da09 293 extends: .native_build_job_template
764a0747
DB
294 needs:
295 job: amd64-fedora-container
c962864f
DB
296 variables:
297 IMAGE: fedora
94a4f816
PMD
298 CONFIGURE_ARGS:
299 --disable-attr
0c4d885f 300 --disable-auth-pam
94a4f816
PMD
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
0c4d885f 313 --disable-gcrypt
94a4f816
PMD
314 --disable-glusterfs
315 --disable-gnutls
316 --disable-gtk
317 --disable-guest-agent
318 --disable-iconv
0c4d885f 319 --disable-keyring
94a4f816
PMD
320 --disable-kvm
321 --disable-libiscsi
322 --disable-libpmem
323 --disable-libssh
0c4d885f 324 --disable-libudev
94a4f816
PMD
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
0c4d885f 334 --disable-opengl
94a4f816
PMD
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
94a4f816
PMD
345 --disable-slirp
346 --disable-smartcard
347 --disable-snappy
0c4d885f 348 --disable-sparse
94a4f816
PMD
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
3473f6ed 357 --disable-vhost-kernel
94a4f816
PMD
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
a7524adb
TH
367 TARGETS: arm-softmmu i386-softmmu ppc64-softmmu mips64-softmmu
368 s390x-softmmu i386-linux-user
c962864f 369 MAKE_CHECK_ARGS: check-qtest SPEED=slow
0a8b05c7 370
37b6fd66
PMD
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.
7da153e8
TH
376# Also use a different coroutine implementation (which is only really of
377# interest to KVM users, i.e. with TCG disabled)
0a8b05c7 378build-tcg-disabled:
6683da09 379 extends: .native_build_job_template
764a0747
DB
380 needs:
381 job: amd64-centos8-container
c962864f
DB
382 variables:
383 IMAGE: centos8
384 script:
385 - mkdir build
386 - cd build
7da153e8
TH
387 - ../configure --disable-tcg --audio-drv-list="" --with-coroutine=ucontext
388 || { cat config.log meson-logs/meson-log.txt && exit 1; }
c962864f
DB
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
c7cf4ddb
TH
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
d8a18da5 396 - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122
c7cf4ddb
TH
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
0a8b05c7
TH
400
401build-user:
6683da09 402 extends: .native_build_job_template
764a0747
DB
403 needs:
404 job: amd64-debian-user-cross-container
c962864f 405 variables:
62c902e0
AB
406 IMAGE: debian-all-test-cross
407 CONFIGURE_ARGS: --disable-tools --disable-system
408 MAKE_CHECK_ARGS: check-tcg
0a8b05c7 409
d01bc253 410build-user-static:
6683da09 411 extends: .native_build_job_template
764a0747
DB
412 needs:
413 job: amd64-debian-user-cross-container
d01bc253
PMD
414 variables:
415 IMAGE: debian-all-test-cross
416 CONFIGURE_ARGS: --disable-tools --disable-system --static
417 MAKE_CHECK_ARGS: check-tcg
418
910c40ee
AB
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 no dependency
421# declared. The image is manually uploaded.
422build-user-hexagon:
423 extends: .native_build_job_template
424 variables:
425 IMAGE: debian-hexagon-cross
426 TARGETS: hexagon-linux-user
427 CONFIGURE_ARGS: --disable-tools --disable-docs --enable-debug-tcg
428 MAKE_CHECK_ARGS: check-tcg
429
ac74e282
AB
430# Only build the softmmu targets we have check-tcg tests for
431build-some-softmmu:
6683da09 432 extends: .native_build_job_template
764a0747
DB
433 needs:
434 job: amd64-debian-user-cross-container
ac74e282
AB
435 variables:
436 IMAGE: debian-all-test-cross
ac6d7074 437 CONFIGURE_ARGS: --disable-tools --enable-debug
ac74e282
AB
438 TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
439 MAKE_CHECK_ARGS: check-tcg
440
8cdb2cef
AB
441# Run check-tcg against linux-user (with plugins)
442# we skip sparc64-linux-user until it has been fixed somewhat
443# we skip cris-linux-user as it doesn't use the common run loop
444build-user-plugins:
6683da09 445 extends: .native_build_job_template
764a0747
DB
446 needs:
447 job: amd64-debian-user-cross-container
8cdb2cef
AB
448 variables:
449 IMAGE: debian-all-test-cross
450 CONFIGURE_ARGS: --disable-tools --disable-system --enable-plugins --enable-debug-tcg --target-list-exclude=sparc64-linux-user,cris-linux-user
451 MAKE_CHECK_ARGS: check-tcg
452 timeout: 1h 30m
453
4e41d4a3 454build-user-centos7:
6683da09 455 extends: .native_build_job_template
4a859abd
TH
456 needs:
457 job: amd64-centos7-container
4e41d4a3
PMD
458 variables:
459 IMAGE: centos7
460 CONFIGURE_ARGS: --disable-system --disable-tools --disable-docs
461 MAKE_CHECK_ARGS: check-tcg
462
ac74e282 463build-some-softmmu-plugins:
6683da09 464 extends: .native_build_job_template
764a0747
DB
465 needs:
466 job: amd64-debian-user-cross-container
ac74e282
AB
467 variables:
468 IMAGE: debian-all-test-cross
469 CONFIGURE_ARGS: --disable-tools --disable-user --enable-plugins --enable-debug-tcg
470 TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
471 MAKE_CHECK_ARGS: check-tcg
472
c2b33c43 473clang-system:
6683da09 474 extends: .native_build_job_template
764a0747
DB
475 needs:
476 job: amd64-fedora-container
c962864f
DB
477 variables:
478 IMAGE: fedora
479 CONFIGURE_ARGS: --cc=clang --cxx=clang++
c2b33c43 480 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
c962864f 481 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
c2b33c43
TH
482 ppc-softmmu s390x-softmmu
483 MAKE_CHECK_ARGS: check-qtest check-tcg
484
485clang-user:
6683da09 486 extends: .native_build_job_template
4a859abd
TH
487 needs:
488 job: amd64-debian-user-cross-container
c2b33c43
TH
489 variables:
490 IMAGE: debian-all-test-cross
491 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --disable-system
492 --target-list-exclude=microblazeel-linux-user,aarch64_be-linux-user,i386-linux-user,m68k-linux-user,mipsn32el-linux-user,xtensaeb-linux-user
493 --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined
494 MAKE_CHECK_ARGS: check-unit check-tcg
5f55d64b 495
1bb12e17
DB
496# Set LD_JOBS=1 because this requires LTO and ld consumes a large amount of memory.
497# On gitlab runners, default value sometimes end up calling 2 lds concurrently and
498# triggers an Out-Of-Memory error
499#
500# Since slirp callbacks are used in QEMU Timers, slirp needs to be compiled together
501# with QEMU and linked as a static library to avoid false positives in CFI checks.
502# This can be accomplished by using -enable-slirp=git, which avoids the use of
503# a system-wide version of the library
504#
505# Split in three sets of build/check/acceptance to limit the execution time of each
506# job
507build-cfi-aarch64:
6683da09 508 extends: .native_build_job_template
1bb12e17
DB
509 needs:
510 - job: amd64-fedora-container
511 variables:
512 LD_JOBS: 1
513 AR: llvm-ar
514 IMAGE: fedora
515 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
516 --enable-safe-stack --enable-slirp=git
517 TARGETS: aarch64-softmmu
518 MAKE_CHECK_ARGS: check-build
9737c8bc 519 timeout: 70m
1bb12e17
DB
520 artifacts:
521 expire_in: 2 days
522 paths:
523 - build
524
525check-cfi-aarch64:
e267ce59 526 extends: .native_test_job_template
1bb12e17
DB
527 needs:
528 - job: build-cfi-aarch64
529 artifacts: true
530 variables:
531 IMAGE: fedora
532 MAKE_CHECK_ARGS: check
533
534acceptance-cfi-aarch64:
e267ce59 535 extends: .native_test_job_template
1bb12e17
DB
536 needs:
537 - job: build-cfi-aarch64
538 artifacts: true
539 variables:
540 IMAGE: fedora
541 MAKE_CHECK_ARGS: check-acceptance
542 <<: *acceptance_definition
543
544build-cfi-ppc64-s390x:
6683da09 545 extends: .native_build_job_template
1bb12e17
DB
546 needs:
547 - job: amd64-fedora-container
548 variables:
549 LD_JOBS: 1
550 AR: llvm-ar
551 IMAGE: fedora
552 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
553 --enable-safe-stack --enable-slirp=git
554 TARGETS: ppc64-softmmu s390x-softmmu
555 MAKE_CHECK_ARGS: check-build
9737c8bc 556 timeout: 70m
1bb12e17
DB
557 artifacts:
558 expire_in: 2 days
559 paths:
560 - build
561
562check-cfi-ppc64-s390x:
e267ce59 563 extends: .native_test_job_template
1bb12e17
DB
564 needs:
565 - job: build-cfi-ppc64-s390x
566 artifacts: true
567 variables:
568 IMAGE: fedora
569 MAKE_CHECK_ARGS: check
570
571acceptance-cfi-ppc64-s390x:
e267ce59 572 extends: .native_test_job_template
1bb12e17
DB
573 needs:
574 - job: build-cfi-ppc64-s390x
575 artifacts: true
576 variables:
577 IMAGE: fedora
578 MAKE_CHECK_ARGS: check-acceptance
579 <<: *acceptance_definition
580
581build-cfi-x86_64:
6683da09 582 extends: .native_build_job_template
1bb12e17
DB
583 needs:
584 - job: amd64-fedora-container
585 variables:
586 LD_JOBS: 1
587 AR: llvm-ar
588 IMAGE: fedora
589 CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug
590 --enable-safe-stack --enable-slirp=git
591 TARGETS: x86_64-softmmu
592 MAKE_CHECK_ARGS: check-build
9737c8bc 593 timeout: 70m
1bb12e17
DB
594 artifacts:
595 expire_in: 2 days
596 paths:
597 - build
598
599check-cfi-x86_64:
e267ce59 600 extends: .native_test_job_template
1bb12e17
DB
601 needs:
602 - job: build-cfi-x86_64
603 artifacts: true
604 variables:
605 IMAGE: fedora
606 MAKE_CHECK_ARGS: check
607
608acceptance-cfi-x86_64:
e267ce59 609 extends: .native_test_job_template
1bb12e17
DB
610 needs:
611 - job: build-cfi-x86_64
612 artifacts: true
613 variables:
614 IMAGE: fedora
615 MAKE_CHECK_ARGS: check-acceptance
616 <<: *acceptance_definition
617
0c99f50c 618tsan-build:
6683da09 619 extends: .native_build_job_template
4a859abd
TH
620 needs:
621 job: amd64-ubuntu2004-container
0c99f50c
TH
622 variables:
623 IMAGE: ubuntu2004
a9eb2df2 624 CONFIGURE_ARGS: --enable-tsan --cc=clang-10 --cxx=clang++-10
65aff820 625 --enable-trace-backends=ust --enable-fdt=system --enable-slirp=system
0c99f50c
TH
626 TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
627 MAKE_CHECK_ARGS: bench V=1
628
1c0c06b1
AB
629# These targets are on the way out
630build-deprecated:
6683da09 631 extends: .native_build_job_template
764a0747
DB
632 needs:
633 job: amd64-debian-user-cross-container
1c0c06b1
AB
634 variables:
635 IMAGE: debian-all-test-cross
a9eb2df2 636 CONFIGURE_ARGS: --disable-tools
2614670b 637 MAKE_CHECK_ARGS: build-tcg
43692239 638 TARGETS: ppc64abi32-linux-user
2614670b
AB
639 artifacts:
640 expire_in: 2 days
641 paths:
642 - build
643
644# We split the check-tcg step as test failures are expected but we still
645# want to catch the build breaking.
646check-deprecated:
e267ce59 647 extends: .native_test_job_template
2614670b
AB
648 needs:
649 - job: build-deprecated
650 artifacts: true
651 variables:
652 IMAGE: debian-all-test-cross
653 MAKE_CHECK_ARGS: check-tcg
1c0c06b1
AB
654 allow_failure: true
655
04250c69
PMD
656# gprof/gcov are GCC features
657gprof-gcov:
6683da09 658 extends: .native_build_job_template
4a859abd
TH
659 needs:
660 job: amd64-ubuntu2004-container
04250c69
PMD
661 variables:
662 IMAGE: ubuntu2004
663 CONFIGURE_ARGS: --enable-gprof --enable-gcov
664 MAKE_CHECK_ARGS: check
665 TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu
666 timeout: 70m
667 after_script:
668 - ${CI_PROJECT_DIR}/scripts/ci/coverage-summary.sh
669
48eac101 670build-oss-fuzz:
6683da09 671 extends: .native_build_job_template
764a0747
DB
672 needs:
673 job: amd64-fedora-container
b610eba3
TH
674 variables:
675 IMAGE: fedora
676 script:
48eac101
AB
677 - mkdir build-oss-fuzz
678 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
679 ./scripts/oss-fuzz/build.sh
5ab04d5e 680 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
48eac101
AB
681 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
682 | grep -v slirp); do
683 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
684 echo Testing ${fuzzer} ... ;
320c6e78 685 "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
b610eba3 686 done
5ab04d5e
TH
687 # Unrelated to fuzzer: run some tests with -fsanitize=address
688 - cd build-oss-fuzz && make check-qtest-i386 check-unit
b610eba3 689
5f55d64b 690build-tci:
6683da09 691 extends: .native_build_job_template
764a0747 692 needs:
53c915c6 693 job: amd64-debian-user-cross-container
c962864f 694 variables:
53c915c6 695 IMAGE: debian-all-test-cross
c962864f 696 script:
875bb7e3 697 - TARGETS="aarch64 alpha arm hppa m68k microblaze ppc64 s390x x86_64"
c962864f
DB
698 - mkdir build
699 - cd build
700 - ../configure --enable-tcg-interpreter
c47110d9 701 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" || { cat config.log meson-logs/meson-log.txt && exit 1; }
c962864f 702 - make -j"$JOBS"
c962864f
DB
703 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
704 - for tg in $TARGETS ; do
64ed6f92 705 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
c962864f
DB
706 ./tests/qtest/boot-serial-test || exit 1 ;
707 ./tests/qtest/cdrom-test || exit 1 ;
708 done
64ed6f92
PB
709 - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
710 - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
53c915c6 711 - make check-tcg
affcc09c 712
d1a8b308
PMD
713# Alternate coroutines implementations are only really of interest to KVM users
714# However we can't test against KVM on Gitlab-CI so we can only run unit tests
d1a8b308 715build-coroutine-sigaltstack:
6683da09 716 extends: .native_build_job_template
764a0747
DB
717 needs:
718 job: amd64-ubuntu2004-container
d1a8b308
PMD
719 variables:
720 IMAGE: ubuntu2004
721 CONFIGURE_ARGS: --with-coroutine=sigaltstack --disable-tcg
65aff820 722 --enable-trace-backends=ftrace
d1a8b308
PMD
723 MAKE_CHECK_ARGS: check-unit
724
affcc09c
DB
725# Most jobs test latest gcrypt or nettle builds
726#
727# These jobs test old gcrypt and nettle from RHEL7
728# which had some API differences.
34240956 729crypto-old-nettle:
6683da09 730 extends: .native_build_job_template
764a0747
DB
731 needs:
732 job: amd64-centos7-container
affcc09c
DB
733 variables:
734 IMAGE: centos7
735 TARGETS: x86_64-softmmu x86_64-linux-user
736 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle
affcc09c
DB
737 MAKE_CHECK_ARGS: check
738
34240956 739crypto-old-gcrypt:
6683da09 740 extends: .native_build_job_template
764a0747
DB
741 needs:
742 job: amd64-centos7-container
affcc09c
DB
743 variables:
744 IMAGE: centos7
745 TARGETS: x86_64-softmmu x86_64-linux-user
746 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt
affcc09c
DB
747 MAKE_CHECK_ARGS: check
748
34240956 749crypto-only-gnutls:
6683da09 750 extends: .native_build_job_template
764a0747
DB
751 needs:
752 job: amd64-centos7-container
affcc09c
DB
753 variables:
754 IMAGE: centos7
755 TARGETS: x86_64-softmmu x86_64-linux-user
756 CONFIGURE_ARGS: --disable-nettle --disable-gcrypt --enable-gnutls
affcc09c 757 MAKE_CHECK_ARGS: check
1f475472 758
34240956 759
3fed93f3
AB
760# Check our reduced build configurations
761build-without-default-devices:
6683da09 762 extends: .native_build_job_template
764a0747
DB
763 needs:
764 job: amd64-centos8-container
3fed93f3
AB
765 variables:
766 IMAGE: centos8
767 CONFIGURE_ARGS: --without-default-devices --disable-user
768
53f41245 769build-without-default-features:
6683da09 770 extends: .native_build_job_template
764a0747
DB
771 needs:
772 job: amd64-debian-container
53f41245
AB
773 variables:
774 IMAGE: debian-amd64
775 CONFIGURE_ARGS: --without-default-features --disable-user
8cd95aec 776 --target-list-exclude=arm-softmmu,i386-softmmu,mipsel-softmmu,mips64-softmmu,ppc-softmmu
53f41245
AB
777 MAKE_CHECK_ARGS: check-unit
778
1f475472
DB
779check-patch:
780 stage: build
781 image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
764a0747
DB
782 needs:
783 job: amd64-centos8-container
1f475472
DB
784 script: .gitlab-ci.d/check-patch.py
785 except:
786 variables:
787 - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master'
788 variables:
789 GIT_DEPTH: 1000
790 allow_failure: true
34ed46a2
DB
791
792check-dco:
793 stage: build
794 image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
764a0747
DB
795 needs:
796 job: amd64-centos8-container
34ed46a2
DB
797 script: .gitlab-ci.d/check-dco.py
798 except:
799 variables:
800 - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master'
801 variables:
802 GIT_DEPTH: 1000
4daa9055 803
c4698e36
MAL
804build-libvhost-user:
805 stage: build
806 image: $CI_REGISTRY_IMAGE/qemu/fedora:latest
764a0747
DB
807 needs:
808 job: amd64-fedora-container
c4698e36
MAL
809 before_script:
810 - dnf install -y meson ninja-build
811 script:
812 - mkdir subprojects/libvhost-user/build
813 - cd subprojects/libvhost-user/build
814 - meson
815 - ninja
816
dd188e41
TH
817# No targets are built here, just tools, docs, and unit tests. This
818# also feeds into the eventual documentation deployment steps later
819build-tools-and-docs-debian:
6683da09 820 extends: .native_build_job_template
dd188e41
TH
821 needs:
822 job: amd64-debian-container
823 variables:
824 IMAGE: debian-amd64
825 MAKE_CHECK_ARGS: check-unit check-softfloat ctags TAGS cscope
826 CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools
827 artifacts:
828 expire_in: 2 days
829 paths:
830 - build
831
a8a3abe0
AB
832# Prepare for GitLab pages deployment. Anything copied into the
833# "public" directory will be deployed to $USER.gitlab.io/$PROJECT
4daa9055 834pages:
a8a3abe0 835 image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:latest
4daa9055
DB
836 stage: test
837 needs:
a8a3abe0 838 - job: build-tools-and-docs-debian
4daa9055 839 script:
a8a3abe0
AB
840 - mkdir -p public
841 # HTML-ised source tree
842 - make gtags
843 - htags -anT --tree-view=filetree -m qemu_init
844 -t "Welcome to the QEMU sourcecode"
845 - mv HTML public/src
846 # Project documentation
b93f4fbd
PM
847 - make -C build install DESTDIR=$(pwd)/temp-install
848 - mv temp-install/usr/local/share/doc/qemu/* public/
4daa9055
DB
849 artifacts:
850 paths:
851 - public