Merge pull request #3 from processmission/codex/s32k5-zephyr-qemu #31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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.4" | |
| - 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 | |
| ' |