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)
27 - sed -i s,git.qemu.org/git,gitlab.com/qemu-project, .gitmodules
31 - if test -n "$TARGETS";
33 ../configure --enable-werror $CONFIGURE_ARGS --target-list="$TARGETS" ;
35 ../configure --enable-werror $CONFIGURE_ARGS ;
36 fi || { cat config.log meson-logs/meson-log.txt && exit 1; }
38 - if test -n "$MAKE_CHECK_ARGS";
40 make -j"$JOBS" $MAKE_CHECK_ARGS ;
43 .native_test_job_template: &native_test_job_definition
45 image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
48 - find . -type f -exec touch {} +
49 - make $MAKE_CHECK_ARGS
51 .acceptance_template: &acceptance_definition
53 key: "${CI_JOB_NAME}-cache"
55 - ${CI_PROJECT_DIR}/avocado-cache
59 - build/tests/results/latest/results.xml
61 junit: build/tests/results/latest/results.xml
63 - mkdir -p ~/.config/avocado
64 - echo "[datadir.paths]" > ~/.config/avocado/avocado.conf
65 - echo "cache_dirs = ['${CI_PROJECT_DIR}/avocado-cache']"
66 >> ~/.config/avocado/avocado.conf
67 - if [ -d ${CI_PROJECT_DIR}/avocado-cache ]; then
68 du -chs ${CI_PROJECT_DIR}/avocado-cache ;
70 - export AVOCADO_ALLOW_UNTRUSTED_CODE=1
73 - 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
74 - du -chs ${CI_PROJECT_DIR}/avocado-cache
77 <<: *native_build_job_definition
80 TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
81 moxie-softmmu microblazeel-softmmu mips64el-softmmu
82 MAKE_CHECK_ARGS: check-build
89 <<: *native_test_job_definition
91 - job: build-system-ubuntu
95 MAKE_CHECK_ARGS: check
97 acceptance-system-ubuntu:
98 <<: *native_test_job_definition
100 - job: build-system-ubuntu
104 MAKE_CHECK_ARGS: check-acceptance
105 <<: *acceptance_definition
108 <<: *native_build_job_definition
111 TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu
112 riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu
113 MAKE_CHECK_ARGS: check-build
120 <<: *native_test_job_definition
122 - job: build-system-debian
126 MAKE_CHECK_ARGS: check
128 acceptance-system-debian:
129 <<: *native_test_job_definition
131 - job: build-system-debian
135 MAKE_CHECK_ARGS: check-acceptance
136 <<: *acceptance_definition
139 <<: *native_build_job_definition
142 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle
143 TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
144 xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
145 MAKE_CHECK_ARGS: check-build
152 <<: *native_test_job_definition
154 - job: build-system-fedora
158 MAKE_CHECK_ARGS: check
160 acceptance-system-fedora:
161 <<: *native_test_job_definition
163 - job: build-system-fedora
167 MAKE_CHECK_ARGS: check-acceptance
168 <<: *acceptance_definition
171 <<: *native_build_job_definition
174 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt
175 TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
176 x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
177 MAKE_CHECK_ARGS: check-build
184 <<: *native_test_job_definition
186 - job: build-system-centos
190 MAKE_CHECK_ARGS: check
192 acceptance-system-centos:
193 <<: *native_test_job_definition
195 - job: build-system-centos
199 MAKE_CHECK_ARGS: check-acceptance
200 <<: *acceptance_definition
203 <<: *native_build_job_definition
206 CONFIGURE_ARGS: --disable-attr --disable-avx2 --disable-bochs
207 --disable-brlapi --disable-bzip2 --disable-cap-ng --disable-capstone
208 --disable-cloop --disable-coroutine-pool --disable-curl --disable-curses
209 --disable-dmg --disable-docs --disable-glusterfs --disable-gnutls
210 --disable-gtk --disable-guest-agent --disable-iconv --disable-kvm
211 --disable-libiscsi --disable-libpmem --disable-libssh --disable-libusb
212 --disable-libxml2 --disable-linux-aio --disable-live-block-migration
213 --disable-lzo --disable-malloc-trim --disable-mpath --disable-nettle
214 --disable-numa --disable-parallels --disable-pie --disable-qcow1
215 --disable-qed --disable-qom-cast-debug --disable-rbd --disable-rdma
216 --disable-replication --disable-sdl --disable-seccomp --disable-sheepdog
217 --disable-slirp --disable-smartcard --disable-snappy --disable-spice
218 --disable-strip --disable-tpm --disable-usb-redir --disable-vdi
219 --disable-vhost-crypto --disable-vhost-net --disable-vhost-scsi
220 --disable-vhost-user --disable-vhost-vdpa --disable-vhost-vsock
221 --disable-virglrenderer --disable-vnc --disable-vte --disable-vvfat
222 --disable-xen --disable-zstd
223 TARGETS: arm-softmmu i386-softmmu ppc64-softmmu mips64-softmmu
224 s390x-softmmu i386-linux-user
225 MAKE_CHECK_ARGS: check-qtest SPEED=slow
228 <<: *native_build_job_definition
234 - ../configure --disable-tcg --audio-drv-list="" || { cat config.log meson-logs/meson-log.txt && exit 1; }
237 - make check-qapi-schema
238 - cd tests/qemu-iotests/
239 - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
240 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
241 170 171 183 184 192 194 197 208 215 221 222 226 227 236 253 277
242 - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122
243 124 132 139 142 144 145 151 152 155 157 165 194 196 197 200 202
244 208 209 215 216 218 222 227 234 246 247 248 250 254 255 257 258
245 260 261 262 263 264 270 272 273 277 279
248 <<: *native_build_job_definition
250 IMAGE: debian-all-test-cross
251 CONFIGURE_ARGS: --disable-tools --disable-system
252 MAKE_CHECK_ARGS: check-tcg
254 # Run check-tcg against linux-user (with plugins)
255 # we skip sparc64-linux-user until it has been fixed somewhat
256 # we skip cris-linux-user as it doesn't use the common run loop
258 <<: *native_build_job_definition
260 IMAGE: debian-all-test-cross
261 CONFIGURE_ARGS: --disable-tools --disable-system --enable-plugins --enable-debug-tcg --target-list-exclude=sparc64-linux-user,cris-linux-user
262 MAKE_CHECK_ARGS: check-tcg
266 <<: *native_build_job_definition
269 CONFIGURE_ARGS: --cc=clang --cxx=clang++
270 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
271 ppc-softmmu s390x-softmmu arm-linux-user
272 MAKE_CHECK_ARGS: check
274 # These targets are on the way out
276 <<: *native_build_job_definition
278 IMAGE: debian-all-test-cross
279 CONFIGURE_ARGS: --disable-docs --disable-tools
280 MAKE_CHECK_ARGS: build-tcg
281 TARGETS: ppc64abi32-linux-user tilegx-linux-user lm32-softmmu
288 # We split the check-tcg step as test failures are expected but we still
289 # want to catch the build breaking.
291 <<: *native_test_job_definition
293 - job: build-deprecated
296 IMAGE: debian-all-test-cross
297 MAKE_CHECK_ARGS: check-tcg
301 <<: *native_build_job_definition
305 - mkdir build-oss-fuzz
306 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
307 ./scripts/oss-fuzz/build.sh
308 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
309 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
311 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
312 echo Testing ${fuzzer} ... ;
313 "${fuzzer}" -runs=1 -seed=1 || exit 1 ;
315 # Unrelated to fuzzer: run some tests with -fsanitize=address
316 - cd build-oss-fuzz && make check-qtest-i386 check-unit
319 <<: *native_build_job_definition
323 - TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64"
326 - ../configure --enable-tcg-interpreter
327 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" || { cat config.log meson-logs/meson-log.txt && exit 1; }
329 - make run-tcg-tests-x86_64-softmmu
330 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
331 - for tg in $TARGETS ; do
332 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
333 ./tests/qtest/boot-serial-test || exit 1 ;
334 ./tests/qtest/cdrom-test || exit 1 ;
336 - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
337 - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
339 # Most jobs test latest gcrypt or nettle builds
341 # These jobs test old gcrypt and nettle from RHEL7
342 # which had some API differences.
343 build-crypto-old-nettle:
344 <<: *native_build_job_definition
347 TARGETS: x86_64-softmmu x86_64-linux-user
348 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle
349 MAKE_CHECK_ARGS: check-build
354 check-crypto-old-nettle:
355 <<: *native_test_job_definition
357 - job: build-crypto-old-nettle
361 MAKE_CHECK_ARGS: check
364 build-crypto-old-gcrypt:
365 <<: *native_build_job_definition
368 TARGETS: x86_64-softmmu x86_64-linux-user
369 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt
370 MAKE_CHECK_ARGS: check-build
375 check-crypto-old-gcrypt:
376 <<: *native_test_job_definition
378 - job: build-crypto-old-gcrypt
382 MAKE_CHECK_ARGS: check
385 build-crypto-only-gnutls:
386 <<: *native_build_job_definition
389 TARGETS: x86_64-softmmu x86_64-linux-user
390 CONFIGURE_ARGS: --disable-nettle --disable-gcrypt --enable-gnutls
391 MAKE_CHECK_ARGS: check-build
396 check-crypto-only-gnutls:
397 <<: *native_test_job_definition
399 - job: build-crypto-only-gnutls
403 MAKE_CHECK_ARGS: check
408 image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
409 script: .gitlab-ci.d/check-patch.py
412 - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master'
419 image: $CI_REGISTRY_IMAGE/qemu/centos8:latest
420 script: .gitlab-ci.d/check-dco.py
423 - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master'