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