xref: /kvm-unit-tests/.gitlab-ci.yml (revision 0b7501c3b516bde6bd3d74b17e6af76b6aa2a116)
1image: fedora:32
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     selftest-setup selftest-vectors-kernel selftest-vectors-user selftest-smp
14     pci-test pmu-cycle-counter pmu-event-counter-config pmu-sw-incr gicv2-ipi
15     gicv2-mmio gicv3-ipi gicv2-active gicv3-active psci timer cache
16     | tee results.txt
17 - if grep -q FAIL results.txt ; then exit 1 ; fi
18
19build-arm:
20 script:
21 - dnf install -y qemu-system-arm gcc-arm-linux-gnu
22 - mkdir build
23 - cd build
24 - ../configure --arch=arm --cross-prefix=arm-linux-gnu-
25 - make -j2
26 - ACCEL=tcg MAX_SMP=8 ./run_tests.sh
27     selftest-setup selftest-vectors-kernel selftest-vectors-user selftest-smp
28     pci-test pmu-cycle-counter gicv2-ipi gicv2-mmio gicv3-ipi gicv2-active
29     gicv3-active psci
30     | tee results.txt
31 - if grep -q FAIL results.txt ; then exit 1 ; fi
32
33build-ppc64be:
34 script:
35 - dnf install -y qemu-system-ppc gcc-powerpc64-linux-gnu
36 - mkdir build
37 - cd build
38 - ../configure --arch=ppc64 --endian=big --cross-prefix=powerpc64-linux-gnu-
39 - make -j2
40 - ACCEL=tcg ./run_tests.sh
41     selftest-setup spapr_hcall rtas-get-time-of-day rtas-get-time-of-day-base
42     rtas-set-time-of-day emulator
43     | tee results.txt
44 - if grep -q FAIL results.txt ; then exit 1 ; fi
45
46build-ppc64le:
47 script:
48 - dnf install -y qemu-system-ppc gcc-powerpc64-linux-gnu
49 - ./configure --arch=ppc64 --endian=little --cross-prefix=powerpc64-linux-gnu-
50 - make -j2
51 - ACCEL=tcg ./run_tests.sh
52     selftest-setup spapr_hcall rtas-get-time-of-day rtas-get-time-of-day-base
53     rtas-set-time-of-day emulator
54     | tee results.txt
55 - if grep -q FAIL results.txt ; then exit 1 ; fi
56
57build-s390x:
58 script:
59 - dnf install -y qemu-system-s390x gcc-s390x-linux-gnu
60 - mkdir build
61 - cd build
62 - ../configure --arch=s390x --cross-prefix=s390x-linux-gnu-
63 - make -j2
64 - ACCEL=tcg ./run_tests.sh
65     selftest-setup intercept emulator sieve diag10 diag308 vector diag288
66     stsi sclp-1g sclp-3g
67     | tee results.txt
68 - if grep -q FAIL results.txt ; then exit 1 ; fi
69
70build-x86_64:
71 script:
72 - dnf install -y qemu-system-x86 gcc
73 - ./configure --arch=x86_64
74 - make -j2
75 - ACCEL=tcg ./run_tests.sh
76     ioapic-split smptest smptest3 vmexit_cpuid vmexit_mov_from_cr8
77     vmexit_mov_to_cr8 vmexit_inl_pmtimer  vmexit_ipi vmexit_ipi_halt
78     vmexit_ple_round_robin vmexit_tscdeadline vmexit_tscdeadline_immed
79     eventinj port80 setjmp sieve syscall tsc rmap_chain umip intel_iommu
80     rdpru pku pks smap tsc_adjust xsave
81     | tee results.txt
82 - if grep -q FAIL results.txt ; then exit 1 ; fi
83
84build-i386:
85 script:
86 - dnf install -y qemu-system-x86 gcc
87 - mkdir build
88 - cd build
89 - ../configure --arch=i386
90 - make -j2
91 - ACCEL=tcg ./run_tests.sh
92     cmpxchg8b vmexit_cpuid vmexit_mov_from_cr8 vmexit_mov_to_cr8
93     vmexit_inl_pmtimer vmexit_ipi vmexit_ipi_halt vmexit_ple_round_robin
94     vmexit_tscdeadline vmexit_tscdeadline_immed eventinj port80 setjmp sieve
95     tsc taskswitch umip rdpru smap tsc_adjust xsave
96     | tee results.txt
97 - if grep -q FAIL results.txt ; then exit 1 ; fi
98
99build-clang:
100 script:
101 - dnf install -y qemu-system-x86 clang
102 - ./configure --arch=x86_64 --cc=clang
103 - make -j2
104 - ACCEL=tcg ./run_tests.sh
105     ioapic-split smptest smptest3 vmexit_cpuid vmexit_mov_from_cr8
106     vmexit_mov_to_cr8 vmexit_inl_pmtimer  vmexit_ipi vmexit_ipi_halt
107     vmexit_ple_round_robin vmexit_tscdeadline vmexit_tscdeadline_immed
108     eventinj port80 setjmp syscall tsc rmap_chain umip intel_iommu
109     rdpru pku pks smap tsc_adjust xsave
110     | tee results.txt
111 - grep -q PASS results.txt && ! grep -q FAIL results.txt
112
113build-centos7:
114 image: centos:7
115 before_script:
116 - yum update -y
117 - yum install -y make python qemu-kvm gcc
118 script:
119 - mkdir build
120 - cd build
121 - ../configure --arch=x86_64 --disable-pretty-print-stacks
122 - make -j2
123 - ACCEL=tcg ./run_tests.sh
124     vmexit_cpuid vmexit_mov_from_cr8 vmexit_mov_to_cr8 vmexit_inl_pmtimer
125     vmexit_ple_round_robin vmexit_tscdeadline vmexit_tscdeadline_immed port80
126     setjmp sieve tsc rmap_chain umip
127     | tee results.txt
128 - grep -q PASS results.txt && ! grep -q FAIL results.txt
129
130# Cirrus-CI provides containers with macOS and Linux with KVM enabled,
131# so we can test some scenarios there that are not possible with the
132# gitlab-CI shared runners. We use the "cirrus-run" container from the
133# libvirt project to start the jobs. See the following URL for more
134# information how to set up your environment to use these containers:
135#
136#   https://gitlab.com/libvirt/libvirt/-/blob/v7.0.0/ci/README.rst
137#
138.cirrus_build_job_template: &cirrus_build_job_definition
139 image: registry.gitlab.com/libvirt/libvirt-ci/cirrus-run:master
140 before_script:
141  - sed -e "s|[@]CI_REPOSITORY_URL@|$CI_REPOSITORY_URL|g"
142        -e "s|[@]CI_COMMIT_REF_NAME@|$CI_COMMIT_REF_NAME|g"
143        -e "s|[@]CI_COMMIT_SHA@|$CI_COMMIT_SHA|g"
144        < ci/$CI_JOB_NAME.yml > ci/_$CI_JOB_NAME.yml
145 script:
146  - cirrus-run -v --show-build-log always ci/_$CI_JOB_NAME.yml
147 only:
148  variables:
149   - $CIRRUS_GITHUB_REPO
150   - $CIRRUS_API_TOKEN
151
152cirrus-ci-fedora:
153 <<: *cirrus_build_job_definition
154
155cirrus-ci-macos-i386:
156 <<: *cirrus_build_job_definition
157
158cirrus-ci-macos-x86-64:
159 <<: *cirrus_build_job_definition
160
161s390x-kvm:
162 before_script: []
163 tags:
164  - s390x-z15-vm
165 script:
166  - ./configure --arch=s390x
167  - make -j$(nproc)
168  - ACCEL=kvm ./run_tests.sh
169      selftest-setup intercept emulator sieve sthyi diag10 diag308 pfmf
170      cmm vector gs iep cpumodel diag288 stsi sclp-1g sclp-3g css skrf sie
171      | tee results.txt
172  - grep -q PASS results.txt && ! grep -q FAIL results.txt
173 only:
174  variables:
175   - $S390X_Z15_RUNNER_AVAILABLE
176