]>
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) | |
21 | script: | |
1b874108 PB |
22 | - if test -n "$LD_JOBS"; |
23 | then | |
24 | scripts/git-submodule.sh update meson ; | |
25 | fi | |
c962864f DB |
26 | - mkdir build |
27 | - cd build | |
28 | - if test -n "$TARGETS"; | |
29 | then | |
1b874108 | 30 | ../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=internal} $CONFIGURE_ARGS --target-list="$TARGETS" ; |
c962864f | 31 | else |
1b874108 | 32 | ../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=internal} $CONFIGURE_ARGS ; |
c47110d9 | 33 | fi || { cat config.log meson-logs/meson-log.txt && exit 1; } |
e6d27a9c DB |
34 | - if test -n "$LD_JOBS"; |
35 | then | |
1b874108 | 36 | ../meson/meson.py configure . -Dbackend_max_links="$LD_JOBS" ; |
e6d27a9c | 37 | fi || exit 1; |
c962864f | 38 | - make -j"$JOBS" |
c5008c76 AB |
39 | - if test -n "$MAKE_CHECK_ARGS"; |
40 | then | |
a6eeac3b | 41 | make -j"$JOBS" $MAKE_CHECK_ARGS ; |
c5008c76 AB |
42 | fi |
43 | ||
44 | .native_test_job_template: &native_test_job_definition | |
45 | stage: test | |
46 | image: $CI_REGISTRY_IMAGE/qemu/$IMAGE:latest | |
47 | script: | |
12a917a1 | 48 | - scripts/git-submodule.sh update |
5186685e | 49 | $(sed -n '/GIT_SUBMODULES=/ s/.*=// p' build/config-host.mak) |
c5008c76 AB |
50 | - cd build |
51 | - find . -type f -exec touch {} + | |
12a917a1 TH |
52 | # Avoid recompiling by hiding ninja with NINJA=":" |
53 | - make NINJA=":" $MAKE_CHECK_ARGS | |
c5008c76 | 54 | |
5896c539 TH |
55 | .acceptance_template: &acceptance_definition |
56 | cache: | |
57 | key: "${CI_JOB_NAME}-cache" | |
58 | paths: | |
59 | - ${CI_PROJECT_DIR}/avocado-cache | |
60 | policy: pull-push | |
ec4d2feb | 61 | artifacts: |
df063546 WSM |
62 | name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" |
63 | when: always | |
64 | expire_in: 2 days | |
ec4d2feb CR |
65 | paths: |
66 | - build/tests/results/latest/results.xml | |
df063546 | 67 | - build/tests/results/latest/test-results |
ec4d2feb CR |
68 | reports: |
69 | junit: build/tests/results/latest/results.xml | |
5896c539 TH |
70 | before_script: |
71 | - mkdir -p ~/.config/avocado | |
72 | - echo "[datadir.paths]" > ~/.config/avocado/avocado.conf | |
73 | - echo "cache_dirs = ['${CI_PROJECT_DIR}/avocado-cache']" | |
74 | >> ~/.config/avocado/avocado.conf | |
c071f19b | 75 | - echo -e '[job.output.testlogs]\nstatuses = ["FAIL", "INTERRUPT"]' |
ba2232ba | 76 | >> ~/.config/avocado/avocado.conf |
5896c539 TH |
77 | - if [ -d ${CI_PROJECT_DIR}/avocado-cache ]; then |
78 | du -chs ${CI_PROJECT_DIR}/avocado-cache ; | |
79 | fi | |
67202bae | 80 | - export AVOCADO_ALLOW_UNTRUSTED_CODE=1 |
c5008c76 AB |
81 | after_script: |
82 | - cd build | |
5896c539 | 83 | - du -chs ${CI_PROJECT_DIR}/avocado-cache |
0a8b05c7 | 84 | |
b22786ea JY |
85 | build-system-alpine: |
86 | <<: *native_build_job_definition | |
9f3a24cf PMD |
87 | needs: |
88 | - job: amd64-alpine-container | |
b22786ea JY |
89 | variables: |
90 | IMAGE: alpine | |
91 | TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu | |
92 | moxie-softmmu microblazeel-softmmu mips64el-softmmu | |
93 | MAKE_CHECK_ARGS: check-build | |
65aff820 | 94 | CONFIGURE_ARGS: --enable-docs --enable-trace-backends=log,simple,syslog |
b22786ea JY |
95 | artifacts: |
96 | expire_in: 2 days | |
97 | paths: | |
98 | - .git-submodule-status | |
99 | - build | |
100 | ||
101 | check-system-alpine: | |
102 | <<: *native_test_job_definition | |
103 | needs: | |
104 | - job: build-system-alpine | |
105 | artifacts: true | |
106 | variables: | |
107 | IMAGE: alpine | |
108 | MAKE_CHECK_ARGS: check | |
109 | ||
110 | acceptance-system-alpine: | |
111 | <<: *native_test_job_definition | |
112 | needs: | |
113 | - job: build-system-alpine | |
114 | artifacts: true | |
115 | variables: | |
116 | IMAGE: alpine | |
117 | MAKE_CHECK_ARGS: check-acceptance | |
118 | <<: *acceptance_definition | |
119 | ||
699616db | 120 | build-system-ubuntu: |
c962864f | 121 | <<: *native_build_job_definition |
764a0747 DB |
122 | needs: |
123 | job: amd64-ubuntu2004-container | |
c962864f DB |
124 | variables: |
125 | IMAGE: ubuntu2004 | |
a9eb2df2 | 126 | CONFIGURE_ARGS: --enable-docs --enable-fdt=system --enable-slirp=system |
699616db TH |
127 | TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu |
128 | moxie-softmmu microblazeel-softmmu mips64el-softmmu | |
a6eeac3b | 129 | MAKE_CHECK_ARGS: check-build |
c5008c76 | 130 | artifacts: |
0a796d63 | 131 | expire_in: 2 days |
c5008c76 AB |
132 | paths: |
133 | - build | |
134 | ||
699616db | 135 | check-system-ubuntu: |
c5008c76 AB |
136 | <<: *native_test_job_definition |
137 | needs: | |
699616db | 138 | - job: build-system-ubuntu |
c5008c76 AB |
139 | artifacts: true |
140 | variables: | |
141 | IMAGE: ubuntu2004 | |
c962864f | 142 | MAKE_CHECK_ARGS: check |
0a8b05c7 | 143 | |
699616db | 144 | acceptance-system-ubuntu: |
c5008c76 AB |
145 | <<: *native_test_job_definition |
146 | needs: | |
699616db | 147 | - job: build-system-ubuntu |
c5008c76 AB |
148 | artifacts: true |
149 | variables: | |
150 | IMAGE: ubuntu2004 | |
151 | MAKE_CHECK_ARGS: check-acceptance | |
5896c539 | 152 | <<: *acceptance_definition |
c5008c76 | 153 | |
699616db TH |
154 | build-system-debian: |
155 | <<: *native_build_job_definition | |
764a0747 DB |
156 | needs: |
157 | job: amd64-debian-container | |
699616db TH |
158 | variables: |
159 | IMAGE: debian-amd64 | |
db0108d5 | 160 | CONFIGURE_ARGS: --enable-fdt=system |
699616db TH |
161 | TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu |
162 | riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu | |
163 | MAKE_CHECK_ARGS: check-build | |
164 | artifacts: | |
0a796d63 | 165 | expire_in: 2 days |
699616db TH |
166 | paths: |
167 | - build | |
168 | ||
169 | check-system-debian: | |
170 | <<: *native_test_job_definition | |
171 | needs: | |
172 | - job: build-system-debian | |
173 | artifacts: true | |
174 | variables: | |
175 | IMAGE: debian-amd64 | |
176 | MAKE_CHECK_ARGS: check | |
177 | ||
178 | acceptance-system-debian: | |
179 | <<: *native_test_job_definition | |
180 | needs: | |
181 | - job: build-system-debian | |
182 | artifacts: true | |
183 | variables: | |
184 | IMAGE: debian-amd64 | |
185 | MAKE_CHECK_ARGS: check-acceptance | |
5896c539 | 186 | <<: *acceptance_definition |
699616db TH |
187 | |
188 | build-system-fedora: | |
c962864f | 189 | <<: *native_build_job_definition |
764a0747 DB |
190 | needs: |
191 | job: amd64-fedora-container | |
c962864f DB |
192 | variables: |
193 | IMAGE: fedora | |
d0f26e68 | 194 | CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs |
db0108d5 | 195 | --enable-fdt=system --enable-slirp=system --enable-capstone=system |
3ffc7f01 | 196 | TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu |
699616db | 197 | xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu |
a6eeac3b | 198 | MAKE_CHECK_ARGS: check-build |
c5008c76 | 199 | artifacts: |
0a796d63 | 200 | expire_in: 2 days |
c5008c76 AB |
201 | paths: |
202 | - build | |
203 | ||
699616db | 204 | check-system-fedora: |
c5008c76 AB |
205 | <<: *native_test_job_definition |
206 | needs: | |
699616db | 207 | - job: build-system-fedora |
c5008c76 AB |
208 | artifacts: true |
209 | variables: | |
210 | IMAGE: fedora | |
c962864f | 211 | MAKE_CHECK_ARGS: check |
0a8b05c7 | 212 | |
699616db | 213 | acceptance-system-fedora: |
c5008c76 AB |
214 | <<: *native_test_job_definition |
215 | needs: | |
699616db | 216 | - job: build-system-fedora |
c5008c76 AB |
217 | artifacts: true |
218 | variables: | |
219 | IMAGE: fedora | |
220 | MAKE_CHECK_ARGS: check-acceptance | |
5896c539 | 221 | <<: *acceptance_definition |
c5008c76 | 222 | |
699616db TH |
223 | build-system-centos: |
224 | <<: *native_build_job_definition | |
764a0747 DB |
225 | needs: |
226 | job: amd64-centos8-container | |
699616db TH |
227 | variables: |
228 | IMAGE: centos8 | |
db0108d5 | 229 | CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-fdt=system |
a2e5bbf0 | 230 | --enable-modules --enable-trace-backends=dtrace |
3ffc7f01 | 231 | TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu |
699616db TH |
232 | x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu |
233 | MAKE_CHECK_ARGS: check-build | |
234 | artifacts: | |
0a796d63 | 235 | expire_in: 2 days |
699616db TH |
236 | paths: |
237 | - build | |
238 | ||
239 | check-system-centos: | |
240 | <<: *native_test_job_definition | |
241 | needs: | |
242 | - job: build-system-centos | |
243 | artifacts: true | |
244 | variables: | |
245 | IMAGE: centos8 | |
246 | MAKE_CHECK_ARGS: check | |
247 | ||
248 | acceptance-system-centos: | |
249 | <<: *native_test_job_definition | |
250 | needs: | |
251 | - job: build-system-centos | |
252 | artifacts: true | |
253 | variables: | |
254 | IMAGE: centos8 | |
255 | MAKE_CHECK_ARGS: check-acceptance | |
5896c539 | 256 | <<: *acceptance_definition |
699616db | 257 | |
b115ea3a CYC |
258 | build-system-opensuse: |
259 | <<: *native_build_job_definition | |
764a0747 DB |
260 | needs: |
261 | job: amd64-opensuse-leap-container | |
b115ea3a CYC |
262 | variables: |
263 | IMAGE: opensuse-leap | |
db0108d5 | 264 | CONFIGURE_ARGS: --enable-fdt=system |
b115ea3a CYC |
265 | TARGETS: s390x-softmmu x86_64-softmmu aarch64-softmmu |
266 | MAKE_CHECK_ARGS: check-build | |
267 | artifacts: | |
268 | expire_in: 2 days | |
269 | paths: | |
270 | - build | |
271 | ||
272 | check-system-opensuse: | |
273 | <<: *native_test_job_definition | |
274 | needs: | |
275 | - job: build-system-opensuse | |
276 | artifacts: true | |
277 | variables: | |
278 | IMAGE: opensuse-leap | |
279 | MAKE_CHECK_ARGS: check | |
280 | ||
281 | acceptance-system-opensuse: | |
f5157dc7 DB |
282 | <<: *native_test_job_definition |
283 | needs: | |
284 | - job: build-system-opensuse | |
285 | artifacts: true | |
286 | variables: | |
287 | IMAGE: opensuse-leap | |
288 | MAKE_CHECK_ARGS: check-acceptance | |
289 | <<: *acceptance_definition | |
b115ea3a CYC |
290 | |
291 | ||
0a8b05c7 | 292 | build-disabled: |
c962864f | 293 | <<: *native_build_job_definition |
764a0747 DB |
294 | needs: |
295 | job: amd64-fedora-container | |
c962864f DB |
296 | variables: |
297 | IMAGE: fedora | |
94a4f816 PMD |
298 | CONFIGURE_ARGS: |
299 | --disable-attr | |
0c4d885f | 300 | --disable-auth-pam |
94a4f816 PMD |
301 | --disable-avx2 |
302 | --disable-bochs | |
303 | --disable-brlapi | |
304 | --disable-bzip2 | |
305 | --disable-cap-ng | |
306 | --disable-capstone | |
307 | --disable-cloop | |
308 | --disable-coroutine-pool | |
309 | --disable-curl | |
310 | --disable-curses | |
311 | --disable-dmg | |
312 | --disable-docs | |
0c4d885f | 313 | --disable-gcrypt |
94a4f816 PMD |
314 | --disable-glusterfs |
315 | --disable-gnutls | |
316 | --disable-gtk | |
317 | --disable-guest-agent | |
318 | --disable-iconv | |
0c4d885f | 319 | --disable-keyring |
94a4f816 PMD |
320 | --disable-kvm |
321 | --disable-libiscsi | |
322 | --disable-libpmem | |
323 | --disable-libssh | |
0c4d885f | 324 | --disable-libudev |
94a4f816 PMD |
325 | --disable-libusb |
326 | --disable-libxml2 | |
327 | --disable-linux-aio | |
328 | --disable-live-block-migration | |
329 | --disable-lzo | |
330 | --disable-malloc-trim | |
331 | --disable-mpath | |
332 | --disable-nettle | |
333 | --disable-numa | |
0c4d885f | 334 | --disable-opengl |
94a4f816 PMD |
335 | --disable-parallels |
336 | --disable-pie | |
337 | --disable-qcow1 | |
338 | --disable-qed | |
339 | --disable-qom-cast-debug | |
340 | --disable-rbd | |
341 | --disable-rdma | |
342 | --disable-replication | |
343 | --disable-sdl | |
344 | --disable-seccomp | |
345 | --disable-sheepdog | |
346 | --disable-slirp | |
347 | --disable-smartcard | |
348 | --disable-snappy | |
0c4d885f | 349 | --disable-sparse |
94a4f816 PMD |
350 | --disable-spice |
351 | --disable-strip | |
352 | --disable-tpm | |
353 | --disable-usb-redir | |
354 | --disable-vdi | |
355 | --disable-vhost-crypto | |
356 | --disable-vhost-net | |
357 | --disable-vhost-scsi | |
3473f6ed | 358 | --disable-vhost-kernel |
94a4f816 PMD |
359 | --disable-vhost-user |
360 | --disable-vhost-vdpa | |
361 | --disable-vhost-vsock | |
362 | --disable-virglrenderer | |
363 | --disable-vnc | |
364 | --disable-vte | |
365 | --disable-vvfat | |
366 | --disable-xen | |
367 | --disable-zstd | |
a7524adb TH |
368 | TARGETS: arm-softmmu i386-softmmu ppc64-softmmu mips64-softmmu |
369 | s390x-softmmu i386-linux-user | |
c962864f | 370 | MAKE_CHECK_ARGS: check-qtest SPEED=slow |
0a8b05c7 | 371 | |
37b6fd66 PMD |
372 | # This jobs explicitly disable TCG (--disable-tcg), KVM is detected by |
373 | # the configure script. The container doesn't contain Xen headers so | |
374 | # Xen accelerator is not detected / selected. As result it build the | |
375 | # i386-softmmu and x86_64-softmmu with KVM being the single accelerator | |
376 | # available. | |
7da153e8 TH |
377 | # Also use a different coroutine implementation (which is only really of |
378 | # interest to KVM users, i.e. with TCG disabled) | |
0a8b05c7 | 379 | build-tcg-disabled: |
c962864f | 380 | <<: *native_build_job_definition |
764a0747 DB |
381 | needs: |
382 | job: amd64-centos8-container | |
c962864f DB |
383 | variables: |
384 | IMAGE: centos8 | |
385 | script: | |
386 | - mkdir build | |
387 | - cd build | |
7da153e8 TH |
388 | - ../configure --disable-tcg --audio-drv-list="" --with-coroutine=ucontext |
389 | || { cat config.log meson-logs/meson-log.txt && exit 1; } | |
c962864f DB |
390 | - make -j"$JOBS" |
391 | - make check-unit | |
392 | - make check-qapi-schema | |
393 | - cd tests/qemu-iotests/ | |
394 | - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048 | |
c7cf4ddb TH |
395 | 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163 |
396 | 170 171 183 184 192 194 197 208 215 221 222 226 227 236 253 277 | |
d8a18da5 | 397 | - ./check -qcow2 028 051 056 057 058 065 068 082 085 091 095 096 102 122 |
c7cf4ddb TH |
398 | 124 132 139 142 144 145 151 152 155 157 165 194 196 197 200 202 |
399 | 208 209 215 216 218 222 227 234 246 247 248 250 254 255 257 258 | |
400 | 260 261 262 263 264 270 272 273 277 279 | |
0a8b05c7 TH |
401 | |
402 | build-user: | |
c962864f | 403 | <<: *native_build_job_definition |
764a0747 DB |
404 | needs: |
405 | job: amd64-debian-user-cross-container | |
c962864f | 406 | variables: |
62c902e0 AB |
407 | IMAGE: debian-all-test-cross |
408 | CONFIGURE_ARGS: --disable-tools --disable-system | |
409 | MAKE_CHECK_ARGS: check-tcg | |
0a8b05c7 | 410 | |
d01bc253 PMD |
411 | build-user-static: |
412 | <<: *native_build_job_definition | |
764a0747 DB |
413 | needs: |
414 | job: amd64-debian-user-cross-container | |
d01bc253 PMD |
415 | variables: |
416 | IMAGE: debian-all-test-cross | |
417 | CONFIGURE_ARGS: --disable-tools --disable-system --static | |
418 | MAKE_CHECK_ARGS: check-tcg | |
419 | ||
ac74e282 AB |
420 | # Only build the softmmu targets we have check-tcg tests for |
421 | build-some-softmmu: | |
422 | <<: *native_build_job_definition | |
764a0747 DB |
423 | needs: |
424 | job: amd64-debian-user-cross-container | |
ac74e282 AB |
425 | variables: |
426 | IMAGE: debian-all-test-cross | |
ac6d7074 | 427 | CONFIGURE_ARGS: --disable-tools --enable-debug |
ac74e282 AB |
428 | TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu |
429 | MAKE_CHECK_ARGS: check-tcg | |
430 | ||
8cdb2cef AB |
431 | # Run check-tcg against linux-user (with plugins) |
432 | # we skip sparc64-linux-user until it has been fixed somewhat | |
433 | # we skip cris-linux-user as it doesn't use the common run loop | |
434 | build-user-plugins: | |
435 | <<: *native_build_job_definition | |
764a0747 DB |
436 | needs: |
437 | job: amd64-debian-user-cross-container | |
8cdb2cef AB |
438 | variables: |
439 | IMAGE: debian-all-test-cross | |
440 | CONFIGURE_ARGS: --disable-tools --disable-system --enable-plugins --enable-debug-tcg --target-list-exclude=sparc64-linux-user,cris-linux-user | |
441 | MAKE_CHECK_ARGS: check-tcg | |
442 | timeout: 1h 30m | |
443 | ||
4e41d4a3 PMD |
444 | build-user-centos7: |
445 | <<: *native_build_job_definition | |
4a859abd TH |
446 | needs: |
447 | job: amd64-centos7-container | |
4e41d4a3 PMD |
448 | variables: |
449 | IMAGE: centos7 | |
450 | CONFIGURE_ARGS: --disable-system --disable-tools --disable-docs | |
451 | MAKE_CHECK_ARGS: check-tcg | |
452 | ||
ac74e282 AB |
453 | build-some-softmmu-plugins: |
454 | <<: *native_build_job_definition | |
764a0747 DB |
455 | needs: |
456 | job: amd64-debian-user-cross-container | |
ac74e282 AB |
457 | variables: |
458 | IMAGE: debian-all-test-cross | |
459 | CONFIGURE_ARGS: --disable-tools --disable-user --enable-plugins --enable-debug-tcg | |
460 | TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu | |
461 | MAKE_CHECK_ARGS: check-tcg | |
462 | ||
c2b33c43 | 463 | clang-system: |
c962864f | 464 | <<: *native_build_job_definition |
764a0747 DB |
465 | needs: |
466 | job: amd64-fedora-container | |
c962864f DB |
467 | variables: |
468 | IMAGE: fedora | |
469 | CONFIGURE_ARGS: --cc=clang --cxx=clang++ | |
c2b33c43 | 470 | --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined |
c962864f | 471 | TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu |
c2b33c43 TH |
472 | ppc-softmmu s390x-softmmu |
473 | MAKE_CHECK_ARGS: check-qtest check-tcg | |
474 | ||
475 | clang-user: | |
476 | <<: *native_build_job_definition | |
4a859abd TH |
477 | needs: |
478 | job: amd64-debian-user-cross-container | |
c2b33c43 TH |
479 | variables: |
480 | IMAGE: debian-all-test-cross | |
481 | CONFIGURE_ARGS: --cc=clang --cxx=clang++ --disable-system | |
482 | --target-list-exclude=microblazeel-linux-user,aarch64_be-linux-user,i386-linux-user,m68k-linux-user,mipsn32el-linux-user,xtensaeb-linux-user | |
483 | --extra-cflags=-fsanitize=undefined --extra-cflags=-fno-sanitize-recover=undefined | |
484 | MAKE_CHECK_ARGS: check-unit check-tcg | |
5f55d64b | 485 | |
1bb12e17 DB |
486 | # Set LD_JOBS=1 because this requires LTO and ld consumes a large amount of memory. |
487 | # On gitlab runners, default value sometimes end up calling 2 lds concurrently and | |
488 | # triggers an Out-Of-Memory error | |
489 | # | |
490 | # Since slirp callbacks are used in QEMU Timers, slirp needs to be compiled together | |
491 | # with QEMU and linked as a static library to avoid false positives in CFI checks. | |
492 | # This can be accomplished by using -enable-slirp=git, which avoids the use of | |
493 | # a system-wide version of the library | |
494 | # | |
495 | # Split in three sets of build/check/acceptance to limit the execution time of each | |
496 | # job | |
497 | build-cfi-aarch64: | |
498 | <<: *native_build_job_definition | |
499 | needs: | |
500 | - job: amd64-fedora-container | |
501 | variables: | |
502 | LD_JOBS: 1 | |
503 | AR: llvm-ar | |
504 | IMAGE: fedora | |
505 | CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug | |
506 | --enable-safe-stack --enable-slirp=git | |
507 | TARGETS: aarch64-softmmu | |
508 | MAKE_CHECK_ARGS: check-build | |
9737c8bc | 509 | timeout: 70m |
1bb12e17 DB |
510 | artifacts: |
511 | expire_in: 2 days | |
512 | paths: | |
513 | - build | |
514 | ||
515 | check-cfi-aarch64: | |
516 | <<: *native_test_job_definition | |
517 | needs: | |
518 | - job: build-cfi-aarch64 | |
519 | artifacts: true | |
520 | variables: | |
521 | IMAGE: fedora | |
522 | MAKE_CHECK_ARGS: check | |
523 | ||
524 | acceptance-cfi-aarch64: | |
525 | <<: *native_test_job_definition | |
526 | needs: | |
527 | - job: build-cfi-aarch64 | |
528 | artifacts: true | |
529 | variables: | |
530 | IMAGE: fedora | |
531 | MAKE_CHECK_ARGS: check-acceptance | |
532 | <<: *acceptance_definition | |
533 | ||
534 | build-cfi-ppc64-s390x: | |
535 | <<: *native_build_job_definition | |
536 | needs: | |
537 | - job: amd64-fedora-container | |
538 | variables: | |
539 | LD_JOBS: 1 | |
540 | AR: llvm-ar | |
541 | IMAGE: fedora | |
542 | CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug | |
543 | --enable-safe-stack --enable-slirp=git | |
544 | TARGETS: ppc64-softmmu s390x-softmmu | |
545 | MAKE_CHECK_ARGS: check-build | |
9737c8bc | 546 | timeout: 70m |
1bb12e17 DB |
547 | artifacts: |
548 | expire_in: 2 days | |
549 | paths: | |
550 | - build | |
551 | ||
552 | check-cfi-ppc64-s390x: | |
553 | <<: *native_test_job_definition | |
554 | needs: | |
555 | - job: build-cfi-ppc64-s390x | |
556 | artifacts: true | |
557 | variables: | |
558 | IMAGE: fedora | |
559 | MAKE_CHECK_ARGS: check | |
560 | ||
561 | acceptance-cfi-ppc64-s390x: | |
562 | <<: *native_test_job_definition | |
563 | needs: | |
564 | - job: build-cfi-ppc64-s390x | |
565 | artifacts: true | |
566 | variables: | |
567 | IMAGE: fedora | |
568 | MAKE_CHECK_ARGS: check-acceptance | |
569 | <<: *acceptance_definition | |
570 | ||
571 | build-cfi-x86_64: | |
572 | <<: *native_build_job_definition | |
573 | needs: | |
574 | - job: amd64-fedora-container | |
575 | variables: | |
576 | LD_JOBS: 1 | |
577 | AR: llvm-ar | |
578 | IMAGE: fedora | |
579 | CONFIGURE_ARGS: --cc=clang --cxx=clang++ --enable-cfi --enable-cfi-debug | |
580 | --enable-safe-stack --enable-slirp=git | |
581 | TARGETS: x86_64-softmmu | |
582 | MAKE_CHECK_ARGS: check-build | |
9737c8bc | 583 | timeout: 70m |
1bb12e17 DB |
584 | artifacts: |
585 | expire_in: 2 days | |
586 | paths: | |
587 | - build | |
588 | ||
589 | check-cfi-x86_64: | |
590 | <<: *native_test_job_definition | |
591 | needs: | |
592 | - job: build-cfi-x86_64 | |
593 | artifacts: true | |
594 | variables: | |
595 | IMAGE: fedora | |
596 | MAKE_CHECK_ARGS: check | |
597 | ||
598 | acceptance-cfi-x86_64: | |
599 | <<: *native_test_job_definition | |
600 | needs: | |
601 | - job: build-cfi-x86_64 | |
602 | artifacts: true | |
603 | variables: | |
604 | IMAGE: fedora | |
605 | MAKE_CHECK_ARGS: check-acceptance | |
606 | <<: *acceptance_definition | |
607 | ||
0c99f50c TH |
608 | tsan-build: |
609 | <<: *native_build_job_definition | |
4a859abd TH |
610 | needs: |
611 | job: amd64-ubuntu2004-container | |
0c99f50c TH |
612 | variables: |
613 | IMAGE: ubuntu2004 | |
a9eb2df2 | 614 | CONFIGURE_ARGS: --enable-tsan --cc=clang-10 --cxx=clang++-10 |
65aff820 | 615 | --enable-trace-backends=ust --enable-fdt=system --enable-slirp=system |
0c99f50c TH |
616 | TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user |
617 | MAKE_CHECK_ARGS: bench V=1 | |
618 | ||
1c0c06b1 AB |
619 | # These targets are on the way out |
620 | build-deprecated: | |
621 | <<: *native_build_job_definition | |
764a0747 DB |
622 | needs: |
623 | job: amd64-debian-user-cross-container | |
1c0c06b1 AB |
624 | variables: |
625 | IMAGE: debian-all-test-cross | |
a9eb2df2 | 626 | CONFIGURE_ARGS: --disable-tools |
2614670b | 627 | MAKE_CHECK_ARGS: build-tcg |
2cc1a901 | 628 | TARGETS: ppc64abi32-linux-user lm32-softmmu unicore32-softmmu |
2614670b AB |
629 | artifacts: |
630 | expire_in: 2 days | |
631 | paths: | |
632 | - build | |
633 | ||
634 | # We split the check-tcg step as test failures are expected but we still | |
635 | # want to catch the build breaking. | |
636 | check-deprecated: | |
637 | <<: *native_test_job_definition | |
638 | needs: | |
639 | - job: build-deprecated | |
640 | artifacts: true | |
641 | variables: | |
642 | IMAGE: debian-all-test-cross | |
643 | MAKE_CHECK_ARGS: check-tcg | |
1c0c06b1 AB |
644 | allow_failure: true |
645 | ||
04250c69 PMD |
646 | # gprof/gcov are GCC features |
647 | gprof-gcov: | |
648 | <<: *native_build_job_definition | |
4a859abd TH |
649 | needs: |
650 | job: amd64-ubuntu2004-container | |
04250c69 PMD |
651 | variables: |
652 | IMAGE: ubuntu2004 | |
653 | CONFIGURE_ARGS: --enable-gprof --enable-gcov | |
654 | MAKE_CHECK_ARGS: check | |
655 | TARGETS: aarch64-softmmu ppc64-softmmu s390x-softmmu x86_64-softmmu | |
656 | timeout: 70m | |
657 | after_script: | |
658 | - ${CI_PROJECT_DIR}/scripts/ci/coverage-summary.sh | |
659 | ||
48eac101 | 660 | build-oss-fuzz: |
b610eba3 | 661 | <<: *native_build_job_definition |
764a0747 DB |
662 | needs: |
663 | job: amd64-fedora-container | |
b610eba3 TH |
664 | variables: |
665 | IMAGE: fedora | |
666 | script: | |
48eac101 AB |
667 | - mkdir build-oss-fuzz |
668 | - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address" | |
669 | ./scripts/oss-fuzz/build.sh | |
5ab04d5e | 670 | - export ASAN_OPTIONS="fast_unwind_on_malloc=0" |
48eac101 AB |
671 | - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f |
672 | | grep -v slirp); do | |
673 | grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ; | |
674 | echo Testing ${fuzzer} ... ; | |
320c6e78 | 675 | "${fuzzer}" -runs=1 -seed=1 || exit 1 ; |
b610eba3 | 676 | done |
5ab04d5e TH |
677 | # Unrelated to fuzzer: run some tests with -fsanitize=address |
678 | - cd build-oss-fuzz && make check-qtest-i386 check-unit | |
b610eba3 | 679 | |
5f55d64b | 680 | build-tci: |
c962864f | 681 | <<: *native_build_job_definition |
764a0747 | 682 | needs: |
53c915c6 | 683 | job: amd64-debian-user-cross-container |
c962864f | 684 | variables: |
53c915c6 | 685 | IMAGE: debian-all-test-cross |
c962864f DB |
686 | script: |
687 | - TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64" | |
688 | - mkdir build | |
689 | - cd build | |
690 | - ../configure --enable-tcg-interpreter | |
c47110d9 | 691 | --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" || { cat config.log meson-logs/meson-log.txt && exit 1; } |
c962864f | 692 | - make -j"$JOBS" |
c962864f DB |
693 | - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test |
694 | - for tg in $TARGETS ; do | |
64ed6f92 | 695 | export QTEST_QEMU_BINARY="./qemu-system-${tg}" ; |
c962864f DB |
696 | ./tests/qtest/boot-serial-test || exit 1 ; |
697 | ./tests/qtest/cdrom-test || exit 1 ; | |
698 | done | |
64ed6f92 PB |
699 | - QTEST_QEMU_BINARY="./qemu-system-x86_64" ./tests/qtest/pxe-test |
700 | - QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow | |
53c915c6 | 701 | - make check-tcg |
affcc09c | 702 | |
d1a8b308 PMD |
703 | # Alternate coroutines implementations are only really of interest to KVM users |
704 | # However we can't test against KVM on Gitlab-CI so we can only run unit tests | |
d1a8b308 PMD |
705 | build-coroutine-sigaltstack: |
706 | <<: *native_build_job_definition | |
764a0747 DB |
707 | needs: |
708 | job: amd64-ubuntu2004-container | |
d1a8b308 PMD |
709 | variables: |
710 | IMAGE: ubuntu2004 | |
711 | CONFIGURE_ARGS: --with-coroutine=sigaltstack --disable-tcg | |
65aff820 | 712 | --enable-trace-backends=ftrace |
d1a8b308 PMD |
713 | MAKE_CHECK_ARGS: check-unit |
714 | ||
affcc09c DB |
715 | # Most jobs test latest gcrypt or nettle builds |
716 | # | |
717 | # These jobs test old gcrypt and nettle from RHEL7 | |
718 | # which had some API differences. | |
34240956 | 719 | crypto-old-nettle: |
affcc09c | 720 | <<: *native_build_job_definition |
764a0747 DB |
721 | needs: |
722 | job: amd64-centos7-container | |
affcc09c DB |
723 | variables: |
724 | IMAGE: centos7 | |
725 | TARGETS: x86_64-softmmu x86_64-linux-user | |
726 | CONFIGURE_ARGS: --disable-gcrypt --enable-nettle | |
affcc09c DB |
727 | MAKE_CHECK_ARGS: check |
728 | ||
34240956 | 729 | crypto-old-gcrypt: |
affcc09c | 730 | <<: *native_build_job_definition |
764a0747 DB |
731 | needs: |
732 | job: amd64-centos7-container | |
affcc09c DB |
733 | variables: |
734 | IMAGE: centos7 | |
735 | TARGETS: x86_64-softmmu x86_64-linux-user | |
736 | CONFIGURE_ARGS: --disable-nettle --enable-gcrypt | |
affcc09c DB |
737 | MAKE_CHECK_ARGS: check |
738 | ||
34240956 | 739 | crypto-only-gnutls: |
affcc09c | 740 | <<: *native_build_job_definition |
764a0747 DB |
741 | needs: |
742 | job: amd64-centos7-container | |
affcc09c DB |
743 | variables: |
744 | IMAGE: centos7 | |
745 | TARGETS: x86_64-softmmu x86_64-linux-user | |
746 | CONFIGURE_ARGS: --disable-nettle --disable-gcrypt --enable-gnutls | |
affcc09c | 747 | MAKE_CHECK_ARGS: check |
1f475472 | 748 | |
34240956 | 749 | |
3fed93f3 AB |
750 | # Check our reduced build configurations |
751 | build-without-default-devices: | |
752 | <<: *native_build_job_definition | |
764a0747 DB |
753 | needs: |
754 | job: amd64-centos8-container | |
3fed93f3 AB |
755 | variables: |
756 | IMAGE: centos8 | |
757 | CONFIGURE_ARGS: --without-default-devices --disable-user | |
758 | ||
53f41245 AB |
759 | build-without-default-features: |
760 | <<: *native_build_job_definition | |
764a0747 DB |
761 | needs: |
762 | job: amd64-debian-container | |
53f41245 AB |
763 | variables: |
764 | IMAGE: debian-amd64 | |
765 | CONFIGURE_ARGS: --without-default-features --disable-user | |
8cd95aec | 766 | --target-list-exclude=arm-softmmu,i386-softmmu,mipsel-softmmu,mips64-softmmu,ppc-softmmu |
53f41245 AB |
767 | MAKE_CHECK_ARGS: check-unit |
768 | ||
1f475472 DB |
769 | check-patch: |
770 | stage: build | |
771 | image: $CI_REGISTRY_IMAGE/qemu/centos8:latest | |
764a0747 DB |
772 | needs: |
773 | job: amd64-centos8-container | |
1f475472 DB |
774 | script: .gitlab-ci.d/check-patch.py |
775 | except: | |
776 | variables: | |
777 | - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master' | |
778 | variables: | |
779 | GIT_DEPTH: 1000 | |
780 | allow_failure: true | |
34ed46a2 DB |
781 | |
782 | check-dco: | |
783 | stage: build | |
784 | image: $CI_REGISTRY_IMAGE/qemu/centos8:latest | |
764a0747 DB |
785 | needs: |
786 | job: amd64-centos8-container | |
34ed46a2 DB |
787 | script: .gitlab-ci.d/check-dco.py |
788 | except: | |
789 | variables: | |
790 | - $CI_PROJECT_NAMESPACE == 'qemu-project' && $CI_COMMIT_BRANCH == 'master' | |
791 | variables: | |
792 | GIT_DEPTH: 1000 | |
4daa9055 | 793 | |
c4698e36 MAL |
794 | build-libvhost-user: |
795 | stage: build | |
796 | image: $CI_REGISTRY_IMAGE/qemu/fedora:latest | |
764a0747 DB |
797 | needs: |
798 | job: amd64-fedora-container | |
c4698e36 MAL |
799 | before_script: |
800 | - dnf install -y meson ninja-build | |
801 | script: | |
802 | - mkdir subprojects/libvhost-user/build | |
803 | - cd subprojects/libvhost-user/build | |
804 | - meson | |
805 | - ninja | |
806 | ||
dd188e41 TH |
807 | # No targets are built here, just tools, docs, and unit tests. This |
808 | # also feeds into the eventual documentation deployment steps later | |
809 | build-tools-and-docs-debian: | |
810 | <<: *native_build_job_definition | |
811 | needs: | |
812 | job: amd64-debian-container | |
813 | variables: | |
814 | IMAGE: debian-amd64 | |
815 | MAKE_CHECK_ARGS: check-unit check-softfloat ctags TAGS cscope | |
816 | CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools | |
817 | artifacts: | |
818 | expire_in: 2 days | |
819 | paths: | |
820 | - build | |
821 | ||
a8a3abe0 AB |
822 | # Prepare for GitLab pages deployment. Anything copied into the |
823 | # "public" directory will be deployed to $USER.gitlab.io/$PROJECT | |
4daa9055 | 824 | pages: |
a8a3abe0 | 825 | image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:latest |
4daa9055 DB |
826 | stage: test |
827 | needs: | |
a8a3abe0 | 828 | - job: build-tools-and-docs-debian |
4daa9055 | 829 | script: |
a8a3abe0 AB |
830 | - mkdir -p public |
831 | # HTML-ised source tree | |
832 | - make gtags | |
833 | - htags -anT --tree-view=filetree -m qemu_init | |
834 | -t "Welcome to the QEMU sourcecode" | |
835 | - mv HTML public/src | |
836 | # Project documentation | |
b93f4fbd PM |
837 | - make -C build install DESTDIR=$(pwd)/temp-install |
838 | - mv temp-install/usr/local/share/doc/qemu/* public/ | |
4daa9055 DB |
839 | artifacts: |
840 | paths: | |
841 | - public |