xref: /kvm-unit-tests/.gitlab-ci.yml (revision 03dca0b5151b24cb7eea20ff63df1b8d3fd3b0c9)
1image: fedora:37
2
3before_script:
4 - dnf update -y
5 - dnf install -y make python
6
7build-aarch64:
8 script:
9 - dnf install -y qemu-system-aarch64 gcc-aarch64-linux-gnu
10 - ./configure --arch=aarch64 --cross-prefix=aarch64-linux-gnu-
11 - make -j2
12 - ACCEL=tcg MAX_SMP=8 ./run_tests.sh
13      cache
14      debug-bp
15      debug-sstep
16      debug-wp
17      gicv2-active
18      gicv2-ipi
19      gicv2-mmio
20      gicv3-active
21      gicv3-ipi
22      its-introspection
23      its-trigger
24      pci-test
25      pmu-cycle-counter
26      pmu-event-counter-config
27      pmu-sw-incr
28      psci
29      selftest-setup
30      selftest-smp
31      selftest-vectors-kernel
32      selftest-vectors-user
33      timer
34      | tee results.txt
35 - if grep -q FAIL results.txt ; then exit 1 ; fi
36
37build-arm:
38 script:
39 - dnf install -y qemu-system-arm gcc-arm-linux-gnu
40 - mkdir build
41 - cd build
42 - ../configure --arch=arm --cross-prefix=arm-linux-gnu-
43 - make -j2
44 - ACCEL=tcg MAX_SMP=8 ./run_tests.sh
45     selftest-setup selftest-vectors-kernel selftest-vectors-user selftest-smp
46     pci-test pmu-cycle-counter gicv2-ipi gicv2-mmio gicv3-ipi gicv2-active
47     gicv3-active psci
48     | tee results.txt
49 - if grep -q FAIL results.txt ; then exit 1 ; fi
50
51build-ppc64be:
52 script:
53 - dnf install -y qemu-system-ppc gcc-powerpc64-linux-gnu
54 - mkdir build
55 - cd build
56 - ../configure --arch=ppc64 --endian=big --cross-prefix=powerpc64-linux-gnu-
57 - make -j2
58 - ACCEL=tcg ./run_tests.sh
59     selftest-setup spapr_hcall rtas-get-time-of-day rtas-get-time-of-day-base
60     rtas-set-time-of-day emulator
61     | tee results.txt
62 - if grep -q FAIL results.txt ; then exit 1 ; fi
63
64build-ppc64le:
65 script:
66 - dnf install -y qemu-system-ppc gcc-powerpc64-linux-gnu
67 - ./configure --arch=ppc64 --endian=little --cross-prefix=powerpc64-linux-gnu-
68 - make -j2
69 - ACCEL=tcg ./run_tests.sh
70     selftest-setup spapr_hcall rtas-get-time-of-day rtas-get-time-of-day-base
71     rtas-set-time-of-day emulator
72     | tee results.txt
73 - if grep -q FAIL results.txt ; then exit 1 ; fi
74
75build-s390x:
76 script:
77 - dnf install -y qemu-system-s390x gcc-s390x-linux-gnu
78 - mkdir build
79 - cd build
80 - ../configure --arch=s390x --cross-prefix=s390x-linux-gnu-
81 - make -j2
82 - ACCEL=tcg ./run_tests.sh
83      adtl-status-no-vec-no-gs-tcg
84      adtl-status-tcg
85      cpumodel
86      css
87      diag10
88      diag288
89      diag308
90      edat
91      emulator
92      epsw
93      exittime
94      firq-linear-cpu-ids-tcg
95      firq-nonlinear-cpu-ids-tcg
96      iep
97      intercept
98      mvpg
99      sck
100      sclp-1g
101      sclp-3g
102      selftest-setup
103      sieve
104      smp
105      stsi
106      tprot
107      vector
108      | tee results.txt
109 - if grep -q FAIL results.txt ; then exit 1 ; fi
110
111build-x86_64:
112 script:
113 - dnf install -y qemu-system-x86 gcc
114 - ./configure --arch=x86_64
115 - make -j2
116 - ACCEL=tcg ./run_tests.sh
117      eventinj
118      intel_iommu
119      ioapic-split
120      memory
121      pks
122      pku
123      rdpru
124      realmode
125      rmap_chain
126      setjmp
127      sieve
128      smap
129      smptest
130      smptest3
131      syscall
132      tsc
133      umip
134      vmexit_cpuid
135      vmexit_cr0_wp
136      vmexit_cr4_pge
137      vmexit_inl_pmtimer
138      vmexit_ipi
139      vmexit_ipi_halt
140      vmexit_mov_from_cr8
141      vmexit_mov_to_cr8
142      vmexit_ple_round_robin
143      vmexit_tscdeadline
144      vmexit_tscdeadline_immed
145      xsave
146      | tee results.txt
147 - if grep -q FAIL results.txt ; then exit 1 ; fi
148
149build-i386:
150 script:
151 - dnf install -y qemu-system-x86 gcc
152 - mkdir build
153 - cd build
154 - ../configure --arch=i386
155 - make -j2
156 - ACCEL=tcg ./run_tests.sh
157      cmpxchg8b
158      eventinj
159      realmode
160      setjmp
161      sieve
162      smap
163      smptest
164      smptest3
165      taskswitch
166      tsc
167      umip
168      vmexit_cpuid
169      vmexit_cr0_wp
170      vmexit_cr4_pge
171      vmexit_inl_pmtimer
172      vmexit_ipi
173      vmexit_ipi_halt
174      vmexit_mov_from_cr8
175      vmexit_mov_to_cr8
176      vmexit_ple_round_robin
177      vmexit_tscdeadline
178      vmexit_tscdeadline_immed
179      | tee results.txt
180 - if grep -q FAIL results.txt ; then exit 1 ; fi
181
182build-clang:
183 script:
184 - dnf install -y qemu-system-x86 clang
185 - ./configure --arch=x86_64 --cc=clang
186 - make -j2
187 - ACCEL=tcg ./run_tests.sh
188      eventinj
189      intel_iommu
190      ioapic-split
191      memory
192      pks
193      pku
194      rdpru
195      realmode
196      rmap_chain
197      setjmp
198      sieve
199      smap
200      smptest
201      smptest3
202      syscall
203      tsc
204      umip
205      vmexit_cpuid
206      vmexit_cr0_wp
207      vmexit_cr4_pge
208      vmexit_inl_pmtimer
209      vmexit_ipi
210      vmexit_ipi_halt
211      vmexit_mov_from_cr8
212      vmexit_mov_to_cr8
213      vmexit_ple_round_robin
214      vmexit_tscdeadline
215      vmexit_tscdeadline_immed
216      xsave
217      | tee results.txt
218 - grep -q PASS results.txt && ! grep -q FAIL results.txt
219
220build-centos7:
221 image: centos:7
222 before_script:
223 - yum update -y
224 - yum install -y make python qemu-kvm gcc
225 script:
226 - mkdir build
227 - cd build
228 - ../configure --arch=x86_64 --disable-pretty-print-stacks
229 - make -j2
230 - ACCEL=tcg ./run_tests.sh
231     vmexit_cpuid vmexit_mov_from_cr8 vmexit_mov_to_cr8 vmexit_inl_pmtimer
232     vmexit_ple_round_robin vmexit_tscdeadline vmexit_tscdeadline_immed port80
233     setjmp sieve tsc rmap_chain umip
234     | tee results.txt
235 - grep -q PASS results.txt && ! grep -q FAIL results.txt
236
237# Cirrus-CI provides containers with macOS and Linux with KVM enabled,
238# so we can test some scenarios there that are not possible with the
239# gitlab-CI shared runners. We use the "cirrus-run" container from the
240# libvirt project to start the jobs. See the following URL for more
241# information how to set up your environment to use these containers:
242#
243#   https://gitlab.com/libvirt/libvirt/-/blob/v7.0.0/ci/README.rst
244#
245.cirrus_build_job_template: &cirrus_build_job_definition
246 image: registry.gitlab.com/libvirt/libvirt-ci/cirrus-run:master
247 before_script:
248  - sed -e "s|[@]CI_REPOSITORY_URL@|$CI_REPOSITORY_URL|g"
249        -e "s|[@]CI_COMMIT_REF_NAME@|$CI_COMMIT_REF_NAME|g"
250        -e "s|[@]CI_COMMIT_SHA@|$CI_COMMIT_SHA|g"
251        < ci/$CI_JOB_NAME.yml > ci/_$CI_JOB_NAME.yml
252 script:
253  - cirrus-run -v --show-build-log always ci/_$CI_JOB_NAME.yml
254 only:
255  variables:
256   - $CIRRUS_GITHUB_REPO
257   - $CIRRUS_API_TOKEN
258
259cirrus-ci-fedora:
260 <<: *cirrus_build_job_definition
261
262cirrus-ci-macos-i386:
263 <<: *cirrus_build_job_definition
264
265cirrus-ci-macos-x86-64:
266 <<: *cirrus_build_job_definition
267
268s390x-kvm:
269 before_script: []
270 tags:
271  - s390x-z15-vm
272 script:
273  - ./configure --arch=s390x
274  - make -j$(nproc)
275  - ACCEL=kvm ./run_tests.sh
276      selftest-setup intercept emulator sieve sthyi diag10 diag308 pfmf
277      cmm vector gs iep cpumodel diag288 stsi sclp-1g sclp-3g css skrf sie
278      | tee results.txt
279  - grep -q PASS results.txt && ! grep -q FAIL results.txt
280 only:
281  variables:
282   - $S390X_Z15_RUNNER_AVAILABLE
283