]>
Commit | Line | Data |
---|---|---|
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 |
4 | stages: |
5 | - containers | |
fa821f23 DB |
6 | - containers-layer2 |
7 | - containers-layer3 | |
d0caa0a8 | 8 | - build |
c5008c76 | 9 | - test |
d0caa0a8 | 10 | |
6957fd98 AB |
11 | # We assume GitLab has it's own caching set up for RPM/APT repositories so we |
12 | # just take care of avocado assets here. | |
13 | cache: | |
14 | paths: | |
15 | - $HOME/avocado/data/cache | |
16 | ||
71920809 | 17 | include: |
922febe2 TH |
18 | - local: '/.gitlab-ci.d/edk2.yml' |
19 | - local: '/.gitlab-ci.d/opensbi.yml' | |
fa821f23 | 20 | - local: '/.gitlab-ci.d/containers.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 | 69 | build-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 AB |
76 | artifacts: |
77 | paths: | |
78 | - build | |
79 | ||
699616db | 80 | check-system-ubuntu: |
c5008c76 AB |
81 | <<: *native_test_job_definition |
82 | needs: | |
699616db | 83 | - job: build-system-ubuntu |
c5008c76 AB |
84 | artifacts: true |
85 | variables: | |
86 | IMAGE: ubuntu2004 | |
c962864f | 87 | MAKE_CHECK_ARGS: check |
0a8b05c7 | 88 | |
699616db | 89 | acceptance-system-ubuntu: |
c5008c76 AB |
90 | <<: *native_test_job_definition |
91 | needs: | |
699616db | 92 | - job: build-system-ubuntu |
c5008c76 AB |
93 | artifacts: true |
94 | variables: | |
95 | IMAGE: ubuntu2004 | |
96 | MAKE_CHECK_ARGS: check-acceptance | |
5896c539 | 97 | <<: *acceptance_definition |
c5008c76 | 98 | |
699616db TH |
99 | build-system-debian: |
100 | <<: *native_build_job_definition | |
101 | variables: | |
102 | IMAGE: debian-amd64 | |
103 | TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu | |
104 | riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu | |
105 | MAKE_CHECK_ARGS: check-build | |
106 | artifacts: | |
107 | paths: | |
108 | - build | |
109 | ||
110 | check-system-debian: | |
111 | <<: *native_test_job_definition | |
112 | needs: | |
113 | - job: build-system-debian | |
114 | artifacts: true | |
115 | variables: | |
116 | IMAGE: debian-amd64 | |
117 | MAKE_CHECK_ARGS: check | |
118 | ||
119 | acceptance-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-acceptance | |
5896c539 | 127 | <<: *acceptance_definition |
699616db TH |
128 | |
129 | build-system-fedora: | |
c962864f DB |
130 | <<: *native_build_job_definition |
131 | variables: | |
132 | IMAGE: fedora | |
133 | TARGETS: tricore-softmmu unicore32-softmmu microblaze-softmmu mips-softmmu | |
699616db | 134 | xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu |
a6eeac3b | 135 | MAKE_CHECK_ARGS: check-build |
c5008c76 AB |
136 | artifacts: |
137 | paths: | |
138 | - build | |
139 | ||
699616db | 140 | check-system-fedora: |
c5008c76 AB |
141 | <<: *native_test_job_definition |
142 | needs: | |
699616db | 143 | - job: build-system-fedora |
c5008c76 AB |
144 | artifacts: true |
145 | variables: | |
146 | IMAGE: fedora | |
c962864f | 147 | MAKE_CHECK_ARGS: check |
0a8b05c7 | 148 | |
699616db | 149 | acceptance-system-fedora: |
c5008c76 AB |
150 | <<: *native_test_job_definition |
151 | needs: | |
699616db | 152 | - job: build-system-fedora |
c5008c76 AB |
153 | artifacts: true |
154 | variables: | |
155 | IMAGE: fedora | |
156 | MAKE_CHECK_ARGS: check-acceptance | |
5896c539 | 157 | <<: *acceptance_definition |
c5008c76 | 158 | |
699616db TH |
159 | build-system-centos: |
160 | <<: *native_build_job_definition | |
161 | variables: | |
162 | IMAGE: centos8 | |
163 | TARGETS: ppc64-softmmu lm32-softmmu or1k-softmmu s390x-softmmu | |
164 | x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu | |
165 | MAKE_CHECK_ARGS: check-build | |
166 | artifacts: | |
167 | paths: | |
168 | - build | |
169 | ||
170 | check-system-centos: | |
171 | <<: *native_test_job_definition | |
172 | needs: | |
173 | - job: build-system-centos | |
174 | artifacts: true | |
175 | variables: | |
176 | IMAGE: centos8 | |
177 | MAKE_CHECK_ARGS: check | |
178 | ||
179 | acceptance-system-centos: | |
180 | <<: *native_test_job_definition | |
181 | needs: | |
182 | - job: build-system-centos | |
183 | artifacts: true | |
184 | variables: | |
185 | IMAGE: centos8 | |
186 | MAKE_CHECK_ARGS: check-acceptance | |
5896c539 | 187 | <<: *acceptance_definition |
699616db | 188 | |
0a8b05c7 | 189 | build-disabled: |
c962864f DB |
190 | <<: *native_build_job_definition |
191 | variables: | |
192 | IMAGE: fedora | |
193 | CONFIGURE_ARGS: --disable-rdma --disable-slirp --disable-curl | |
0a8b05c7 TH |
194 | --disable-capstone --disable-live-block-migration --disable-glusterfs |
195 | --disable-replication --disable-coroutine-pool --disable-smartcard | |
196 | --disable-guest-agent --disable-curses --disable-libxml2 --disable-tpm | |
197 | --disable-qom-cast-debug --disable-spice --disable-vhost-vsock | |
198 | --disable-vhost-net --disable-vhost-crypto --disable-vhost-user | |
c962864f DB |
199 | TARGETS: i386-softmmu ppc64-softmmu mips64-softmmu i386-linux-user |
200 | MAKE_CHECK_ARGS: check-qtest SPEED=slow | |
0a8b05c7 TH |
201 | |
202 | build-tcg-disabled: | |
c962864f DB |
203 | <<: *native_build_job_definition |
204 | variables: | |
205 | IMAGE: centos8 | |
206 | script: | |
207 | - mkdir build | |
208 | - cd build | |
209 | - ../configure --disable-tcg --audio-drv-list="" | |
210 | - make -j"$JOBS" | |
211 | - make check-unit | |
212 | - make check-qapi-schema | |
213 | - cd tests/qemu-iotests/ | |
214 | - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048 | |
c7cf4ddb TH |
215 | 052 063 077 086 101 104 106 113 148 150 151 152 157 159 160 163 |
216 | 170 171 183 184 192 194 197 208 215 221 222 226 227 236 253 277 | |
c962864f | 217 | - ./check -qcow2 028 051 056 057 058 065 067 068 082 085 091 095 096 102 122 |
c7cf4ddb TH |
218 | 124 132 139 142 144 145 151 152 155 157 165 194 196 197 200 202 |
219 | 208 209 215 216 218 222 227 234 246 247 248 250 254 255 257 258 | |
220 | 260 261 262 263 264 270 272 273 277 279 | |
0a8b05c7 TH |
221 | |
222 | build-user: | |
c962864f DB |
223 | <<: *native_build_job_definition |
224 | variables: | |
62c902e0 AB |
225 | IMAGE: debian-all-test-cross |
226 | CONFIGURE_ARGS: --disable-tools --disable-system | |
227 | MAKE_CHECK_ARGS: check-tcg | |
0a8b05c7 TH |
228 | |
229 | build-clang: | |
c962864f DB |
230 | <<: *native_build_job_definition |
231 | variables: | |
232 | IMAGE: fedora | |
233 | CONFIGURE_ARGS: --cc=clang --cxx=clang++ | |
234 | TARGETS: alpha-softmmu arm-softmmu m68k-softmmu mips64-softmmu | |
b610eba3 | 235 | ppc-softmmu s390x-softmmu arm-linux-user |
c962864f | 236 | MAKE_CHECK_ARGS: check |
5f55d64b | 237 | |
48eac101 | 238 | build-oss-fuzz: |
b610eba3 TH |
239 | <<: *native_build_job_definition |
240 | variables: | |
241 | IMAGE: fedora | |
242 | script: | |
48eac101 AB |
243 | - mkdir build-oss-fuzz |
244 | - CC="clang" CXX="clang++" CFLAGS="-fsanitize=address" | |
245 | ./scripts/oss-fuzz/build.sh | |
246 | - for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f | |
247 | | grep -v slirp); do | |
248 | grep "LLVMFuzzerTestOneInput" ${fuzzer} > /dev/null 2>&1 || continue ; | |
249 | echo Testing ${fuzzer} ... ; | |
250 | ASAN_OPTIONS="fast_unwind_on_malloc=0" | |
251 | "${fuzzer}" -runs=1000 -seed=1 || exit 1 ; | |
b610eba3 TH |
252 | done |
253 | ||
5f55d64b | 254 | build-tci: |
c962864f DB |
255 | <<: *native_build_job_definition |
256 | variables: | |
257 | IMAGE: fedora | |
258 | script: | |
259 | - TARGETS="aarch64 alpha arm hppa m68k microblaze moxie ppc64 s390x x86_64" | |
260 | - mkdir build | |
261 | - cd build | |
262 | - ../configure --enable-tcg-interpreter | |
263 | --target-list="$(for tg in $TARGETS; do echo -n ${tg}'-softmmu '; done)" | |
264 | - make -j"$JOBS" | |
265 | - make run-tcg-tests-x86_64-softmmu | |
266 | - make tests/qtest/boot-serial-test tests/qtest/cdrom-test tests/qtest/pxe-test | |
267 | - for tg in $TARGETS ; do | |
268 | export QTEST_QEMU_BINARY="${tg}-softmmu/qemu-system-${tg}" ; | |
269 | ./tests/qtest/boot-serial-test || exit 1 ; | |
270 | ./tests/qtest/cdrom-test || exit 1 ; | |
271 | done | |
272 | - QTEST_QEMU_BINARY="x86_64-softmmu/qemu-system-x86_64" ./tests/qtest/pxe-test | |
273 | - QTEST_QEMU_BINARY="s390x-softmmu/qemu-system-s390x" ./tests/qtest/pxe-test -m slow |