]>
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 | |
71920809 | 10 | include: |
922febe2 TH |
11 | - local: '/.gitlab-ci.d/edk2.yml' |
12 | - local: '/.gitlab-ci.d/opensbi.yml' | |
fa821f23 | 13 | - local: '/.gitlab-ci.d/containers.yml' |
6bcb5fc0 | 14 | - local: '/.gitlab-ci.d/crossbuilds.yml' |
71920809 | 15 | |
c962864f DB |
16 | .native_build_job_template: &native_build_job_definition |
17 | stage: build | |
18 | image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest | |
19 | before_script: | |
20 | - JOBS=$(expr $(nproc) + 1) | |
8d77ce1d | 21 | - sed -i s,git.qemu.org/git,gitlab.com/qemu-project, .gitmodules |
c962864f DB |
22 | script: |
23 | - mkdir build | |
24 | - cd build | |
25 | - if test -n "$TARGETS"; | |
26 | then | |
27 | ../configure --enable-werror $CONFIGURE_ARGS --target-list="$TARGETS" ; | |
28 | else | |
29 | ../configure --enable-werror $CONFIGURE_ARGS ; | |
c47110d9 | 30 | fi || { cat config.log meson-logs/meson-log.txt && exit 1; } |
c962864f | 31 | - make -j"$JOBS" |
c5008c76 AB |
32 | - if test -n "$MAKE_CHECK_ARGS"; |
33 | then | |
a6eeac3b | 34 | make -j"$JOBS" $MAKE_CHECK_ARGS ; |
c5008c76 AB |
35 | fi |
36 | ||
37 | .native_test_job_template: &native_test_job_definition | |
38 | stage: test | |
39 | image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest | |
40 | script: | |
41 | - cd build | |
42 | - find . -type f -exec touch {} + | |
43 | - make $MAKE_CHECK_ARGS | |
44 | ||
5896c539 TH |
45 | .acceptance_template: &acceptance_definition |
46 | cache: | |
47 | key: "${CI_JOB_NAME}-cache" | |
48 | paths: | |
49 | - ${CI_PROJECT_DIR}/avocado-cache | |
50 | policy: pull-push | |
ec4d2feb CR |
51 | artifacts: |
52 | paths: | |
53 | - build/tests/results/latest/results.xml | |
54 | reports: | |
55 | junit: build/tests/results/latest/results.xml | |
5896c539 TH |
56 | before_script: |
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 ; | |
63 | fi | |
67202bae | 64 | - export AVOCADO_ALLOW_UNTRUSTED_CODE=1 |
c5008c76 AB |
65 | after_script: |
66 | - cd build | |
52dff285 | 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", "CANCEL")]' | xargs cat |
5896c539 | 68 | - du -chs ${CI_PROJECT_DIR}/avocado-cache |
0a8b05c7 | 69 | |
699616db | 70 | build-system-ubuntu: |
c962864f DB |
71 | <<: *native_build_job_definition |
72 | variables: | |
73 | IMAGE: ubuntu2004 | |
699616db TH |
74 | TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu |
75 | moxie-softmmu microblazeel-softmmu mips64el-softmmu | |
a6eeac3b | 76 | MAKE_CHECK_ARGS: check-build |
c5008c76 | 77 | artifacts: |
0a796d63 | 78 | expire_in: 2 days |
c5008c76 AB |
79 | paths: |
80 | - build | |
81 | ||
699616db | 82 | check-system-ubuntu: |
c5008c76 AB |
83 | <<: *native_test_job_definition |
84 | needs: | |
699616db | 85 | - job: build-system-ubuntu |
c5008c76 AB |
86 | artifacts: true |
87 | variables: | |
88 | IMAGE: ubuntu2004 | |
c962864f | 89 | MAKE_CHECK_ARGS: check |
0a8b05c7 | 90 | |
699616db | 91 | acceptance-system-ubuntu: |
c5008c76 AB |
92 | <<: *native_test_job_definition |
93 | needs: | |
699616db | 94 | - job: build-system-ubuntu |
c5008c76 AB |
95 | artifacts: true |
96 | variables: | |
97 | IMAGE: ubuntu2004 | |
98 | MAKE_CHECK_ARGS: check-acceptance | |
5896c539 | 99 | <<: *acceptance_definition |
c5008c76 | 100 | |
699616db TH |
101 | build-system-debian: |
102 | <<: *native_build_job_definition | |
103 | variables: | |
104 | IMAGE: debian-amd64 | |
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 | |
108 | artifacts: | |
0a796d63 | 109 | expire_in: 2 days |
699616db TH |
110 | paths: |
111 | - build | |
112 | ||
113 | check-system-debian: | |
114 | <<: *native_test_job_definition | |
115 | needs: | |
116 | - job: build-system-debian | |
117 | artifacts: true | |
118 | variables: | |
119 | IMAGE: debian-amd64 | |
120 | MAKE_CHECK_ARGS: check | |
121 | ||
122 | acceptance-system-debian: | |
123 | <<: *native_test_job_definition | |
124 | needs: | |
125 | - job: build-system-debian | |
126 | artifacts: true | |
127 | variables: | |
128 | IMAGE: debian-amd64 | |
129 | MAKE_CHECK_ARGS: check-acceptance | |
5896c539 | 130 | <<: *acceptance_definition |
699616db TH |
131 | |
132 | build-system-fedora: | |
c962864f DB |
133 | <<: *native_build_job_definition |
134 | variables: | |
135 | IMAGE: fedora | |
affcc09c | 136 | CONFIGURE_ARGS: --disable-gcrypt --enable-nettle |
3ffc7f01 | 137 | TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu |
699616db | 138 | xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu |
a6eeac3b | 139 | MAKE_CHECK_ARGS: check-build |
c5008c76 | 140 | artifacts: |
0a796d63 | 141 | expire_in: 2 days |
c5008c76 AB |
142 | paths: |
143 | - build | |
144 | ||
699616db | 145 | check-system-fedora: |
c5008c76 AB |
146 | <<: *native_test_job_definition |
147 | needs: | |
699616db | 148 | - job: build-system-fedora |
c5008c76 AB |
149 | artifacts: true |
150 | variables: | |
151 | IMAGE: fedora | |
c962864f | 152 | MAKE_CHECK_ARGS: check |
0a8b05c7 | 153 | |
699616db | 154 | acceptance-system-fedora: |
c5008c76 AB |
155 | <<: *native_test_job_definition |
156 | needs: | |
699616db | 157 | - job: build-system-fedora |
c5008c76 AB |
158 | artifacts: true |
159 | variables: | |
160 | IMAGE: fedora | |
161 | MAKE_CHECK_ARGS: check-acceptance | |
5896c539 | 162 | <<: *acceptance_definition |
c5008c76 | 163 | |
699616db TH |
164 | build-system-centos: |
165 | <<: *native_build_job_definition | |
166 | variables: | |
167 | IMAGE: centos8 | |
affcc09c | 168 | CONFIGURE_ARGS: --disable-nettle --enable-gcrypt |
3ffc7f01 | 169 | TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu |
699616db TH |
170 | x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu |
171 | MAKE_CHECK_ARGS: check-build | |
172 | artifacts: | |
0a796d63 | 173 | expire_in: 2 days |
699616db TH |
174 | paths: |
175 | - build | |
176 | ||
177 | check-system-centos: | |
178 | <<: *native_test_job_definition | |
179 | needs: | |
180 | - job: build-system-centos | |
181 | artifacts: true | |
182 | variables: | |
183 | IMAGE: centos8 | |
184 | MAKE_CHECK_ARGS: check | |
185 | ||
186 | acceptance-system-centos: | |
187 | <<: *native_test_job_definition | |
188 | needs: | |
189 | - job: build-system-centos | |
190 | artifacts: true | |
191 | variables: | |
192 | IMAGE: centos8 | |
193 | MAKE_CHECK_ARGS: check-acceptance | |
5896c539 | 194 | <<: *acceptance_definition |
699616db | 195 | |
0a8b05c7 | 196 | build-disabled: |
c962864f DB |
197 | <<: *native_build_job_definition |
198 | variables: | |
199 | IMAGE: fedora | |
a7524adb TH |
200 | CONFIGURE_ARGS: --disable-attr --disable-avx2 --disable-bochs |
201 | --disable-brlapi --disable-bzip2 --disable-cap-ng --disable-capstone | |
202 | --disable-cloop --disable-coroutine-pool --disable-curl --disable-curses | |
203 | --disable-dmg --disable-docs --disable-glusterfs --disable-gnutls | |
204 | --disable-gtk --disable-guest-agent --disable-iconv --disable-kvm | |
205 | --disable-libiscsi --disable-libpmem --disable-libssh --disable-libusb | |
206 | --disable-libxml2 --disable-linux-aio --disable-live-block-migration | |
207 | --disable-lzo --disable-malloc-trim --disable-mpath --disable-nettle | |
208 | --disable-numa --disable-parallels --disable-pie --disable-qcow1 | |
209 | --disable-qed --disable-qom-cast-debug --disable-rbd --disable-rdma | |
210 | --disable-replication --disable-sdl --disable-seccomp --disable-sheepdog | |
211 | --disable-slirp --disable-smartcard --disable-snappy --disable-spice | |
212 | --disable-strip --disable-tpm --disable-usb-redir --disable-vdi | |
213 | --disable-vhost-crypto --disable-vhost-net --disable-vhost-scsi | |
214 | --disable-vhost-user --disable-vhost-vdpa --disable-vhost-vsock | |
215 | --disable-virglrenderer --disable-vnc --disable-vte --disable-vvfat | |
216 | --disable-xen --disable-zstd | |
217 | TARGETS: arm-softmmu i386-softmmu ppc64-softmmu mips64-softmmu | |
218 | s390x-softmmu i386-linux-user | |
c962864f | 219 | MAKE_CHECK_ARGS: check-qtest SPEED=slow |
0a8b05c7 TH |
220 | |
221 | build-tcg-disabled: | |
c962864f DB |
222 | <<: *native_build_job_definition |
223 | variables: | |
224 | IMAGE: centos8 | |
225 | script: | |
226 | - mkdir build | |
227 | - cd build | |
c47110d9 | 228 | - ../configure --disable-tcg --audio-drv-list="" || { cat config.log meson-logs/meson-log.txt && exit 1; } |
c962864f DB |
229 | - make -j"$JOBS" |
230 | - make check-unit | |
231 | - make check-qapi-schema | |
232 | - cd tests/qemu-iotests/ | |
233 | - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048 | |
c7cf4ddb TH |
234 | 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163 |
235 | 170 171 183 184 192 194 197 208 215 221 222 226 227 236 253 277 | |
d8a18da5 | 236 | - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122 |
c7cf4ddb TH |
237 | 124 132 139 142 144 145 151 152 155 157 165 194 196 197 200 202 |
238 | 208 209 215 216 218 222 227 234 246 247 248 250 254 255 257 258 | |
239 | 260 261 262 263 264 270 272 273 277 279 | |
0a8b05c7 TH |
240 | |
241 | build-user: | |
c962864f DB |
242 | <<: *native_build_job_definition |
243 | variables: | |
62c902e0 AB |
244 | IMAGE: debian-all-test-cross |
245 | CONFIGURE_ARGS: --disable-tools --disable-system | |
246 | MAKE_CHECK_ARGS: check-tcg | |
0a8b05c7 | 247 | |
8cdb2cef AB |
248 | # Run check-tcg against linux-user (with plugins) |
249 | # we skip sparc64-linux-user until it has been fixed somewhat | |
250 | # we skip cris-linux-user as it doesn't use the common run loop | |
251 | build-user-plugins: | |
252 | <<: *native_build_job_definition | |
253 | variables: | |
254 | IMAGE: debian-all-test-cross | |
255 | CONFIGURE_ARGS: --disable-tools --disable-system --enable-plugins --enable-debug-tcg --target-list-exclude=sparc64-linux-user,cris-linux-user | |
256 | MAKE_CHECK_ARGS: check-tcg | |
257 | timeout: 1h 30m | |
258 | ||
0a8b05c7 | 259 | build-clang: |
c962864f DB |
260 | <<: *native_build_job_definition |
261 | variables: | |
262 | IMAGE: fedora | |
263 | CONFIGURE_ARGS: --cc=clang --cxx=clang++ | |
264 | TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu | |
b610eba3 | 265 | ppc-softmmu s390x-softmmu arm-linux-user |
c962864f | 266 | MAKE_CHECK_ARGS: check |
5f55d64b | 267 | |
1c0c06b1 AB |
268 | # These targets are on the way out |
269 | build-deprecated: | |
270 | <<: *native_build_job_definition | |
271 | variables: | |
272 | IMAGE: debian-all-test-cross | |
3ffc7f01 | 273 | CONFIGURE_ARGS: --disable-docs --disable-tools |
2614670b | 274 | MAKE_CHECK_ARGS: build-tcg |
3ffc7f01 AB |
275 | TARGETS: ppc64abi32-linux-user tilegx-linux-user lm32-softmmu |
276 | unicore32-softmmu | |
2614670b AB |
277 | artifacts: |
278 | expire_in: 2 days | |
279 | paths: | |
280 | - build | |
281 | ||
282 | # We split the check-tcg step as test failures are expected but we still | |
283 | # want to catch the build breaking. | |
284 | check-deprecated: | |
285 | <<: *native_test_job_definition | |
286 | needs: | |
287 | - job: build-deprecated | |
288 | artifacts: true | |
289 | variables: | |
290 | IMAGE: debian-all-test-cross | |
291 | MAKE_CHECK_ARGS: check-tcg | |
1c0c06b1 AB |
292 | allow_failure: true |
293 | ||
48eac101 | 294 | build-oss-fuzz: |
b610eba3 TH |
295 | <<: *native_build_job_definition |
296 | variables: | |
297 | IMAGE: fedora | |
298 | script: | |
48eac101 AB |
299 | - mkdir build-oss-fuzz |
300 | - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address" | |
301 | ./scripts/oss-fuzz/build.sh | |
5ab04d5e | 302 | - export ASAN_OPTIONS="fast_unwind_on_malloc=0" |
48eac101 AB |
303 | - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f |
304 | | grep -v slirp); do | |
305 | grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ; | |
306 | echo Testing ${fuzzer} ... ; | |
320c6e78 | 307 | "${fuzzer}" -runs=1 -seed=1 || exit 1 ; |
b610eba3 | 308 | done |
5ab04d5e TH |
309 | # Unrelated to fuzzer: run some tests with -fsanitize=address |
310 | - cd build-oss-fuzz && make check-qtest-i386 check-unit | |
b610eba3 | 311 | |
5f55d64b | 312 | build-tci: |
c962864f DB |
313 | <<: *native_build_job_definition |
314 | variables: | |
315 | IMAGE: fedora | |
316 | script: | |
317 | - TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64" | |
318 | - mkdir build | |
319 | - cd build | |
320 | - ../configure --enable-tcg-interpreter | |
c47110d9 | 321 | --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" || { cat config.log meson-logs/meson-log.txt && exit 1; } |
c962864f DB |
322 | - make -j"$JOBS" |
323 | - make run-tcg-tests-x86_64-softmmu | |
324 | - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test | |
325 | - for tg in $TARGETS ; do | |
64ed6f92 | 326 | export QTEST_QEMU_BINARY="./qemu-system-${tg}" ; |
c962864f DB |
327 | ./tests/qtest/boot-serial-test || exit 1 ; |
328 | ./tests/qtest/cdrom-test || exit 1 ; | |
329 | done | |
64ed6f92 PB |
330 | - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test |
331 | - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow | |
affcc09c DB |
332 | |
333 | # Most jobs test latest gcrypt or nettle builds | |
334 | # | |
335 | # These jobs test old gcrypt and nettle from RHEL7 | |
336 | # which had some API differences. | |
337 | build-crypto-old-nettle: | |
338 | <<: *native_build_job_definition | |
339 | variables: | |
340 | IMAGE: centos7 | |
341 | TARGETS: x86_64-softmmu x86_64-linux-user | |
342 | CONFIGURE_ARGS: --disable-gcrypt --enable-nettle | |
343 | MAKE_CHECK_ARGS: check-build | |
344 | artifacts: | |
345 | paths: | |
346 | - build | |
347 | ||
348 | check-crypto-old-nettle: | |
349 | <<: *native_test_job_definition | |
350 | needs: | |
351 | - job: build-crypto-old-nettle | |
352 | artifacts: true | |
353 | variables: | |
354 | IMAGE: centos7 | |
355 | MAKE_CHECK_ARGS: check | |
356 | ||
357 | ||
358 | build-crypto-old-gcrypt: | |
359 | <<: *native_build_job_definition | |
360 | variables: | |
361 | IMAGE: centos7 | |
362 | TARGETS: x86_64-softmmu x86_64-linux-user | |
363 | CONFIGURE_ARGS: --disable-nettle --enable-gcrypt | |
364 | MAKE_CHECK_ARGS: check-build | |
365 | artifacts: | |
366 | paths: | |
367 | - build | |
368 | ||
369 | check-crypto-old-gcrypt: | |
370 | <<: *native_test_job_definition | |
371 | needs: | |
372 | - job: build-crypto-old-gcrypt | |
373 | artifacts: true | |
374 | variables: | |
375 | IMAGE: centos7 | |
376 | MAKE_CHECK_ARGS: check | |
377 | ||
378 | ||
379 | build-crypto-only-gnutls: | |
380 | <<: *native_build_job_definition | |
381 | variables: | |
382 | IMAGE: centos7 | |
383 | TARGETS: x86_64-softmmu x86_64-linux-user | |
384 | CONFIGURE_ARGS: --disable-nettle --disable-gcrypt --enable-gnutls | |
385 | MAKE_CHECK_ARGS: check-build | |
386 | artifacts: | |
387 | paths: | |
388 | - build | |
389 | ||
390 | check-crypto-only-gnutls: | |
391 | <<: *native_test_job_definition | |
392 | needs: | |
393 | - job: build-crypto-only-gnutls | |
394 | artifacts: true | |
395 | variables: | |
396 | IMAGE: centos7 | |
397 | MAKE_CHECK_ARGS: check | |
1f475472 DB |
398 | |
399 | ||
400 | check-patch: | |
401 | stage: build | |
402 | image: $CI_REGISTRY_IMAGE/qemu/centos8:latest | |
403 | script: .gitlab-ci.d/check-patch.py | |
404 | except: | |
405 | variables: | |
406 | - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master' | |
407 | variables: | |
408 | GIT_DEPTH: 1000 | |
409 | allow_failure: true | |
34ed46a2 DB |
410 | |
411 | check-dco: | |
412 | stage: build | |
413 | image: $CI_REGISTRY_IMAGE/qemu/centos8:latest | |
414 | script: .gitlab-ci.d/check-dco.py | |
415 | except: | |
416 | variables: | |
417 | - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master' | |
418 | variables: | |
419 | GIT_DEPTH: 1000 |