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 ;
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
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 ;
66 - 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")]' | xargs cat
67 - du -chs ${CI_PROJECT_DIR}/avocado-cache
70 <<: *native_build_job_definition
73 TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
74 moxie-softmmu microblazeel-softmmu mips64el-softmmu
75 MAKE_CHECK_ARGS: check-build
82 <<: *native_test_job_definition
84 - job: build-system-ubuntu
88 MAKE_CHECK_ARGS: check
90 acceptance-system-ubuntu:
91 <<: *native_test_job_definition
93 - job: build-system-ubuntu
97 MAKE_CHECK_ARGS: check-acceptance
98 <<: *acceptance_definition
101 <<: *native_build_job_definition
104 TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu
105 riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu
106 MAKE_CHECK_ARGS: check-build
113 <<: *native_test_job_definition
115 - job: build-system-debian
119 MAKE_CHECK_ARGS: check
121 acceptance-system-debian:
122 <<: *native_test_job_definition
124 - job: build-system-debian
128 MAKE_CHECK_ARGS: check-acceptance
129 <<: *acceptance_definition
132 <<: *native_build_job_definition
135 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle
136 TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
137 xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
138 MAKE_CHECK_ARGS: check-build
145 <<: *native_test_job_definition
147 - job: build-system-fedora
151 MAKE_CHECK_ARGS: check
153 acceptance-system-fedora:
154 <<: *native_test_job_definition
156 - job: build-system-fedora
160 MAKE_CHECK_ARGS: check-acceptance
161 <<: *acceptance_definition
164 <<: *native_build_job_definition
167 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt
168 TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
169 x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
170 MAKE_CHECK_ARGS: check-build
177 <<: *native_test_job_definition
179 - job: build-system-centos
183 MAKE_CHECK_ARGS: check
185 acceptance-system-centos:
186 <<: *native_test_job_definition
188 - job: build-system-centos
192 MAKE_CHECK_ARGS: check-acceptance
193 <<: *acceptance_definition
196 <<: *native_build_job_definition
199 CONFIGURE_ARGS: --disable-attr --disable-avx2 --disable-bochs
200 --disable-brlapi --disable-bzip2 --disable-cap-ng --disable-capstone
201 --disable-cloop --disable-coroutine-pool --disable-curl --disable-curses
202 --disable-dmg --disable-docs --disable-glusterfs --disable-gnutls
203 --disable-gtk --disable-guest-agent --disable-iconv --disable-kvm
204 --disable-libiscsi --disable-libpmem --disable-libssh --disable-libusb
205 --disable-libxml2 --disable-linux-aio --disable-live-block-migration
206 --disable-lzo --disable-malloc-trim --disable-mpath --disable-nettle
207 --disable-numa --disable-parallels --disable-pie --disable-qcow1
208 --disable-qed --disable-qom-cast-debug --disable-rbd --disable-rdma
209 --disable-replication --disable-sdl --disable-seccomp --disable-sheepdog
210 --disable-slirp --disable-smartcard --disable-snappy --disable-spice
211 --disable-strip --disable-tpm --disable-usb-redir --disable-vdi
212 --disable-vhost-crypto --disable-vhost-net --disable-vhost-scsi
213 --disable-vhost-user --disable-vhost-vdpa --disable-vhost-vsock
214 --disable-virglrenderer --disable-vnc --disable-vte --disable-vvfat
215 --disable-xen --disable-zstd
216 TARGETS: arm-softmmu i386-softmmu ppc64-softmmu mips64-softmmu
217 s390x-softmmu i386-linux-user
218 MAKE_CHECK_ARGS: check-qtest SPEED=slow
221 <<: *native_build_job_definition
227 - ../configure --disable-tcg --audio-drv-list=""
230 - make check-qapi-schema
231 - cd tests/qemu-iotests/
232 - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
233 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
234 170 171 183 184 192 194 197 208 215 221 222 226 227 236 253 277
235 - ./check -qcow2 028 051 056 057 058 065 067 068 082 085 091 095 096 102 122
236 124 132 139 142 144 145 151 152 155 157 165 194 196 197 200 202
237 208 209 215 216 218 222 227 234 246 247 248 250 254 255 257 258
238 260 261 262 263 264 270 272 273 277 279
241 <<: *native_build_job_definition
243 IMAGE: debian-all-test-cross
244 CONFIGURE_ARGS: --disable-tools --disable-system
245 MAKE_CHECK_ARGS: check-tcg
248 <<: *native_build_job_definition
251 CONFIGURE_ARGS: --cc=clang --cxx=clang++
252 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
253 ppc-softmmu s390x-softmmu arm-linux-user
254 MAKE_CHECK_ARGS: check
256 # These targets are on the way out
258 <<: *native_build_job_definition
260 IMAGE: debian-all-test-cross
261 CONFIGURE_ARGS: --disable-docs --disable-tools
262 MAKE_CHECK_ARGS: check-tcg
263 TARGETS: ppc64abi32-linux-user tilegx-linux-user lm32-softmmu
268 <<: *native_build_job_definition
272 - mkdir build-oss-fuzz
273 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
274 ./scripts/oss-fuzz/build.sh
275 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
276 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
278 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
279 echo Testing ${fuzzer} ... ;
280 "${fuzzer}" -runs=1000 -seed=1 || exit 1 ;
282 # Unrelated to fuzzer: run some tests with -fsanitize=address
283 - cd build-oss-fuzz && make check-qtest-i386 check-unit
286 <<: *native_build_job_definition
290 - TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64"
293 - ../configure --enable-tcg-interpreter
294 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)"
296 - make run-tcg-tests-x86_64-softmmu
297 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
298 - for tg in $TARGETS ; do
299 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
300 ./tests/qtest/boot-serial-test || exit 1 ;
301 ./tests/qtest/cdrom-test || exit 1 ;
303 - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
304 - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
306 # Most jobs test latest gcrypt or nettle builds
308 # These jobs test old gcrypt and nettle from RHEL7
309 # which had some API differences.
310 build-crypto-old-nettle:
311 <<: *native_build_job_definition
314 TARGETS: x86_64-softmmu x86_64-linux-user
315 CONFIGURE_ARGS: --disable-gcrypt --enable-nettle
316 MAKE_CHECK_ARGS: check-build
321 check-crypto-old-nettle:
322 <<: *native_test_job_definition
324 - job: build-crypto-old-nettle
328 MAKE_CHECK_ARGS: check
331 build-crypto-old-gcrypt:
332 <<: *native_build_job_definition
335 TARGETS: x86_64-softmmu x86_64-linux-user
336 CONFIGURE_ARGS: --disable-nettle --enable-gcrypt
337 MAKE_CHECK_ARGS: check-build
342 check-crypto-old-gcrypt:
343 <<: *native_test_job_definition
345 - job: build-crypto-old-gcrypt
349 MAKE_CHECK_ARGS: check
352 build-crypto-only-gnutls:
353 <<: *native_build_job_definition
356 TARGETS: x86_64-softmmu x86_64-linux-user
357 CONFIGURE_ARGS: --disable-nettle --disable-gcrypt --enable-gnutls
358 MAKE_CHECK_ARGS: check-build
363 check-crypto-only-gnutls:
364 <<: *native_test_job_definition
366 - job: build-crypto-only-gnutls
370 MAKE_CHECK_ARGS: check