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