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 ;
71 - 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
72 - du -chs ${CI_PROJECT_DIR}/avocado-cache
75 <<: *native_build_job_definition
78 TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
79 moxie-softmmu microblazeel-softmmu mips64el-softmmu
80 MAKE_CHECK_ARGS: check-build
87 <<: *native_test_job_definition
89 - job: build-system-ubuntu
93 MAKE_CHECK_ARGS: check
95 acceptance-system-ubuntu:
96 <<: *native_test_job_definition
98 - job: build-system-ubuntu
102 MAKE_CHECK_ARGS: check-acceptance
103 <<: *acceptance_definition
106 <<: *native_build_job_definition
109 TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu
110 riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu
111 MAKE_CHECK_ARGS: check-build
118 <<: *native_test_job_definition
120 - job: build-system-debian
124 MAKE_CHECK_ARGS: check
126 acceptance-system-debian:
127 <<: *native_test_job_definition
129 - job: build-system-debian
133 MAKE_CHECK_ARGS: check-acceptance
134 <<: *acceptance_definition
137 <<: *native_build_job_definition
140 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle
141 TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
142 xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
143 MAKE_CHECK_ARGS: check-build
150 <<: *native_test_job_definition
152 - job: build-system-fedora
156 MAKE_CHECK_ARGS: check
158 acceptance-system-fedora:
159 <<: *native_test_job_definition
161 - job: build-system-fedora
165 MAKE_CHECK_ARGS: check-acceptance
166 <<: *acceptance_definition
169 <<: *native_build_job_definition
172 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt
173 TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
174 x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
175 MAKE_CHECK_ARGS: check-build
182 <<: *native_test_job_definition
184 - job: build-system-centos
188 MAKE_CHECK_ARGS: check
190 acceptance-system-centos:
191 <<: *native_test_job_definition
193 - job: build-system-centos
197 MAKE_CHECK_ARGS: check-acceptance
198 <<: *acceptance_definition
201 <<: *native_build_job_definition
204 CONFIGURE_ARGS: --disable-attr --disable-avx2 --disable-bochs
205 --disable-brlapi --disable-bzip2 --disable-cap-ng --disable-capstone
206 --disable-cloop --disable-coroutine-pool --disable-curl --disable-curses
207 --disable-dmg --disable-docs --disable-glusterfs --disable-gnutls
208 --disable-gtk --disable-guest-agent --disable-iconv --disable-kvm
209 --disable-libiscsi --disable-libpmem --disable-libssh --disable-libusb
210 --disable-libxml2 --disable-linux-aio --disable-live-block-migration
211 --disable-lzo --disable-malloc-trim --disable-mpath --disable-nettle
212 --disable-numa --disable-parallels --disable-pie --disable-qcow1
213 --disable-qed --disable-qom-cast-debug --disable-rbd --disable-rdma
214 --disable-replication --disable-sdl --disable-seccomp --disable-sheepdog
215 --disable-slirp --disable-smartcard --disable-snappy --disable-spice
216 --disable-strip --disable-tpm --disable-usb-redir --disable-vdi
217 --disable-vhost-crypto --disable-vhost-net --disable-vhost-scsi
218 --disable-vhost-user --disable-vhost-vdpa --disable-vhost-vsock
219 --disable-virglrenderer --disable-vnc --disable-vte --disable-vvfat
220 --disable-xen --disable-zstd
221 TARGETS: arm-softmmu i386-softmmu ppc64-softmmu mips64-softmmu
222 s390x-softmmu i386-linux-user
223 MAKE_CHECK_ARGS: check-qtest SPEED=slow
226 <<: *native_build_job_definition
232 - ../configure --disable-tcg --audio-drv-list="" || { cat config.log meson-logs/meson-log.txt && exit 1; }
235 - make check-qapi-schema
236 - cd tests/qemu-iotests/
237 - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
238 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
239 170 171 183 184 192 194 197 208 215 221 222 226 227 236 253 277
240 - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122
241 124 132 139 142 144 145 151 152 155 157 165 194 196 197 200 202
242 208 209 215 216 218 222 227 234 246 247 248 250 254 255 257 258
243 260 261 262 263 264 270 272 273 277 279
246 <<: *native_build_job_definition
248 IMAGE: debian-all-test-cross
249 CONFIGURE_ARGS: --disable-tools --disable-system
250 MAKE_CHECK_ARGS: check-tcg
252 # Run check-tcg against linux-user (with plugins)
253 # we skip sparc64-linux-user until it has been fixed somewhat
254 # we skip cris-linux-user as it doesn't use the common run loop
256 <<: *native_build_job_definition
258 IMAGE: debian-all-test-cross
259 CONFIGURE_ARGS: --disable-tools --disable-system --enable-plugins --enable-debug-tcg --target-list-exclude=sparc64-linux-user,cris-linux-user
260 MAKE_CHECK_ARGS: check-tcg
264 <<: *native_build_job_definition
267 CONFIGURE_ARGS: --cc=clang --cxx=clang++
268 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
269 ppc-softmmu s390x-softmmu arm-linux-user
270 MAKE_CHECK_ARGS: check
272 # These targets are on the way out
274 <<: *native_build_job_definition
276 IMAGE: debian-all-test-cross
277 CONFIGURE_ARGS: --disable-docs --disable-tools
278 MAKE_CHECK_ARGS: build-tcg
279 TARGETS: ppc64abi32-linux-user tilegx-linux-user lm32-softmmu
286 # We split the check-tcg step as test failures are expected but we still
287 # want to catch the build breaking.
289 <<: *native_test_job_definition
291 - job: build-deprecated
294 IMAGE: debian-all-test-cross
295 MAKE_CHECK_ARGS: check-tcg
299 <<: *native_build_job_definition
303 - mkdir build-oss-fuzz
304 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
305 ./scripts/oss-fuzz/build.sh
306 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
307 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
309 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
310 echo Testing ${fuzzer} ... ;
311 "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
313 # Unrelated to fuzzer: run some tests with -fsanitize=address
314 - cd build-oss-fuzz && make check-qtest-i386 check-unit
317 <<: *native_build_job_definition
321 - TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64"
324 - ../configure --enable-tcg-interpreter
325 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" || { cat config.log meson-logs/meson-log.txt && exit 1; }
327 - make run-tcg-tests-x86_64-softmmu
328 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
329 - for tg in $TARGETS ; do
330 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
331 ./tests/qtest/boot-serial-test || exit 1 ;
332 ./tests/qtest/cdrom-test || exit 1 ;
334 - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
335 - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
337 # Most jobs test latest gcrypt or nettle builds
339 # These jobs test old gcrypt and nettle from RHEL7
340 # which had some API differences.
341 build-crypto-old-nettle:
342 <<: *native_build_job_definition
345 TARGETS: x86_64-softmmu x86_64-linux-user
346 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle
347 MAKE_CHECK_ARGS: check-build
352 check-crypto-old-nettle:
353 <<: *native_test_job_definition
355 - job: build-crypto-old-nettle
359 MAKE_CHECK_ARGS: check
362 build-crypto-old-gcrypt:
363 <<: *native_build_job_definition
366 TARGETS: x86_64-softmmu x86_64-linux-user
367 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt
368 MAKE_CHECK_ARGS: check-build
373 check-crypto-old-gcrypt:
374 <<: *native_test_job_definition
376 - job: build-crypto-old-gcrypt
380 MAKE_CHECK_ARGS: check
383 build-crypto-only-gnutls:
384 <<: *native_build_job_definition
387 TARGETS: x86_64-softmmu x86_64-linux-user
388 CONFIGURE_ARGS: --disable-nettle --disable-gcrypt --enable-gnutls
389 MAKE_CHECK_ARGS: check-build
394 check-crypto-only-gnutls:
395 <<: *native_test_job_definition
397 - job: build-crypto-only-gnutls
401 MAKE_CHECK_ARGS: check
406 image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
407 script: .gitlab-ci.d/check-patch.py
410 - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master'
417 image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
418 script: .gitlab-ci.d/check-dco.py
421 - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master'