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 # We assume GitLab has it's own caching set up for RPM/APT repositories so we
12 # just take care of avocado assets here.
15 - $HOME/avocado/data/cache
18 - local: '/.gitlab-ci.d/edk2.yml'
19 - local: '/.gitlab-ci.d/opensbi.yml'
20 - local: '/.gitlab-ci.d/containers.yml'
21 - local: '/.gitlab-ci.d/crossbuilds.yml'
23 .native_build_job_template: &native_build_job_definition
25 image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest
27 - JOBS=$(expr $(nproc) + 1)
31 - if test -n "$TARGETS";
33 ../configure --enable-werror $CONFIGURE_ARGS --target-list="$TARGETS" ;
35 ../configure --enable-werror $CONFIGURE_ARGS ;
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
58 - mkdir -p ~/.config/avocado
59 - echo "[datadir.paths]" > ~/.config/avocado/avocado.conf
60 - echo "cache_dirs = ['${CI_PROJECT_DIR}/avocado-cache']"
61 >> ~/.config/avocado/avocado.conf
62 - if [ -d ${CI_PROJECT_DIR}/avocado-cache ]; then
63 du -chs ${CI_PROJECT_DIR}/avocado-cache ;
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")]' | 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
83 <<: *native_test_job_definition
85 - job: build-system-ubuntu
89 MAKE_CHECK_ARGS: check
91 acceptance-system-ubuntu:
92 <<: *native_test_job_definition
94 - job: build-system-ubuntu
98 MAKE_CHECK_ARGS: check-acceptance
99 <<: *acceptance_definition
102 <<: *native_build_job_definition
105 TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu
106 riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu
107 MAKE_CHECK_ARGS: check-build
114 <<: *native_test_job_definition
116 - job: build-system-debian
120 MAKE_CHECK_ARGS: check
122 acceptance-system-debian:
123 <<: *native_test_job_definition
125 - job: build-system-debian
129 MAKE_CHECK_ARGS: check-acceptance
130 <<: *acceptance_definition
133 <<: *native_build_job_definition
136 TARGETS: tricore-softmmu unicore32-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 TARGETS: ppc64-softmmu lm32-softmmu or1k-softmmu s390x-softmmu
168 x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
169 MAKE_CHECK_ARGS: check-build
176 <<: *native_test_job_definition
178 - job: build-system-centos
182 MAKE_CHECK_ARGS: check
184 acceptance-system-centos:
185 <<: *native_test_job_definition
187 - job: build-system-centos
191 MAKE_CHECK_ARGS: check-acceptance
192 <<: *acceptance_definition
195 <<: *native_build_job_definition
198 CONFIGURE_ARGS: --disable-attr --disable-avx2 --disable-bochs
199 --disable-brlapi --disable-bzip2 --disable-cap-ng --disable-capstone
200 --disable-cloop --disable-coroutine-pool --disable-curl --disable-curses
201 --disable-dmg --disable-docs --disable-glusterfs --disable-gnutls
202 --disable-gtk --disable-guest-agent --disable-iconv --disable-kvm
203 --disable-libiscsi --disable-libpmem --disable-libssh --disable-libusb
204 --disable-libxml2 --disable-linux-aio --disable-live-block-migration
205 --disable-lzo --disable-malloc-trim --disable-mpath --disable-nettle
206 --disable-numa --disable-parallels --disable-pie --disable-qcow1
207 --disable-qed --disable-qom-cast-debug --disable-rbd --disable-rdma
208 --disable-replication --disable-sdl --disable-seccomp --disable-sheepdog
209 --disable-slirp --disable-smartcard --disable-snappy --disable-spice
210 --disable-strip --disable-tpm --disable-usb-redir --disable-vdi
211 --disable-vhost-crypto --disable-vhost-net --disable-vhost-scsi
212 --disable-vhost-user --disable-vhost-vdpa --disable-vhost-vsock
213 --disable-virglrenderer --disable-vnc --disable-vte --disable-vvfat
214 --disable-xen --disable-zstd
215 TARGETS: arm-softmmu i386-softmmu ppc64-softmmu mips64-softmmu
216 s390x-softmmu i386-linux-user
217 MAKE_CHECK_ARGS: check-qtest SPEED=slow
220 <<: *native_build_job_definition
226 - ../configure --disable-tcg --audio-drv-list=""
229 - make check-qapi-schema
230 - cd tests/qemu-iotests/
231 - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048
232 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163
233 170 171 183 184 192 194 197 208 215 221 222 226 227 236 253 277
234 - ./check -qcow2 028 051 056 057 058 065 067 068 082 085 091 095 096 102 122
235 124 132 139 142 144 145 151 152 155 157 165 194 196 197 200 202
236 208 209 215 216 218 222 227 234 246 247 248 250 254 255 257 258
237 260 261 262 263 264 270 272 273 277 279
240 <<: *native_build_job_definition
242 IMAGE: debian-all-test-cross
243 CONFIGURE_ARGS: --disable-tools --disable-system
244 MAKE_CHECK_ARGS: check-tcg
247 <<: *native_build_job_definition
250 CONFIGURE_ARGS: --cc=clang --cxx=clang++
251 TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu
252 ppc-softmmu s390x-softmmu arm-linux-user
253 MAKE_CHECK_ARGS: check
256 <<: *native_build_job_definition
260 - mkdir build-oss-fuzz
261 - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address"
262 ./scripts/oss-fuzz/build.sh
263 - export ASAN_OPTIONS="fast_unwind_on_malloc=0"
264 - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f
266 grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ;
267 echo Testing ${fuzzer} ... ;
268 "${fuzzer}" -runs=1000 -seed=1 || exit 1 ;
270 # Unrelated to fuzzer: run some tests with -fsanitize=address
271 - cd build-oss-fuzz && make check-qtest-i386 check-unit
274 <<: *native_build_job_definition
278 - TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64"
281 - ../configure --enable-tcg-interpreter
282 --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)"
284 - make run-tcg-tests-x86_64-softmmu
285 - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test
286 - for tg in $TARGETS ; do
287 export QTEST_QEMU_BINARY="./qemu-system-${tg}" ;
288 ./tests/qtest/boot-serial-test || exit 1 ;
289 ./tests/qtest/cdrom-test || exit 1 ;
291 - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test
292 - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow