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