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)
11 - local: '/.gitlab-ci.d/edk2.yml'
12 - local: '/.gitlab-ci.d/opensbi.yml'
13 - local: '/.gitlab-ci.d/containers.yml'
14 - local: '/.gitlab-ci.d/crossbuilds.yml'
16 .native_build_job_template: &native_build_job_definition
18 image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
20 - JOBS=$(expr $(nproc) + 1)
21 - sed -i s,git.qemu.org/git,gitlab.com/qemu-project, .gitmodules
25 - if test -n "$TARGETS";
27 ../configure --enable-werror $CONFIGURE_ARGS --target-list="$TARGETS" ;
29 ../configure --enable-werror $CONFIGURE_ARGS ;
30 fi || { cat config.log meson-logs/meson-log.txt && exit 1; }
32 - if test -n "$MAKE_CHECK_ARGS";
34 make -j"$JOBS" $MAKE_CHECK_ARGS ;
37 .native_test_job_template: &native_test_job_definition
39 image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
42 - find . -type f -exec touch {} +
43 - make $MAKE_CHECK_ARGS
45 .acceptance_template: &acceptance_definition
47 key: "${CI_JOB_NAME}-cache"
49 - ${CI_PROJECT_DIR}/avocado-cache
53 - build/tests/results/latest/results.xml
55 junit: build/tests/results/latest/results.xml
57 - mkdir -p ~/.config/avocado
58 - echo "[datadir.paths]" > ~/.config/avocado/avocado.conf
59 - echo "cache_dirs = ['${CI_PROJECT_DIR}/avocado-cache']"
60 >> ~/.config/avocado/avocado.conf
61 - if [ -d ${CI_PROJECT_DIR}/avocado-cache ]; then
62 du -chs ${CI_PROJECT_DIR}/avocado-cache ;
64 - export AVOCADO_ALLOW_UNTRUSTED_CODE=1
67 - python3 -c 'import json; r = json.load(open("tests/results/latest/results.json")); [print(t["logfile"]) for t in r["tests"] if t["status"] not in ("PASS", "SKIP", "CANCEL")]' | xargs cat
68 - du -chs ${CI_PROJECT_DIR}/avocado-cache
71 <<: *native_build_job_definition
74 TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
75 moxie-softmmu microblazeel-softmmu mips64el-softmmu
76 MAKE_CHECK_ARGS: check-build
77 CONFIGURE_ARGS: --enable-docs
84 <<: *native_test_job_definition
86 - job: build-system-ubuntu
90 MAKE_CHECK_ARGS: check
92 acceptance-system-ubuntu:
93 <<: *native_test_job_definition
95 - job: build-system-ubuntu
99 MAKE_CHECK_ARGS: check-acceptance
100 <<: *acceptance_definition
103 <<: *native_build_job_definition
106 TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu
107 riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu
108 MAKE_CHECK_ARGS: check-build
109 CONFIGURE_ARGS: --enable-docs
116 <<: *native_test_job_definition
118 - job: build-system-debian
122 MAKE_CHECK_ARGS: check
124 acceptance-system-debian:
125 <<: *native_test_job_definition
127 - job: build-system-debian
131 MAKE_CHECK_ARGS: check-acceptance
132 <<: *acceptance_definition
135 <<: *native_build_job_definition
138 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs
139 TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
140 xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
141 MAKE_CHECK_ARGS: check-build
148 <<: *native_test_job_definition
150 - job: build-system-fedora
154 MAKE_CHECK_ARGS: check
156 acceptance-system-fedora:
157 <<: *native_test_job_definition
159 - job: build-system-fedora
163 MAKE_CHECK_ARGS: check-acceptance
164 <<: *acceptance_definition
167 <<: *native_build_job_definition
170 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt
171 TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
172 x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
173 MAKE_CHECK_ARGS: check-build
180 <<: *native_test_job_definition
182 - job: build-system-centos
186 MAKE_CHECK_ARGS: check
188 acceptance-system-centos:
189 <<: *native_test_job_definition
191 - job: build-system-centos
195 MAKE_CHECK_ARGS: check-acceptance
196 <<: *acceptance_definition
199 <<: *native_build_job_definition
212 --disable-coroutine-pool
221 --disable-guest-agent
232 --disable-live-block-migration
234 --disable-malloc-trim
243 --disable-qom-cast-debug
246 --disable-replication
259 --disable-vhost-crypto
264 --disable-vhost-vsock
265 --disable-virglrenderer
271 TARGETS: arm-softmmu i386-softmmu ppc64-softmmu mips64-softmmu
272 s390x-softmmu i386-linux-user
273 MAKE_CHECK_ARGS: check-qtest SPEED=slow
275 # This jobs explicitly disable TCG (--disable-tcg), KVM is detected by
276 # the configure script. The container doesn't contain Xen headers so
277 # Xen accelerator is not detected / selected. As result it build the
278 # i386-softmmu and x86_64-softmmu with KVM being the single accelerator
281 <<: *native_build_job_definition
287 - ../configure --disable-tcg --audio-drv-list="" || { cat config.log meson-logs/meson-log.txt && exit 1; }
290 - make check-qapi-schema
291 - cd tests/qemu-iotests/
292 - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
293 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
294 170 171 183 184 192 194 197 208 215 221 222 226 227 236 253 277
295 - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122
296 124 132 139 142 144 145 151 152 155 157 165 194 196 197 200 202
297 208 209 215 216 218 222 227 234 246 247 248 250 254 255 257 258
298 260 261 262 263 264 270 272 273 277 279
301 <<: *native_build_job_definition
303 IMAGE: debian-all-test-cross
304 CONFIGURE_ARGS: --disable-tools --disable-system
305 MAKE_CHECK_ARGS: check-tcg
308 <<: *native_build_job_definition
310 IMAGE: debian-all-test-cross
311 CONFIGURE_ARGS: --disable-tools --disable-system --static
312 MAKE_CHECK_ARGS: check-tcg
314 # Only build the softmmu targets we have check-tcg tests for
316 <<: *native_build_job_definition
318 IMAGE: debian-all-test-cross
319 CONFIGURE_ARGS: --disable-tools --enable-debug-tcg
320 TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
321 MAKE_CHECK_ARGS: check-tcg
323 # Run check-tcg against linux-user (with plugins)
324 # we skip sparc64-linux-user until it has been fixed somewhat
325 # we skip cris-linux-user as it doesn't use the common run loop
327 <<: *native_build_job_definition
329 IMAGE: debian-all-test-cross
330 CONFIGURE_ARGS: --disable-tools --disable-system --enable-plugins --enable-debug-tcg --target-list-exclude=sparc64-linux-user,cris-linux-user
331 MAKE_CHECK_ARGS: check-tcg
334 build-some-softmmu-plugins:
335 <<: *native_build_job_definition
337 IMAGE: debian-all-test-cross
338 CONFIGURE_ARGS: --disable-tools --disable-user --enable-plugins --enable-debug-tcg
339 TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
340 MAKE_CHECK_ARGS: check-tcg
343 <<: *native_build_job_definition
346 CONFIGURE_ARGS: --cc=clang --cxx=clang++
347 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
348 ppc-softmmu s390x-softmmu arm-linux-user
349 MAKE_CHECK_ARGS: check
351 # These targets are on the way out
353 <<: *native_build_job_definition
355 IMAGE: debian-all-test-cross
356 CONFIGURE_ARGS: --disable-docs --disable-tools
357 MAKE_CHECK_ARGS: build-tcg
358 TARGETS: ppc64abi32-linux-user tilegx-linux-user lm32-softmmu
365 # We split the check-tcg step as test failures are expected but we still
366 # want to catch the build breaking.
368 <<: *native_test_job_definition
370 - job: build-deprecated
373 IMAGE: debian-all-test-cross
374 MAKE_CHECK_ARGS: check-tcg
378 <<: *native_build_job_definition
382 - mkdir build-oss-fuzz
383 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
384 ./scripts/oss-fuzz/build.sh
385 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
386 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
388 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
389 echo Testing ${fuzzer} ... ;
390 "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
392 # Unrelated to fuzzer: run some tests with -fsanitize=address
393 - cd build-oss-fuzz && make check-qtest-i386 check-unit
396 <<: *native_build_job_definition
400 - TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64"
403 - ../configure --enable-tcg-interpreter
404 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" || { cat config.log meson-logs/meson-log.txt && exit 1; }
406 - make run-tcg-tests-x86_64-softmmu
407 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
408 - for tg in $TARGETS ; do
409 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
410 ./tests/qtest/boot-serial-test || exit 1 ;
411 ./tests/qtest/cdrom-test || exit 1 ;
413 - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
414 - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
416 # Most jobs test latest gcrypt or nettle builds
418 # These jobs test old gcrypt and nettle from RHEL7
419 # which had some API differences.
420 build-crypto-old-nettle:
421 <<: *native_build_job_definition
424 TARGETS: x86_64-softmmu x86_64-linux-user
425 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle
426 MAKE_CHECK_ARGS: check-build
431 check-crypto-old-nettle:
432 <<: *native_test_job_definition
434 - job: build-crypto-old-nettle
438 MAKE_CHECK_ARGS: check
441 build-crypto-old-gcrypt:
442 <<: *native_build_job_definition
445 TARGETS: x86_64-softmmu x86_64-linux-user
446 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt
447 MAKE_CHECK_ARGS: check-build
452 check-crypto-old-gcrypt:
453 <<: *native_test_job_definition
455 - job: build-crypto-old-gcrypt
459 MAKE_CHECK_ARGS: check
462 build-crypto-only-gnutls:
463 <<: *native_build_job_definition
466 TARGETS: x86_64-softmmu x86_64-linux-user
467 CONFIGURE_ARGS: --disable-nettle --disable-gcrypt --enable-gnutls
468 MAKE_CHECK_ARGS: check-build
473 check-crypto-only-gnutls:
474 <<: *native_test_job_definition
476 - job: build-crypto-only-gnutls
480 MAKE_CHECK_ARGS: check
482 # We don't need to exercise every backend with every front-end
483 build-trace-multi-user:
484 <<: *native_build_job_definition
487 CONFIGURE_ARGS: --enable-trace-backends=log,simple,syslog --disable-system
489 build-trace-ftrace-system:
490 <<: *native_build_job_definition
493 CONFIGURE_ARGS: --enable-trace-backends=ftrace --target-list=x86_64-softmmu
495 build-trace-ust-system:
496 <<: *native_build_job_definition
499 CONFIGURE_ARGS: --enable-trace-backends=ust --target-list=x86_64-softmmu
503 image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
504 script: .gitlab-ci.d/check-patch.py
507 - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master'
514 image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
515 script: .gitlab-ci.d/check-dco.py
518 - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master'
523 image: $CI_REGISTRY_IMAGE/qemu/ubuntu2004:latest
526 - job: build-system-ubuntu
530 - mv build/docs/index.html public/
531 - for i in devel interop specs system tools user ; do mv build/docs/$i public/ ; done