blob: e0eb85a949107b124f93a272bbf7d7f2824998d4 [file] [log] [blame]
Thomas Huth66fdb032024-06-07 08:51:47 +02001image: fedora:40
Thomas Huthd81f73b2019-05-27 13:28:53 +02002
Thomas Huthdd095732019-02-28 18:11:03 +01003before_script:
Thomas Huthd81f73b2019-05-27 13:28:53 +02004 - dnf update -y
5 - dnf install -y make python
Thomas Huthdd095732019-02-28 18:11:03 +01006
Nicholas Piggina68956b2024-06-05 18:09:41 +10007# By default artifacts are only saved on success. This uses when:always
8# because the test logs are important to help diagnose failures.
Thomas Huthbd2daad2023-04-03 11:32:55 +02009.intree_template:
10 artifacts:
Nicholas Piggina68956b2024-06-05 18:09:41 +100011 when: always
Thomas Huthbd2daad2023-04-03 11:32:55 +020012 expire_in: 2 days
Paolo Bonzini963a2712024-06-03 11:26:06 +020013 when: always
Thomas Huthbd2daad2023-04-03 11:32:55 +020014 paths:
15 - logs
16
17.outoftree_template:
18 artifacts:
Nicholas Piggina68956b2024-06-05 18:09:41 +100019 when: always
Thomas Huthbd2daad2023-04-03 11:32:55 +020020 expire_in: 2 days
Paolo Bonzini963a2712024-06-03 11:26:06 +020021 when: always
Thomas Huthbd2daad2023-04-03 11:32:55 +020022 paths:
23 - build/logs
24
Thomas Huthdd095732019-02-28 18:11:03 +010025build-aarch64:
Thomas Huthbd2daad2023-04-03 11:32:55 +020026 extends: .intree_template
Thomas Huthdd095732019-02-28 18:11:03 +010027 script:
Thomas Huthd81f73b2019-05-27 13:28:53 +020028 - dnf install -y qemu-system-aarch64 gcc-aarch64-linux-gnu
Thomas Huthdd095732019-02-28 18:11:03 +010029 - ./configure --arch=aarch64 --cross-prefix=aarch64-linux-gnu-
30 - make -j2
Thomas Huthc3df00e2020-07-01 12:06:15 +020031 - ACCEL=tcg MAX_SMP=8 ./run_tests.sh
Thomas Huth14eb0482022-12-06 11:40:03 +010032 cache
33 debug-bp
34 debug-sstep
35 debug-wp
36 gicv2-active
37 gicv2-ipi
38 gicv2-mmio
39 gicv3-active
40 gicv3-ipi
41 its-introspection
42 its-trigger
43 pci-test
44 pmu-cycle-counter
45 pmu-event-counter-config
46 pmu-sw-incr
Thomas Huth14eb0482022-12-06 11:40:03 +010047 selftest-setup
48 selftest-smp
49 selftest-vectors-kernel
50 selftest-vectors-user
51 timer
52 | tee results.txt
Andrew Jonesdd797282024-03-05 17:46:42 +010053 - grep -q PASS results.txt && ! grep -q FAIL results.txt
54
55build-aarch64-efi:
56 extends: .intree_template
57 script:
58 - dnf install -y qemu-system-aarch64 gcc-aarch64-linux-gnu edk2-aarch64
59 - ./configure --arch=aarch64 --cross-prefix=aarch64-linux-gnu- --enable-efi --enable-efi-direct
60 - make -j2
61 - ACCEL=tcg MAX_SMP=8 ./run_tests.sh
62 selftest-setup
63 selftest-smp
64 selftest-vectors-kernel
65 selftest-vectors-user
66 | tee results.txt
67 - grep -q PASS results.txt && ! grep -q FAIL results.txt
68
69build-aarch64-efi-acpi:
70 extends: .intree_template
71 script:
72 - dnf install -y qemu-system-aarch64 gcc-aarch64-linux-gnu edk2-aarch64
73 - ./configure --arch=aarch64 --cross-prefix=aarch64-linux-gnu- --enable-efi --enable-efi-direct
74 - make -j2
75 - EFI_USE_ACPI=y ACCEL=tcg MAX_SMP=8 ./run_tests.sh
76 selftest-setup
77 selftest-smp
78 selftest-vectors-kernel
79 selftest-vectors-user
80 | tee results.txt
81 - grep -q PASS results.txt && ! grep -q FAIL results.txt
Thomas Huthdd095732019-02-28 18:11:03 +010082
83build-arm:
Thomas Huthbd2daad2023-04-03 11:32:55 +020084 extends: .outoftree_template
Thomas Huthdd095732019-02-28 18:11:03 +010085 script:
Andrew Jonesefd13c32019-11-28 15:24:10 +010086 - dnf install -y qemu-system-arm gcc-arm-linux-gnu
Thomas Huth13fc88a2020-07-31 11:41:39 +020087 - mkdir build
88 - cd build
89 - ../configure --arch=arm --cross-prefix=arm-linux-gnu-
Thomas Huthdd095732019-02-28 18:11:03 +010090 - make -j2
Thomas Huthc3df00e2020-07-01 12:06:15 +020091 - ACCEL=tcg MAX_SMP=8 ./run_tests.sh
Thomas Huthdd095732019-02-28 18:11:03 +010092 selftest-setup selftest-vectors-kernel selftest-vectors-user selftest-smp
Thomas Huthc3df00e2020-07-01 12:06:15 +020093 pci-test pmu-cycle-counter gicv2-ipi gicv2-mmio gicv3-ipi gicv2-active
Andrew Jones892e40f2023-06-23 17:32:26 +020094 gicv3-active
Thomas Huthdd095732019-02-28 18:11:03 +010095 | tee results.txt
Andrew Jonesdd797282024-03-05 17:46:42 +010096 - grep -q PASS results.txt && ! grep -q FAIL results.txt
Thomas Huthdd095732019-02-28 18:11:03 +010097
98build-ppc64be:
Thomas Huthbd2daad2023-04-03 11:32:55 +020099 extends: .outoftree_template
Thomas Huthdd095732019-02-28 18:11:03 +0100100 script:
Nicholas Piggin3ccb19a2024-04-05 18:35:07 +1000101 - dnf install -y qemu-system-ppc gcc-powerpc64-linux-gnu nmap-ncat
Thomas Huth13fc88a2020-07-31 11:41:39 +0200102 - mkdir build
103 - cd build
104 - ../configure --arch=ppc64 --endian=big --cross-prefix=powerpc64-linux-gnu-
Thomas Huthdd095732019-02-28 18:11:03 +0100105 - make -j2
106 - ACCEL=tcg ./run_tests.sh
Nicholas Piggin3ccb19a2024-04-05 18:35:07 +1000107 selftest-setup
108 selftest-migration
109 selftest-migration-skip
110 spapr_hcall
111 rtas-get-time-of-day
112 rtas-get-time-of-day-base
113 rtas-set-time-of-day
114 emulator
115 | tee results.txt
Thomas Huthdd095732019-02-28 18:11:03 +0100116 - if grep -q FAIL results.txt ; then exit 1 ; fi
117
118build-ppc64le:
Thomas Huthbd2daad2023-04-03 11:32:55 +0200119 extends: .intree_template
Thomas Huthdd095732019-02-28 18:11:03 +0100120 script:
Nicholas Piggin3ccb19a2024-04-05 18:35:07 +1000121 - dnf install -y qemu-system-ppc gcc-powerpc64-linux-gnu nmap-ncat
Thomas Huthdd095732019-02-28 18:11:03 +0100122 - ./configure --arch=ppc64 --endian=little --cross-prefix=powerpc64-linux-gnu-
123 - make -j2
124 - ACCEL=tcg ./run_tests.sh
Nicholas Piggin3ccb19a2024-04-05 18:35:07 +1000125 selftest-setup
126 selftest-migration
127 selftest-migration-skip
128 spapr_hcall
129 rtas-get-time-of-day
130 rtas-get-time-of-day-base
131 rtas-set-time-of-day
132 emulator
133 | tee results.txt
Thomas Huthdd095732019-02-28 18:11:03 +0100134 - if grep -q FAIL results.txt ; then exit 1 ; fi
135
Andrew Jonesbf9496e2023-10-08 10:53:52 +0200136# build-riscv32:
137# Fedora doesn't package a riscv32 compiler for QEMU. Oh, well.
138
139# Select 'rv64' with PROCESSOR_OVERRIDE in case QEMU is too old to have 'max'
140build-riscv64:
141 extends: .intree_template
142 script:
143 - dnf install -y qemu-system-riscv gcc-riscv64-linux-gnu
144 - ./configure --arch=riscv64 --cross-prefix=riscv64-linux-gnu-
145 - make -j2
146 - printf "FOO=foo\nBAR=bar\nBAZ=baz\nMVENDORID=0\n" >test-env
147 - PROCESSOR_OVERRIDE=rv64 ACCEL=tcg KVM_UNIT_TESTS_ENV=test-env ./run_tests.sh
148 selftest
149 sbi
150 | tee results.txt
151 - grep -q PASS results.txt && ! grep -q FAIL results.txt
152
Thomas Huthdd095732019-02-28 18:11:03 +0100153build-s390x:
Thomas Huthbd2daad2023-04-03 11:32:55 +0200154 extends: .outoftree_template
Thomas Huthdd095732019-02-28 18:11:03 +0100155 script:
Thomas Huthd81f73b2019-05-27 13:28:53 +0200156 - dnf install -y qemu-system-s390x gcc-s390x-linux-gnu
Thomas Huth1a842322021-07-16 12:52:19 +0200157 - mkdir build
158 - cd build
159 - ../configure --arch=s390x --cross-prefix=s390x-linux-gnu-
Thomas Huthdd095732019-02-28 18:11:03 +0100160 - make -j2
Thomas Huthd81f73b2019-05-27 13:28:53 +0200161 - ACCEL=tcg ./run_tests.sh
Thomas Huth14eb0482022-12-06 11:40:03 +0100162 adtl-status-no-vec-no-gs-tcg
163 adtl-status-tcg
164 cpumodel
165 css
166 diag10
167 diag288
168 diag308
169 edat
170 emulator
171 epsw
172 exittime
173 firq-linear-cpu-ids-tcg
174 firq-nonlinear-cpu-ids-tcg
175 iep
176 intercept
177 mvpg
178 sck
179 sclp-1g
180 sclp-3g
181 selftest-setup
182 sieve
183 smp
184 stsi
185 tprot
186 vector
187 | tee results.txt
Thomas Huthd81f73b2019-05-27 13:28:53 +0200188 - if grep -q FAIL results.txt ; then exit 1 ; fi
Thomas Huthdd095732019-02-28 18:11:03 +0100189
190build-x86_64:
Thomas Huthbd2daad2023-04-03 11:32:55 +0200191 extends: .intree_template
Thomas Huthdd095732019-02-28 18:11:03 +0100192 script:
Thomas Huthd81f73b2019-05-27 13:28:53 +0200193 - dnf install -y qemu-system-x86 gcc
Thomas Huthdd095732019-02-28 18:11:03 +0100194 - ./configure --arch=x86_64
195 - make -j2
196 - ACCEL=tcg ./run_tests.sh
Thomas Huth14eb0482022-12-06 11:40:03 +0100197 eventinj
198 intel_iommu
199 ioapic-split
200 memory
201 pks
202 pku
203 rdpru
204 realmode
205 rmap_chain
206 setjmp
207 sieve
208 smap
209 smptest
210 smptest3
211 syscall
212 tsc
213 umip
214 vmexit_cpuid
215 vmexit_cr0_wp
216 vmexit_cr4_pge
217 vmexit_inl_pmtimer
218 vmexit_ipi
219 vmexit_ipi_halt
220 vmexit_mov_from_cr8
221 vmexit_mov_to_cr8
222 vmexit_ple_round_robin
223 vmexit_tscdeadline
224 vmexit_tscdeadline_immed
Thomas Huth14eb0482022-12-06 11:40:03 +0100225 | tee results.txt
Thomas Huthdd095732019-02-28 18:11:03 +0100226 - if grep -q FAIL results.txt ; then exit 1 ; fi
227
228build-i386:
Thomas Huthbd2daad2023-04-03 11:32:55 +0200229 extends: .outoftree_template
Thomas Huthdd095732019-02-28 18:11:03 +0100230 script:
Thomas Huthd81f73b2019-05-27 13:28:53 +0200231 - dnf install -y qemu-system-x86 gcc
Thomas Huth13fc88a2020-07-31 11:41:39 +0200232 - mkdir build
233 - cd build
234 - ../configure --arch=i386
Thomas Huthdd095732019-02-28 18:11:03 +0100235 - make -j2
236 - ACCEL=tcg ./run_tests.sh
Thomas Huth14eb0482022-12-06 11:40:03 +0100237 cmpxchg8b
238 eventinj
239 realmode
240 setjmp
241 sieve
242 smap
243 smptest
244 smptest3
245 taskswitch
246 tsc
247 umip
248 vmexit_cpuid
249 vmexit_cr0_wp
250 vmexit_cr4_pge
251 vmexit_inl_pmtimer
252 vmexit_ipi
253 vmexit_ipi_halt
254 vmexit_mov_from_cr8
255 vmexit_mov_to_cr8
256 vmexit_ple_round_robin
257 vmexit_tscdeadline
258 vmexit_tscdeadline_immed
259 | tee results.txt
Thomas Huthdd095732019-02-28 18:11:03 +0100260 - if grep -q FAIL results.txt ; then exit 1 ; fi
Thomas Huth417ecf42020-05-13 11:54:46 +0200261
262build-clang:
Thomas Huthbd2daad2023-04-03 11:32:55 +0200263 extends: .intree_template
Thomas Huth417ecf42020-05-13 11:54:46 +0200264 script:
265 - dnf install -y qemu-system-x86 clang
266 - ./configure --arch=x86_64 --cc=clang
267 - make -j2
268 - ACCEL=tcg ./run_tests.sh
Thomas Huth14eb0482022-12-06 11:40:03 +0100269 eventinj
270 intel_iommu
271 ioapic-split
272 memory
273 pks
274 pku
275 rdpru
Thomas Huth14eb0482022-12-06 11:40:03 +0100276 rmap_chain
277 setjmp
278 sieve
279 smap
280 smptest
281 smptest3
282 syscall
283 tsc
284 umip
285 vmexit_cpuid
286 vmexit_cr0_wp
287 vmexit_cr4_pge
288 vmexit_inl_pmtimer
289 vmexit_ipi
290 vmexit_ipi_halt
291 vmexit_mov_from_cr8
292 vmexit_mov_to_cr8
293 vmexit_ple_round_robin
294 vmexit_tscdeadline
295 vmexit_tscdeadline_immed
Thomas Huth14eb0482022-12-06 11:40:03 +0100296 | tee results.txt
Thomas Huth417ecf42020-05-13 11:54:46 +0200297 - grep -q PASS results.txt && ! grep -q FAIL results.txt
Thomas Huth0079fe82020-07-31 11:15:48 +0200298
299build-centos7:
Thomas Huthbd2daad2023-04-03 11:32:55 +0200300 extends: .outoftree_template
Thomas Huth0079fe82020-07-31 11:15:48 +0200301 image: centos:7
302 before_script:
303 - yum update -y
304 - yum install -y make python qemu-kvm gcc
305 script:
306 - mkdir build
307 - cd build
308 - ../configure --arch=x86_64 --disable-pretty-print-stacks
309 - make -j2
310 - ACCEL=tcg ./run_tests.sh
Sean Christopherson88f0bb12021-04-21 20:05:03 -0700311 vmexit_cpuid vmexit_mov_from_cr8 vmexit_mov_to_cr8 vmexit_inl_pmtimer
Thomas Huth0079fe82020-07-31 11:15:48 +0200312 vmexit_ple_round_robin vmexit_tscdeadline vmexit_tscdeadline_immed port80
313 setjmp sieve tsc rmap_chain umip
314 | tee results.txt
315 - grep -q PASS results.txt && ! grep -q FAIL results.txt
Thomas Huth1b849d72024-06-07 08:36:16 +0200316 - make -s check-kerneldoc 2>&1 | tee docwarnings.txt
317 - test -z `cat docwarnings.txt`
Thomas Huth990955e2021-01-15 23:30:17 +0100318
319# Cirrus-CI provides containers with macOS and Linux with KVM enabled,
320# so we can test some scenarios there that are not possible with the
321# gitlab-CI shared runners. We use the "cirrus-run" container from the
322# libvirt project to start the jobs. See the following URL for more
323# information how to set up your environment to use these containers:
324#
325# https://gitlab.com/libvirt/libvirt/-/blob/v7.0.0/ci/README.rst
326#
327.cirrus_build_job_template: &cirrus_build_job_definition
Thomas Huth66307922024-04-15 15:03:21 +0200328 image: registry.gitlab.com/libvirt/libvirt-ci/cirrus-run:latest
Thomas Huth990955e2021-01-15 23:30:17 +0100329 before_script:
330 - sed -e "s|[@]CI_REPOSITORY_URL@|$CI_REPOSITORY_URL|g"
331 -e "s|[@]CI_COMMIT_REF_NAME@|$CI_COMMIT_REF_NAME|g"
332 -e "s|[@]CI_COMMIT_SHA@|$CI_COMMIT_SHA|g"
333 < ci/$CI_JOB_NAME.yml > ci/_$CI_JOB_NAME.yml
334 script:
335 - cirrus-run -v --show-build-log always ci/_$CI_JOB_NAME.yml
336 only:
337 variables:
338 - $CIRRUS_GITHUB_REPO
339 - $CIRRUS_API_TOKEN
340
341cirrus-ci-fedora:
342 <<: *cirrus_build_job_definition
343
344cirrus-ci-macos-i386:
345 <<: *cirrus_build_job_definition
346
347cirrus-ci-macos-x86-64:
348 <<: *cirrus_build_job_definition
Marcelo Bandeira Condotta21eb9662021-02-08 12:02:27 -0300349
350s390x-kvm:
Thomas Huthbd2daad2023-04-03 11:32:55 +0200351 extends: .intree_template
Marcelo Bandeira Condotta21eb9662021-02-08 12:02:27 -0300352 before_script: []
353 tags:
354 - s390x-z15-vm
355 script:
356 - ./configure --arch=s390x
357 - make -j$(nproc)
Thomas Huth64a9b492021-02-09 09:18:30 +0100358 - ACCEL=kvm ./run_tests.sh
Nicholas Piggin3ccb19a2024-04-05 18:35:07 +1000359 selftest-setup
Nicholas Piggin3ccb19a2024-04-05 18:35:07 +1000360 selftest-migration-skip
361 cmm
362 cpumodel
363 css
364 diag10
365 diag288
366 diag308
367 emulator
Nina Schoetterl-Glausch9a5a73a2023-03-17 12:23:39 +0100368 execute
Nicholas Piggin3ccb19a2024-04-05 18:35:07 +1000369 gs
370 iep
371 intercept
372 migration
373 migration-memory
374 migration-sck
375 migration-skey-parallel
376 migration-skey-sequential
377 pfmf
378 sclp-1g
379 sclp-3g
380 sie
381 sieve
382 skrf
383 sthyi
384 stsi
385 vector
Thomas Huth64a9b492021-02-09 09:18:30 +0100386 | tee results.txt
Marcelo Bandeira Condotta21eb9662021-02-08 12:02:27 -0300387 - grep -q PASS results.txt && ! grep -q FAIL results.txt
388 only:
389 variables:
390 - $S390X_Z15_RUNNER_AVAILABLE