forked from qemu/qemu
-
Notifications
You must be signed in to change notification settings - Fork 3
565 lines (523 loc) · 24 KB
/
Copy pathbuild.yml
File metadata and controls
565 lines (523 loc) · 24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
name: Upstream QEMU CI
on: push
env:
# p-b-o/qemu-ci is an upstream-series runner. This downstream tree carries
# local board imports with cross-toolchain warnings, so keep Werror strictness
# only for the source CI repository.
QEMU_WERROR: ${{ github.repository == 'p-b-o/qemu-ci' && '--enable-werror' || '--disable-werror' }}
# Full thorough functional coverage includes host-sensitive GPU/KVM cases.
# Keep it in p-b-o/qemu-ci; downstream runs use quick functional smoke.
QEMU_FUNC_SUITES: ${{ github.repository == 'p-b-o/qemu-ci' && '--suite func-quick --suite func-thorough' || '--suite func-quick' }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
checkapply:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
# to debug container live from GitHub
# - uses: mxschmitt/action-tmate@v3
- run: bash -c '[ ! -f shazam.log ] || { cat shazam.log; exit 1; }'
checkpatch:
needs: checkapply
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- id: patch-range
env:
GH_TOKEN: ${{ github.token }}
REPOSITORY: ${{ github.repository }}
REF_NAME: ${{ github.ref_name }}
run: |
set -euo pipefail
if [ "$REPOSITORY" = "p-b-o/qemu-ci" ]; then
git remote add upstream https://gitlab.com/qemu-project/qemu
git fetch --no-tags upstream master
base="$(git merge-base upstream/master HEAD)"
echo "range=$base..HEAD" >> "$GITHUB_OUTPUT"
exit 0
fi
base_ref="$(gh pr list --repo "$REPOSITORY" --head "$REF_NAME" \
--state open --json baseRefName --jq '.[0].baseRefName // ""')"
if [ -z "$base_ref" ]; then
echo "No open PR found for $REF_NAME; skipping checkpatch"
echo "range=" >> "$GITHUB_OUTPUT"
exit 0
fi
git fetch --no-tags origin "$base_ref"
base="$(git merge-base "origin/$base_ref" HEAD)"
echo "range=$base..HEAD" >> "$GITHUB_OUTPUT"
- if: ${{ steps.patch-range.outputs.range != '' }}
run: ./scripts/checkpatch.pl "${{ steps.patch-range.outputs.range }}"
# Use prebuilt images instead of rebuilding them in CI.
build-cross:
needs: checkapply
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
container: [alpine,centos9,debian-amd64-cross,debian-arm64-cross,debian-hexagon-cross,debian-loongarch-cross,debian-ppc64el-cross,debian-riscv64-cross,debian-tricore-cross,fedora,ubuntu2404]
steps:
- uses: actions/checkout@v6
- run: pip install meson
# - run: make docker-run J=$(nproc) RUNC=podman TEST=test-build IMAGE=docker.io/pboqemu/qemu-ci:${{matrix.container}}
- run: >
podman run --pull newer --init --rm -it -v $(pwd):$(pwd)
-w $(pwd)/tests/docker/
docker.io/pboqemu/qemu-ci:${{matrix.container}}
env QEMU_SRC=$(pwd) QEMU_WERROR="${{ env.QEMU_WERROR }}" ENABLE_RUST=0 INSTALL_DIR=/ BUILD_DIR=/tmp MAKEFLAGS="-j $(nproc)"
./test-build
build:
strategy:
fail-fast: false
matrix:
include:
- arch: x86_64
image: ubuntu-24.04
- arch: aarch64
image: ubuntu-24.04-arm
needs: checkapply
runs-on: ${{matrix.image}}
steps:
- run: sudo rm -rf /opt/ /usr/local/.ghcup /usr/local/lib/android
- uses: actions/checkout@v6
- run: >
podman run --pull newer --init --rm -it -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:debian
bash -cx './configure ${{ env.QEMU_WERROR }} && ninja -C build install'
- run: >
podman run --pull newer --init --rm -it -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:debian
./build/qemu-system-x86_64 -nographic -plugin ./build/contrib/plugins/libstoptrigger,icount=1000000 -plugin ./build/tests/tcg/plugins/libinsn -plugin ./build/contrib/plugins/libcpp -d plugin
- run: >
podman run --pull newer --init --rm -it -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:debian
./build/qemu-${{matrix.arch}} -plugin ./build/contrib/plugins/libstoptrigger,icount=1000000 -plugin ./build/tests/tcg/plugins/libinsn -plugin ./build/contrib/plugins/libcpp -d plugin ./build/qemu-system-x86_64 --version
build-cross-mingw64:
needs: checkapply
runs-on: ubuntu-24.04
steps:
- run: sudo rm -rf /opt/ /usr/local/.ghcup /usr/local/lib/android
- uses: actions/checkout@v6
- run: >
podman run --pull newer --init --rm -it -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:fedora-win64-cross
bash -cx './configure ${{ env.QEMU_WERROR }} $QEMU_CONFIGURE_OPTS && ninja -C build install'
build-windows:
needs: checkapply
strategy:
fail-fast: false
matrix:
include:
- sys: UCRT64
image: windows-2025
arch: x64
- sys: CLANG64
image: windows-2025
arch: x64
- sys: MINGW64
image: windows-2025
arch: x64
- sys: CLANGARM64
image: windows-11-arm
arch: arm64
runs-on: ${{matrix.image}}
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
update: true
msystem: ${{matrix.sys}}
- uses: actions/checkout@v6
- run: >
pacman -S --noconfirm base-devel binutils bison curl diffutils flex git grep make sed
${MINGW_PACKAGE_PREFIX}-toolchain
${MINGW_PACKAGE_PREFIX}-glib2
${MINGW_PACKAGE_PREFIX}-gtk3
${MINGW_PACKAGE_PREFIX}-libnfs
${MINGW_PACKAGE_PREFIX}-libssh
${MINGW_PACKAGE_PREFIX}-ninja
${MINGW_PACKAGE_PREFIX}-pixman
${MINGW_PACKAGE_PREFIX}-pkgconf
${MINGW_PACKAGE_PREFIX}-python
${MINGW_PACKAGE_PREFIX}-SDL2
${MINGW_PACKAGE_PREFIX}-zstd
# Install all dependencies for windows build
- run: git clone https://github.com/msys2/MINGW-packages --depth=1
- run: pushd ./MINGW-packages/mingw-w64-qemu && (makepkg --syncdeps --nobuild --noprepare --noconfirm --skippgpcheck PKGBUILD || true) && popd
# Install debug tools (gflags, cdb), included in wdk:
- run: /c/ProgramData/Chocolatey/bin/choco install -y windowsdriverkit11
- run: ./configure ${{ env.QEMU_WERROR }} --disable-docs && ninja -C build
# detect dll issue by loading qemu binary with cdb (run + quit)
# enable verbose load debug with gflags
# https://ten0s.github.io/blog/2022/07/01/debugging-dll-loading-errors
- run: /c/Program\ Files\ \(x86\)/Windows\ Kits/10/Debuggers/${{matrix.arch}}/gflags.exe -i qemu-system-x86_64.exe +sls
- run: /c/Program\ Files\ \(x86\)/Windows\ Kits/10/Debuggers/${{matrix.arch}}/cdb.exe -c 'g;q' ./build/qemu-system-x86_64.exe --version || true
- run: ./build/qemu-system-x86_64.exe -nographic -plugin ./build/contrib/plugins/libstoptrigger,icount=1000000 -plugin ./build/tests/tcg/plugins/libinsn -plugin ./build/contrib/plugins/libcpp -d plugin
build-macos:
needs: checkapply
strategy:
fail-fast: false
matrix:
include:
- arch: x86_64
image: macos-15-intel
- arch: aarch64
image: macos-26
runs-on: ${{matrix.image}}
steps:
- uses: actions/checkout@v6
- run: brew uninstall cmake # conflict with install command below
- run: brew install --quiet $(env HOMEBREW_NO_ENV_HINTS=1 brew deps --include-build qemu) bison flex
- run: ./configure ${{ env.QEMU_WERROR }} && ninja -C build
- run: ./build/qemu-system-x86_64-unsigned -nographic -plugin ./build/contrib/plugins/libstoptrigger,icount=1000000 -plugin ./build/tests/tcg/plugins/libinsn -plugin ./build/contrib/plugins/libcpp -d plugin
build-freebsd:
needs: checkapply
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: vmactions/freebsd-vm@v1
with:
copyback: false
release: "14.3"
- run: rsync -av ./ freebsd:/home/qemu/
- shell: freebsd {0}
run: set -ex && pkg update && pkg install -y git gcc gmake python pkgconf pixman bison flex glib ninja
- shell: freebsd {0}
run: cd /home/qemu && ./configure ${{ env.QEMU_WERROR }} && ninja -C build
- shell: freebsd {0}
run: cd /home/qemu && ./build/qemu-x86_64 -plugin ./build/contrib/plugins/libstoptrigger,icount=1000000 -plugin ./build/tests/tcg/plugins/libinsn -plugin ./build/contrib/plugins/libcpp -d plugin ./build/qemu-x86_64 --version
- shell: freebsd {0}
run: cd /home/qemu && ./build/qemu-system-x86_64 -nographic -plugin ./build/contrib/plugins/libstoptrigger,icount=1000000 -plugin ./build/tests/tcg/plugins/libinsn -plugin ./build/contrib/plugins/libcpp -d plugin
build-netbsd:
needs: checkapply
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: vmactions/netbsd-vm@v1
with:
copyback: false
release: "10.1"
- run: rsync -av ./ netbsd:/home/qemu/
- shell: netbsd {0}
run: set -ex && pkg_add pkgin && pkgin -y install git gmake python314 pkgconf pixman bison flex glib ninja-build && ln -s /usr/pkg/bin/python3.14 /usr/bin/python3
- shell: netbsd {0}
run: cd /home/qemu && ./configure ${{ env.QEMU_WERROR }} && ninja -C build
# for some reason meson can't find c++ compiler, so no cpp plugin
# split-wx=on: https://gitlab.com/qemu-project/qemu/-/issues/2685
- shell: netbsd {0}
run: cd /home/qemu && ./build/qemu-system-x86_64 -accel tcg,split-wx=on -nographic -plugin ./build/contrib/plugins/libstoptrigger,icount=1000000 -plugin ./build/tests/tcg/plugins/libinsn -d plugin
build-openbsd:
needs: checkapply
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: vmactions/openbsd-vm@v1
with:
copyback: false
release: "7.8"
# move root home to /home, which has all disk space
- shell: openbsd {0}
run: mv /root/ /home/ && ln -s /home/root/ /root
- run: rsync -av ./ openbsd:/home/qemu/
- shell: openbsd {0}
run: set -ex && pkg_add dtc git pkgconf bzip2 xz ninja bash gmake gsed gettext-tools gnutls capstone sdl2 gtk+3 libxkbcommon zstd libslirp bison flex
- shell: openbsd {0}
run: cd /home/qemu && ./configure ${{ env.QEMU_WERROR }} && ninja -C build
# split-wx=on: https://gitlab.com/qemu-project/qemu/-/issues/2685
- shell: openbsd {0}
run: cd /home/qemu && ./build/qemu-system-x86_64 -accel tcg,split-wx=on -nographic -plugin ./build/contrib/plugins/libstoptrigger,icount=1000000 -plugin ./build/tests/tcg/plugins/libinsn -plugin ./build/contrib/plugins/libcpp -d plugin
build-misc:
needs: checkapply
runs-on: ubuntu-24.04
steps:
- run: sudo rm -rf /opt/ /usr/local/.ghcup /usr/local/lib/android
- uses: actions/checkout@v6
- run: >
podman run --pull newer --init --rm -it -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:debian
bash -cx './configure ${{ env.QEMU_WERROR }} --disable-user --disable-system --enable-docs --enable-tools && ninja -C build install'
build-big-endian:
needs: checkapply
runs-on: ubuntu-24.04
steps:
- run: sudo rm -rf /opt/ /usr/local/.ghcup /usr/local/lib/android
- uses: actions/checkout@v6
- run: >
podman run --pull newer --init --rm -it -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:debian-s390x-cross
bash -cx './configure ${{ env.QEMU_WERROR }} $QEMU_CONFIGURE_OPTS && ninja -C build install'
build-debug:
needs: checkapply
runs-on: ubuntu-24.04
steps:
- run: sudo rm -rf /opt/ /usr/local/.ghcup /usr/local/lib/android
- uses: actions/checkout@v6
- run: >
podman run --pull newer --init --rm -it -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:debian
bash -cx './configure ${{ env.QEMU_WERROR }} --enable-rust --enable-debug --enable-modules && ninja -C build install'
- run: >
podman run --pull newer --init --rm -it -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:debian
./build/qemu-system-x86_64 -nographic -plugin ./build/contrib/plugins/libstoptrigger,icount=1000000 -plugin ./build/tests/tcg/plugins/libinsn -plugin ./build/contrib/plugins/libcpp -d plugin
build-static:
needs: checkapply
runs-on: ubuntu-24.04
steps:
- run: sudo rm -rf /opt/ /usr/local/.ghcup /usr/local/lib/android
- uses: actions/checkout@v6
- run: >
podman run --pull newer --init --rm -it -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:debian
bash -cx './configure ${{ env.QEMU_WERROR }} --disable-system --disable-tools --disable-guest-agent --disable-docs --static && ninja -C build install'
build-tsan:
needs: checkapply
runs-on: ubuntu-24.04
steps:
- run: sudo rm -rf /opt/ /usr/local/.ghcup /usr/local/lib/android
- uses: actions/checkout@v6
- run: >
podman run --pull newer --init --rm -it -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:debian
bash -cx './configure ${{ env.QEMU_WERROR }} --enable-tsan && ninja -C build install'
build-clang:
needs: checkapply
runs-on: ubuntu-24.04
steps:
- run: sudo rm -rf /opt/ /usr/local/.ghcup /usr/local/lib/android
- uses: actions/checkout@v6
- run: >
podman run --pull newer --init --rm -it -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:debian
bash -cx './configure ${{ env.QEMU_WERROR }} --cxx=clang++ --cc=clang --host-cc=clang --enable-debug && ninja -C build install'
build-clang-22:
needs: checkapply
runs-on: ubuntu-24.04
steps:
- run: sudo rm -rf /opt/ /usr/local/.ghcup /usr/local/lib/android
- uses: actions/checkout@v6
# bypass package signature check by faking sqv binary
- run: >
podman run --pull newer --init --rm -it -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:debian
bash -cx 'cp /usr/bin/echo /usr/bin/sqv && LLVM_VERSION=22 && apt update && apt install -y lsb-release wget gnupg && wget https://apt.llvm.org/llvm.sh && bash llvm.sh ${LLVM_VERSION} && ./configure ${{ env.QEMU_WERROR }} --cxx=clang++-${LLVM_VERSION} --cc=clang-${LLVM_VERSION} --host-cc=clang-${LLVM_VERSION} --enable-debug && ninja -C build install'
build-kvm-only:
needs: checkapply
strategy:
fail-fast: false
matrix:
arch: [arm64, amd64, ppc64el, s390x]
runs-on: ubuntu-24.04
steps:
- run: sudo rm -rf /opt/ /usr/local/.ghcup /usr/local/lib/android
- uses: actions/checkout@v6
- run: >
podman run --pull newer --init --rm -it -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:debian-${{matrix.arch}}-cross
bash -cx './configure ${{ env.QEMU_WERROR }} --disable-tcg $QEMU_CONFIGURE_OPTS && ninja -C build install'
build-xen-only:
needs: checkapply
strategy:
fail-fast: false
matrix:
arch: [arm64, amd64]
runs-on: ubuntu-24.04
steps:
- run: sudo rm -rf /opt/ /usr/local/.ghcup /usr/local/lib/android
- uses: actions/checkout@v6
- run: >
podman run --pull newer --init --rm -it -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:debian-${{matrix.arch}}-cross
bash -cx './configure ${{ env.QEMU_WERROR }} --disable-tcg --disable-kvm $QEMU_CONFIGURE_OPTS && ninja -C build install'
build-minimal:
needs: checkapply
runs-on: ubuntu-24.04
steps:
- run: sudo rm -rf /opt/ /usr/local/.ghcup /usr/local/lib/android
- uses: actions/checkout@v6
- run: >
podman run --pull newer --init --rm -it -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:debian
bash -cx './configure ${{ env.QEMU_WERROR }} --without-default-features --without-default-devices --disable-kvm --disable-tcg && ninja -C build install'
build-oss-fuzz:
needs: checkapply
runs-on: ubuntu-24.04
steps:
- run: sudo rm -rf /opt/ /usr/local/.ghcup /usr/local/lib/android
- uses: actions/checkout@v6
- run: >
podman run --pull newer --init --rm -it -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:debian
bash -cx 'mkdir build-oss-fuzz && export LSAN_OPTIONS=suppressions=scripts/lsan_suppressions.txt && CC="clang" CXX="clang++" CFLAGS="-fsanitize=address" ./scripts/oss-fuzz/build.sh'
- run: >
podman run --pull newer --init --rm -it -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:debian
bash -cx 'for fuzzer in $(find ./build-oss-fuzz/DEST_DIR/ -executable -type f); do grep "LLVMFuzzerTestOneInput" ${fuzzer} >& /dev/null || continue; env ASAN_OPTIONS="fast_unwind_on_malloc=0" ${fuzzer} -runs=1 -seed=1 || exit 1; done'
check-tcg:
strategy:
fail-fast: false
matrix:
include:
- arch: x86_64
image: ubuntu-24.04
- arch: aarch64
image: ubuntu-24.04-arm
needs: checkapply
runs-on: ${{matrix.image}}
steps:
- run: sudo rm -rf /opt/ /usr/local/.ghcup /usr/local/lib/android
- uses: actions/checkout@v6
- run: >
podman run --pull newer --init --rm -it -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:debian
bash -cx './configure ${{ env.QEMU_WERROR }} --disable-docs --enable-rust --enable-debug-tcg --enable-debug-graph-lock --enable-debug-mutex && ninja -C build'
- run: >
podman run --pull newer --init --privileged --rm -it -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:debian
bash -cx "make -j1 check-tcg V=1"
# run all meson tests, except functional.
check:
strategy:
fail-fast: false
matrix:
include:
- arch: x86_64
image: ubuntu-24.04
- arch: aarch64
image: ubuntu-24.04-arm
needs: checkapply
runs-on: ${{matrix.image}}
steps:
- run: sudo rm -rf /opt/ /usr/local/.ghcup /usr/local/lib/android
- uses: actions/checkout@v6
# we use image with download cache filled. Solves servers flakiness.
- run: >
podman run --pull newer --init --rm -it -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:debian
bash -cx './configure ${{ env.QEMU_WERROR }} --disable-docs --enable-rust --enable-debug-tcg --enable-debug-graph-lock --enable-debug-mutex && ninja -C build'
- run: bash -c "[ -e /dev/kvm ] && sudo chown $USER:$USER /dev/kvm || true"
# run podman without -t to avoid interactive output of meson test
- run: >
podman run --pull newer --init --privileged --rm -i $([ -e /dev/kvm ] && echo '-v /dev/kvm:/dev/kvm') -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:debian
bash -cx "./build/pyvenv/bin/meson test -C build --setup thorough --no-suite func-quick --no-suite func-thorough --no-suite block-slow --no-suite block-thorough -t 5 --print-errorlogs"
check-functional:
strategy:
fail-fast: false
matrix:
include:
- arch: x86_64
image: ubuntu-24.04
- arch: aarch64
image: ubuntu-24.04-arm
needs: checkapply
runs-on: ${{matrix.image}}
steps:
- run: sudo rm -rf /opt/ /usr/local/.ghcup /usr/local/lib/android
- uses: actions/checkout@v6
# we use image with download cache filled. Solves servers flakiness.
- run: >
podman run --pull newer --init --rm -it -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:debian
bash -cx './configure ${{ env.QEMU_WERROR }} --disable-docs --enable-rust --enable-debug-tcg --enable-debug-graph-lock --enable-debug-mutex && ninja -C build'
- run: bash -c "[ -e /dev/kvm ] && sudo chown $USER:$USER /dev/kvm || true"
# run podman without -t to avoid interactive output of meson test
- run: >
podman run --pull newer --init --privileged --rm -i $([ -e /dev/kvm ] && echo '-v /dev/kvm:/dev/kvm') -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:debian
bash -cx "./build/pyvenv/bin/meson test -C build --setup thorough ${{ env.QEMU_FUNC_SUITES }} -j1 --timeout-multiplier 0 --print-errorlogs --wrapper $(pwd)/scripts/run-functional-test.sh --max-lines=0"
# Run with -j1 to avoid issues with parallel runs
check-functional-rk3588-zvm:
needs: checkapply
runs-on: ubuntu-24.04
timeout-minutes: 150
steps:
- run: sudo rm -rf /opt/ /usr/local/.ghcup /usr/local/lib/android
- uses: actions/checkout@v6
- uses: actions/cache@v4
with:
path: .cache/qemu-test/download
key: zvm-rk3588-assets-v1
- run: >
podman run --pull newer --init --rm -it -v $(pwd):$(pwd) -w $(pwd)
docker.io/pboqemu/qemu-ci:debian
bash -cx './configure ${{ env.QEMU_WERROR }} --disable-docs --target-list=aarch64-softmmu && ninja -C build qemu-system-aarch64 qemu-img'
- run: |
podman run --pull newer --init --privileged --rm -i \
-v $(pwd):$(pwd) -w $(pwd) \
docker.io/pboqemu/qemu-ci:debian \
bash -exc '
missing=0
for cmd in curl zstd mkfs.vfat mcopy; do
command -v "$cmd" >/dev/null || missing=1
done
command -v 7z >/dev/null || command -v 7zz >/dev/null || missing=1
if [ "$missing" -ne 0 ]; then
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y \
--no-install-recommends curl dosfstools mtools zstd
DEBIAN_FRONTEND=noninteractive apt-get install -y \
--no-install-recommends 7zip || \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
--no-install-recommends p7zip-full
fi
cache_root=$(pwd)/.cache/qemu-test
cache_dir=$cache_root/download
mkdir -p "$cache_dir"
run_test()
{
timeout=$1
test_name=$2
QEMU_TEST_CACHE_DIR=$cache_root \
QEMU_FUNCTIONAL_TEST_TIMEOUT=$timeout \
./build/pyvenv/bin/meson test -C build --setup thorough \
-j1 --timeout-multiplier 0 --print-errorlogs \
--wrapper $(pwd)/scripts/run-functional-test.sh \
--max-lines=0 "$test_name"
}
download_asset()
{
url=$1
sha=$2
dest=$cache_dir/$sha
tmp=$dest.tmp
if [ -f "$dest" ] &&
printf "%s %s\n" "$sha" "$dest" | sha256sum -c -
then
return 0
fi
rm -f "$dest" "$tmp"
curl -fL --retry 5 --retry-all-errors \
--connect-timeout 30 --speed-time 120 --speed-limit 1024 \
-o "$tmp" "$url"
printf "%s %s\n" "$sha" "$tmp" | sha256sum -c -
mv "$tmp" "$dest"
}
run_test 15m qemu:func-aarch64-rk3588_zvm
download_asset \
https://esnl.hnu.edu.cn/zvm/resource/kernel_images.zip \
05aa22b772808abef7082d3dfc513ea75b0813f3e0d4f028ad595e2c86fe3ec7 &
pids=$!
download_asset \
https://esnl.hnu.edu.cn/zvm/resource/file_system_images_part1.zip \
9a1840d8d486b2de8e8bedc1647cd3c5aa2f622111b45bb9f0d8e1d26b07c5f0 &
pids="$pids $!"
download_asset \
https://esnl.hnu.edu.cn/zvm/resource/file_system_images_part2.zip \
17b048b0a473dcbd4e5b7f1c5d4f50547ffefe3e040c0b8835e55cba7f45b823 &
pids="$pids $!"
status=0
for pid in $pids; do
wait "$pid" || status=1
done
if [ "$status" -ne 0 ]; then
exit "$status"
fi
run_test 90m qemu:func-aarch64-rk3588_zvm_linux_guest
'