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)
10 # We assume GitLab has it's own caching set up for RPM/APT repositories so we
11 # just take care of avocado assets here.
14 - $HOME/avocado/data/cache
17 - local: '/.gitlab-ci.d/edk2.yml'
18 - local: '/.gitlab-ci.d/opensbi.yml'
19 - local: '/.gitlab-ci.d/containers.yml'
20 - local: '/.gitlab-ci.d/crossbuilds.yml'
22 .native_build_job_template: &native_build_job_definition
24 image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
26 - JOBS=$(expr $(nproc) + 1)
30 - if test -n "$TARGETS";
32 ../configure --enable-werror $CONFIGURE_ARGS --target-list="$TARGETS" ;
34 ../configure --enable-werror $CONFIGURE_ARGS ;
35 fi || { cat config.log meson-logs/meson-log.txt && exit 1; }
37 - if test -n "$MAKE_CHECK_ARGS";
39 make -j"$JOBS" $MAKE_CHECK_ARGS ;
42 .native_test_job_template: &native_test_job_definition
44 image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
47 - find . -type f -exec touch {} +
48 - make $MAKE_CHECK_ARGS
50 .acceptance_template: &acceptance_definition
52 key: "${CI_JOB_NAME}-cache"
54 - ${CI_PROJECT_DIR}/avocado-cache
58 - build/tests/results/latest/results.xml
60 junit: build/tests/results/latest/results.xml
62 - mkdir -p ~/.config/avocado
63 - echo "[datadir.paths]" > ~/.config/avocado/avocado.conf
64 - echo "cache_dirs = ['${CI_PROJECT_DIR}/avocado-cache']"
65 >> ~/.config/avocado/avocado.conf
66 - if [ -d ${CI_PROJECT_DIR}/avocado-cache ]; then
67 du -chs ${CI_PROJECT_DIR}/avocado-cache ;
69 - export AVOCADO_ALLOW_UNTRUSTED_CODE=1
72 - 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
73 - du -chs ${CI_PROJECT_DIR}/avocado-cache
76 <<: *native_build_job_definition
79 TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
80 moxie-softmmu microblazeel-softmmu mips64el-softmmu
81 MAKE_CHECK_ARGS: check-build
88 <<: *native_test_job_definition
90 - job: build-system-ubuntu
94 MAKE_CHECK_ARGS: check
96 acceptance-system-ubuntu:
97 <<: *native_test_job_definition
99 - job: build-system-ubuntu
103 MAKE_CHECK_ARGS: check-acceptance
104 <<: *acceptance_definition
107 <<: *native_build_job_definition
110 TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu
111 riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu
112 MAKE_CHECK_ARGS: check-build
119 <<: *native_test_job_definition
121 - job: build-system-debian
125 MAKE_CHECK_ARGS: check
127 acceptance-system-debian:
128 <<: *native_test_job_definition
130 - job: build-system-debian
134 MAKE_CHECK_ARGS: check-acceptance
135 <<: *acceptance_definition
138 <<: *native_build_job_definition
141 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle
142 TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
143 xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
144 MAKE_CHECK_ARGS: check-build
151 <<: *native_test_job_definition
153 - job: build-system-fedora
157 MAKE_CHECK_ARGS: check
159 acceptance-system-fedora:
160 <<: *native_test_job_definition
162 - job: build-system-fedora
166 MAKE_CHECK_ARGS: check-acceptance
167 <<: *acceptance_definition
170 <<: *native_build_job_definition
173 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt
174 TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
175 x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
176 MAKE_CHECK_ARGS: check-build
183 <<: *native_test_job_definition
185 - job: build-system-centos
189 MAKE_CHECK_ARGS: check
191 acceptance-system-centos:
192 <<: *native_test_job_definition
194 - job: build-system-centos
198 MAKE_CHECK_ARGS: check-acceptance
199 <<: *acceptance_definition
202 <<: *native_build_job_definition
205 CONFIGURE_ARGS: --disable-attr --disable-avx2 --disable-bochs
206 --disable-brlapi --disable-bzip2 --disable-cap-ng --disable-capstone
207 --disable-cloop --disable-coroutine-pool --disable-curl --disable-curses
208 --disable-dmg --disable-docs --disable-glusterfs --disable-gnutls
209 --disable-gtk --disable-guest-agent --disable-iconv --disable-kvm
210 --disable-libiscsi --disable-libpmem --disable-libssh --disable-libusb
211 --disable-libxml2 --disable-linux-aio --disable-live-block-migration
212 --disable-lzo --disable-malloc-trim --disable-mpath --disable-nettle
213 --disable-numa --disable-parallels --disable-pie --disable-qcow1
214 --disable-qed --disable-qom-cast-debug --disable-rbd --disable-rdma
215 --disable-replication --disable-sdl --disable-seccomp --disable-sheepdog
216 --disable-slirp --disable-smartcard --disable-snappy --disable-spice
217 --disable-strip --disable-tpm --disable-usb-redir --disable-vdi
218 --disable-vhost-crypto --disable-vhost-net --disable-vhost-scsi
219 --disable-vhost-user --disable-vhost-vdpa --disable-vhost-vsock
220 --disable-virglrenderer --disable-vnc --disable-vte --disable-vvfat
221 --disable-xen --disable-zstd
222 TARGETS: arm-softmmu i386-softmmu ppc64-softmmu mips64-softmmu
223 s390x-softmmu i386-linux-user
224 MAKE_CHECK_ARGS: check-qtest SPEED=slow
227 <<: *native_build_job_definition
233 - ../configure --disable-tcg --audio-drv-list="" || { cat config.log meson-logs/meson-log.txt && exit 1; }
236 - make check-qapi-schema
237 - cd tests/qemu-iotests/
238 - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
239 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
240 170 171 183 184 192 194 197 208 215 221 222 226 227 236 253 277
241 - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122
242 124 132 139 142 144 145 151 152 155 157 165 194 196 197 200 202
243 208 209 215 216 218 222 227 234 246 247 248 250 254 255 257 258
244 260 261 262 263 264 270 272 273 277 279
247 <<: *native_build_job_definition
249 IMAGE: debian-all-test-cross
250 CONFIGURE_ARGS: --disable-tools --disable-system
251 MAKE_CHECK_ARGS: check-tcg
253 # Run check-tcg against linux-user (with plugins)
254 # we skip sparc64-linux-user until it has been fixed somewhat
255 # we skip cris-linux-user as it doesn't use the common run loop
257 <<: *native_build_job_definition
259 IMAGE: debian-all-test-cross
260 CONFIGURE_ARGS: --disable-tools --disable-system --enable-plugins --enable-debug-tcg --target-list-exclude=sparc64-linux-user,cris-linux-user
261 MAKE_CHECK_ARGS: check-tcg
265 <<: *native_build_job_definition
268 CONFIGURE_ARGS: --cc=clang --cxx=clang++
269 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
270 ppc-softmmu s390x-softmmu arm-linux-user
271 MAKE_CHECK_ARGS: check
273 # These targets are on the way out
275 <<: *native_build_job_definition
277 IMAGE: debian-all-test-cross
278 CONFIGURE_ARGS: --disable-docs --disable-tools
279 MAKE_CHECK_ARGS: build-tcg
280 TARGETS: ppc64abi32-linux-user tilegx-linux-user lm32-softmmu
287 # We split the check-tcg step as test failures are expected but we still
288 # want to catch the build breaking.
290 <<: *native_test_job_definition
292 - job: build-deprecated
295 IMAGE: debian-all-test-cross
296 MAKE_CHECK_ARGS: check-tcg
300 <<: *native_build_job_definition
304 - mkdir build-oss-fuzz
305 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
306 ./scripts/oss-fuzz/build.sh
307 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
308 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
310 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
311 echo Testing ${fuzzer} ... ;
312 "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
314 # Unrelated to fuzzer: run some tests with -fsanitize=address
315 - cd build-oss-fuzz && make check-qtest-i386 check-unit
318 <<: *native_build_job_definition
322 - TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64"
325 - ../configure --enable-tcg-interpreter
326 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" || { cat config.log meson-logs/meson-log.txt && exit 1; }
328 - make run-tcg-tests-x86_64-softmmu
329 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
330 - for tg in $TARGETS ; do
331 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
332 ./tests/qtest/boot-serial-test || exit 1 ;
333 ./tests/qtest/cdrom-test || exit 1 ;
335 - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
336 - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
338 # Most jobs test latest gcrypt or nettle builds
340 # These jobs test old gcrypt and nettle from RHEL7
341 # which had some API differences.
342 build-crypto-old-nettle:
343 <<: *native_build_job_definition
346 TARGETS: x86_64-softmmu x86_64-linux-user
347 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle
348 MAKE_CHECK_ARGS: check-build
353 check-crypto-old-nettle:
354 <<: *native_test_job_definition
356 - job: build-crypto-old-nettle
360 MAKE_CHECK_ARGS: check
363 build-crypto-old-gcrypt:
364 <<: *native_build_job_definition
367 TARGETS: x86_64-softmmu x86_64-linux-user
368 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt
369 MAKE_CHECK_ARGS: check-build
374 check-crypto-old-gcrypt:
375 <<: *native_test_job_definition
377 - job: build-crypto-old-gcrypt
381 MAKE_CHECK_ARGS: check
384 build-crypto-only-gnutls:
385 <<: *native_build_job_definition
388 TARGETS: x86_64-softmmu x86_64-linux-user
389 CONFIGURE_ARGS: --disable-nettle --disable-gcrypt --enable-gnutls
390 MAKE_CHECK_ARGS: check-build
395 check-crypto-only-gnutls:
396 <<: *native_test_job_definition
398 - job: build-crypto-only-gnutls
402 MAKE_CHECK_ARGS: check
407 image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
408 script: .gitlab-ci.d/check-patch.py
411 - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master'
418 image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
419 script: .gitlab-ci.d/check-dco.py
422 - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master'