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