]>
Commit | Line | Data |
---|---|---|
c5008c76 AB |
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) | |
d0caa0a8 DB |
4 | stages: |
5 | - containers | |
fa821f23 | 6 | - containers-layer2 |
d0caa0a8 | 7 | - build |
c5008c76 | 8 | - test |
d0caa0a8 | 9 | |
6957fd98 AB |
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. | |
12 | cache: | |
13 | paths: | |
14 | - $HOME/avocado/data/cache | |
15 | ||
71920809 | 16 | include: |
922febe2 TH |
17 | - local: '/.gitlab-ci.d/edk2.yml' |
18 | - local: '/.gitlab-ci.d/opensbi.yml' | |
fa821f23 | 19 | - local: '/.gitlab-ci.d/containers.yml' |
6bcb5fc0 | 20 | - local: '/.gitlab-ci.d/crossbuilds.yml' |
71920809 | 21 | |
c962864f DB |
22 | .native_build_job_template: &native_build_job_definition |
23 | stage: build | |
24 | image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest | |
25 | before_script: | |
26 | - JOBS=$(expr $(nproc) + 1) | |
27 | script: | |
28 | - mkdir build | |
29 | - cd build | |
30 | - if test -n "$TARGETS"; | |
31 | then | |
32 | ../configure --enable-werror $CONFIGURE_ARGS --target-list="$TARGETS" ; | |
33 | else | |
34 | ../configure --enable-werror $CONFIGURE_ARGS ; | |
c47110d9 | 35 | fi || { cat config.log meson-logs/meson-log.txt && exit 1; } |
c962864f | 36 | - make -j"$JOBS" |
c5008c76 AB |
37 | - if test -n "$MAKE_CHECK_ARGS"; |
38 | then | |
a6eeac3b | 39 | make -j"$JOBS" $MAKE_CHECK_ARGS ; |
c5008c76 AB |
40 | fi |
41 | ||
42 | .native_test_job_template: &native_test_job_definition | |
43 | stage: test | |
44 | image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest | |
45 | script: | |
46 | - cd build | |
47 | - find . -type f -exec touch {} + | |
48 | - make $MAKE_CHECK_ARGS | |
49 | ||
5896c539 TH |
50 | .acceptance_template: &acceptance_definition |
51 | cache: | |
52 | key: "${CI_JOB_NAME}-cache" | |
53 | paths: | |
54 | - ${CI_PROJECT_DIR}/avocado-cache | |
55 | policy: pull-push | |
ec4d2feb CR |
56 | artifacts: |
57 | paths: | |
58 | - build/tests/results/latest/results.xml | |
59 | reports: | |
60 | junit: build/tests/results/latest/results.xml | |
5896c539 TH |
61 | before_script: |
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 ; | |
68 | fi | |
67202bae | 69 | - export AVOCADO_ALLOW_UNTRUSTED_CODE=1 |
c5008c76 AB |
70 | after_script: |
71 | - cd build | |
52dff285 | 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 |
5896c539 | 73 | - du -chs ${CI_PROJECT_DIR}/avocado-cache |
0a8b05c7 | 74 | |
699616db | 75 | build-system-ubuntu: |
c962864f DB |
76 | <<: *native_build_job_definition |
77 | variables: | |
78 | IMAGE: ubuntu2004 | |
699616db TH |
79 | TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu |
80 | moxie-softmmu microblazeel-softmmu mips64el-softmmu | |
a6eeac3b | 81 | MAKE_CHECK_ARGS: check-build |
c5008c76 | 82 | artifacts: |
0a796d63 | 83 | expire_in: 2 days |
c5008c76 AB |
84 | paths: |
85 | - build | |
86 | ||
699616db | 87 | check-system-ubuntu: |
c5008c76 AB |
88 | <<: *native_test_job_definition |
89 | needs: | |
699616db | 90 | - job: build-system-ubuntu |
c5008c76 AB |
91 | artifacts: true |
92 | variables: | |
93 | IMAGE: ubuntu2004 | |
c962864f | 94 | MAKE_CHECK_ARGS: check |
0a8b05c7 | 95 | |
699616db | 96 | acceptance-system-ubuntu: |
c5008c76 AB |
97 | <<: *native_test_job_definition |
98 | needs: | |
699616db | 99 | - job: build-system-ubuntu |
c5008c76 AB |
100 | artifacts: true |
101 | variables: | |
102 | IMAGE: ubuntu2004 | |
103 | MAKE_CHECK_ARGS: check-acceptance | |
5896c539 | 104 | <<: *acceptance_definition |
c5008c76 | 105 | |
699616db TH |
106 | build-system-debian: |
107 | <<: *native_build_job_definition | |
108 | variables: | |
109 | IMAGE: debian-amd64 | |
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 | |
113 | artifacts: | |
0a796d63 | 114 | expire_in: 2 days |
699616db TH |
115 | paths: |
116 | - build | |
117 | ||
118 | check-system-debian: | |
119 | <<: *native_test_job_definition | |
120 | needs: | |
121 | - job: build-system-debian | |
122 | artifacts: true | |
123 | variables: | |
124 | IMAGE: debian-amd64 | |
125 | MAKE_CHECK_ARGS: check | |
126 | ||
127 | acceptance-system-debian: | |
128 | <<: *native_test_job_definition | |
129 | needs: | |
130 | - job: build-system-debian | |
131 | artifacts: true | |
132 | variables: | |
133 | IMAGE: debian-amd64 | |
134 | MAKE_CHECK_ARGS: check-acceptance | |
5896c539 | 135 | <<: *acceptance_definition |
699616db TH |
136 | |
137 | build-system-fedora: | |
c962864f DB |
138 | <<: *native_build_job_definition |
139 | variables: | |
140 | IMAGE: fedora | |
affcc09c | 141 | CONFIGURE_ARGS: --disable-gcrypt --enable-nettle |
3ffc7f01 | 142 | TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu |
699616db | 143 | xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu |
a6eeac3b | 144 | MAKE_CHECK_ARGS: check-build |
c5008c76 | 145 | artifacts: |
0a796d63 | 146 | expire_in: 2 days |
c5008c76 AB |
147 | paths: |
148 | - build | |
149 | ||
699616db | 150 | check-system-fedora: |
c5008c76 AB |
151 | <<: *native_test_job_definition |
152 | needs: | |
699616db | 153 | - job: build-system-fedora |
c5008c76 AB |
154 | artifacts: true |
155 | variables: | |
156 | IMAGE: fedora | |
c962864f | 157 | MAKE_CHECK_ARGS: check |
0a8b05c7 | 158 | |
699616db | 159 | acceptance-system-fedora: |
c5008c76 AB |
160 | <<: *native_test_job_definition |
161 | needs: | |
699616db | 162 | - job: build-system-fedora |
c5008c76 AB |
163 | artifacts: true |
164 | variables: | |
165 | IMAGE: fedora | |
166 | MAKE_CHECK_ARGS: check-acceptance | |
5896c539 | 167 | <<: *acceptance_definition |
c5008c76 | 168 | |
699616db TH |
169 | build-system-centos: |
170 | <<: *native_build_job_definition | |
171 | variables: | |
172 | IMAGE: centos8 | |
affcc09c | 173 | CONFIGURE_ARGS: --disable-nettle --enable-gcrypt |
3ffc7f01 | 174 | TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu |
699616db TH |
175 | x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu |
176 | MAKE_CHECK_ARGS: check-build | |
177 | artifacts: | |
0a796d63 | 178 | expire_in: 2 days |
699616db TH |
179 | paths: |
180 | - build | |
181 | ||
182 | check-system-centos: | |
183 | <<: *native_test_job_definition | |
184 | needs: | |
185 | - job: build-system-centos | |
186 | artifacts: true | |
187 | variables: | |
188 | IMAGE: centos8 | |
189 | MAKE_CHECK_ARGS: check | |
190 | ||
191 | acceptance-system-centos: | |
192 | <<: *native_test_job_definition | |
193 | needs: | |
194 | - job: build-system-centos | |
195 | artifacts: true | |
196 | variables: | |
197 | IMAGE: centos8 | |
198 | MAKE_CHECK_ARGS: check-acceptance | |
5896c539 | 199 | <<: *acceptance_definition |
699616db | 200 | |
0a8b05c7 | 201 | build-disabled: |
c962864f DB |
202 | <<: *native_build_job_definition |
203 | variables: | |
204 | IMAGE: fedora | |
a7524adb TH |
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 | |
c962864f | 224 | MAKE_CHECK_ARGS: check-qtest SPEED=slow |
0a8b05c7 TH |
225 | |
226 | build-tcg-disabled: | |
c962864f DB |
227 | <<: *native_build_job_definition |
228 | variables: | |
229 | IMAGE: centos8 | |
230 | script: | |
231 | - mkdir build | |
232 | - cd build | |
c47110d9 | 233 | - ../configure --disable-tcg --audio-drv-list="" || { cat config.log meson-logs/meson-log.txt && exit 1; } |
c962864f DB |
234 | - make -j"$JOBS" |
235 | - make check-unit | |
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 | |
c7cf4ddb TH |
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 | |
d8a18da5 | 241 | - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122 |
c7cf4ddb TH |
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 | |
0a8b05c7 TH |
245 | |
246 | build-user: | |
c962864f DB |
247 | <<: *native_build_job_definition |
248 | variables: | |
62c902e0 AB |
249 | IMAGE: debian-all-test-cross |
250 | CONFIGURE_ARGS: --disable-tools --disable-system | |
251 | MAKE_CHECK_ARGS: check-tcg | |
0a8b05c7 | 252 | |
8cdb2cef AB |
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 | |
256 | build-user-plugins: | |
257 | <<: *native_build_job_definition | |
258 | variables: | |
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 | |
262 | timeout: 1h 30m | |
263 | ||
0a8b05c7 | 264 | build-clang: |
c962864f DB |
265 | <<: *native_build_job_definition |
266 | variables: | |
267 | IMAGE: fedora | |
268 | CONFIGURE_ARGS: --cc=clang --cxx=clang++ | |
269 | TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu | |
b610eba3 | 270 | ppc-softmmu s390x-softmmu arm-linux-user |
c962864f | 271 | MAKE_CHECK_ARGS: check |
5f55d64b | 272 | |
1c0c06b1 AB |
273 | # These targets are on the way out |
274 | build-deprecated: | |
275 | <<: *native_build_job_definition | |
276 | variables: | |
277 | IMAGE: debian-all-test-cross | |
3ffc7f01 | 278 | CONFIGURE_ARGS: --disable-docs --disable-tools |
2614670b | 279 | MAKE_CHECK_ARGS: build-tcg |
3ffc7f01 AB |
280 | TARGETS: ppc64abi32-linux-user tilegx-linux-user lm32-softmmu |
281 | unicore32-softmmu | |
2614670b AB |
282 | artifacts: |
283 | expire_in: 2 days | |
284 | paths: | |
285 | - build | |
286 | ||
287 | # We split the check-tcg step as test failures are expected but we still | |
288 | # want to catch the build breaking. | |
289 | check-deprecated: | |
290 | <<: *native_test_job_definition | |
291 | needs: | |
292 | - job: build-deprecated | |
293 | artifacts: true | |
294 | variables: | |
295 | IMAGE: debian-all-test-cross | |
296 | MAKE_CHECK_ARGS: check-tcg | |
1c0c06b1 AB |
297 | allow_failure: true |
298 | ||
48eac101 | 299 | build-oss-fuzz: |
b610eba3 TH |
300 | <<: *native_build_job_definition |
301 | variables: | |
302 | IMAGE: fedora | |
303 | script: | |
48eac101 AB |
304 | - mkdir build-oss-fuzz |
305 | - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address" | |
306 | ./scripts/oss-fuzz/build.sh | |
5ab04d5e | 307 | - export ASAN_OPTIONS="fast_unwind_on_malloc=0" |
48eac101 AB |
308 | - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f |
309 | | grep -v slirp); do | |
310 | grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ; | |
311 | echo Testing ${fuzzer} ... ; | |
320c6e78 | 312 | "${fuzzer}" -runs=1 -seed=1 || exit 1 ; |
b610eba3 | 313 | done |
5ab04d5e TH |
314 | # Unrelated to fuzzer: run some tests with -fsanitize=address |
315 | - cd build-oss-fuzz && make check-qtest-i386 check-unit | |
b610eba3 | 316 | |
5f55d64b | 317 | build-tci: |
c962864f DB |
318 | <<: *native_build_job_definition |
319 | variables: | |
320 | IMAGE: fedora | |
321 | script: | |
322 | - TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64" | |
323 | - mkdir build | |
324 | - cd build | |
325 | - ../configure --enable-tcg-interpreter | |
c47110d9 | 326 | --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" || { cat config.log meson-logs/meson-log.txt && exit 1; } |
c962864f DB |
327 | - make -j"$JOBS" |
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 | |
64ed6f92 | 331 | export QTEST_QEMU_BINARY="./qemu-system-${tg}" ; |
c962864f DB |
332 | ./tests/qtest/boot-serial-test || exit 1 ; |
333 | ./tests/qtest/cdrom-test || exit 1 ; | |
334 | done | |
64ed6f92 PB |
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 | |
affcc09c DB |
337 | |
338 | # Most jobs test latest gcrypt or nettle builds | |
339 | # | |
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 | |
344 | variables: | |
345 | IMAGE: centos7 | |
346 | TARGETS: x86_64-softmmu x86_64-linux-user | |
347 | CONFIGURE_ARGS: --disable-gcrypt --enable-nettle | |
348 | MAKE_CHECK_ARGS: check-build | |
349 | artifacts: | |
350 | paths: | |
351 | - build | |
352 | ||
353 | check-crypto-old-nettle: | |
354 | <<: *native_test_job_definition | |
355 | needs: | |
356 | - job: build-crypto-old-nettle | |
357 | artifacts: true | |
358 | variables: | |
359 | IMAGE: centos7 | |
360 | MAKE_CHECK_ARGS: check | |
361 | ||
362 | ||
363 | build-crypto-old-gcrypt: | |
364 | <<: *native_build_job_definition | |
365 | variables: | |
366 | IMAGE: centos7 | |
367 | TARGETS: x86_64-softmmu x86_64-linux-user | |
368 | CONFIGURE_ARGS: --disable-nettle --enable-gcrypt | |
369 | MAKE_CHECK_ARGS: check-build | |
370 | artifacts: | |
371 | paths: | |
372 | - build | |
373 | ||
374 | check-crypto-old-gcrypt: | |
375 | <<: *native_test_job_definition | |
376 | needs: | |
377 | - job: build-crypto-old-gcrypt | |
378 | artifacts: true | |
379 | variables: | |
380 | IMAGE: centos7 | |
381 | MAKE_CHECK_ARGS: check | |
382 | ||
383 | ||
384 | build-crypto-only-gnutls: | |
385 | <<: *native_build_job_definition | |
386 | variables: | |
387 | IMAGE: centos7 | |
388 | TARGETS: x86_64-softmmu x86_64-linux-user | |
389 | CONFIGURE_ARGS: --disable-nettle --disable-gcrypt --enable-gnutls | |
390 | MAKE_CHECK_ARGS: check-build | |
391 | artifacts: | |
392 | paths: | |
393 | - build | |
394 | ||
395 | check-crypto-only-gnutls: | |
396 | <<: *native_test_job_definition | |
397 | needs: | |
398 | - job: build-crypto-only-gnutls | |
399 | artifacts: true | |
400 | variables: | |
401 | IMAGE: centos7 | |
402 | MAKE_CHECK_ARGS: check | |
1f475472 DB |
403 | |
404 | ||
405 | check-patch: | |
406 | stage: build | |
407 | image: $CI_REGISTRY_IMAGE/qemu/centos8:latest | |
408 | script: .gitlab-ci.d/check-patch.py | |
409 | except: | |
410 | variables: | |
411 | - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master' | |
412 | variables: | |
413 | GIT_DEPTH: 1000 | |
414 | allow_failure: true | |
34ed46a2 DB |
415 | |
416 | check-dco: | |
417 | stage: build | |
418 | image: $CI_REGISTRY_IMAGE/qemu/centos8:latest | |
419 | script: .gitlab-ci.d/check-dco.py | |
420 | except: | |
421 | variables: | |
422 | - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master' | |
423 | variables: | |
424 | GIT_DEPTH: 1000 |