Prepare QCW QEMU (from TarBall sources) #125
Workflow file for this run
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: Prepare QCW QEMU (from TarBall sources) | |
| on: | |
| workflow_dispatch: | |
| workflow_call: | |
| outputs: | |
| qemu_version: | |
| description: QEMU version" | |
| value: ${{ jobs.build.outputs.qemu_version }} | |
| env: | |
| QEMU_VERSION: 11.0.0-rc4 | |
| MSYS: "winsymlinks:native" | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| msystem: [clang64, mingw64, ucrt64] | |
| runs-on: windows-2025 | |
| outputs: | |
| qemu_version: ${{ steps.make_versions.outputs.qemu }} | |
| steps: | |
| - name: "ποΈ Install msys2 MINGW64" | |
| if: "${{ matrix.msystem == 'mingw64' }}" | |
| uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # v2.30.0 | |
| with: | |
| msystem: ${{ matrix.msystem }} | |
| update: true | |
| install: >- | |
| base-devel cmake git make mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-binutils mingw-w64-x86_64-capstone mingw-w64-x86_64-cc mingw-w64-x86_64-curl-winssl mingw-w64-x86_64-cyrus-sasl mingw-w64-x86_64-gtk-vnc mingw-w64-x86_64-gtk3 mingw-w64-x86_64-libcbor mingw-w64-x86_64-libnfs mingw-w64-x86_64-libslirp mingw-w64-x86_64-libssh mingw-w64-x86_64-libxml2 mingw-w64-x86_64-lzo2 mingw-w64-x86_64-ncurses mingw-w64-x86_64-ninja mingw-w64-x86_64-nsis mingw-w64-x86_64-pixman mingw-w64-x86_64-pkgconf mingw-w64-x86_64-python mingw-w64-x86_64-sccache mingw-w64-x86_64-snappy mingw-w64-x86_64-spice mingw-w64-x86_64-spice-protocol mingw-w64-x86_64-toolchain mingw-w64-x86_64-usbredir mingw-w64-x86_64-virglrenderer mingw-w64-x86_64-zlib mingw-w64-x86_64-zstd patch zip | |
| - name: "ποΈ Install msys2 UCRT64" | |
| if: "${{ matrix.msystem == 'ucrt64' }}" | |
| uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # v2.30.0 | |
| with: | |
| msystem: ${{ matrix.msystem }} | |
| update: true | |
| install: >- | |
| base-devel cmake git make mingw-w64-ucrt-x86_64-SDL2 mingw-w64-ucrt-x86_64-SDL2_image mingw-w64-ucrt-x86_64-binutils mingw-w64-ucrt-x86_64-capstone mingw-w64-ucrt-x86_64-cc mingw-w64-ucrt-x86_64-curl-winssl mingw-w64-ucrt-x86_64-cyrus-sasl mingw-w64-ucrt-x86_64-gtk-vnc mingw-w64-ucrt-x86_64-gtk3 mingw-w64-ucrt-x86_64-libcbor mingw-w64-ucrt-x86_64-libnfs mingw-w64-ucrt-x86_64-libslirp mingw-w64-ucrt-x86_64-libssh mingw-w64-ucrt-x86_64-libxml2 mingw-w64-ucrt-x86_64-lzo2 mingw-w64-ucrt-x86_64-ncurses mingw-w64-ucrt-x86_64-ninja mingw-w64-ucrt-x86_64-nsis mingw-w64-ucrt-x86_64-pixman mingw-w64-ucrt-x86_64-pkgconf mingw-w64-ucrt-x86_64-python mingw-w64-ucrt-x86_64-sccache mingw-w64-ucrt-x86_64-snappy mingw-w64-ucrt-x86_64-spice mingw-w64-ucrt-x86_64-spice-protocol mingw-w64-ucrt-x86_64-toolchain mingw-w64-ucrt-x86_64-usbredir mingw-w64-ucrt-x86_64-virglrenderer mingw-w64-ucrt-x86_64-zlib mingw-w64-ucrt-x86_64-zstd patch zip | |
| - name: "ποΈ Install msys2 CLANG64" | |
| if: "${{ matrix.msystem == 'clang64' }}" | |
| uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # v2.30.0 | |
| with: | |
| msystem: ${{ matrix.msystem }} | |
| update: true | |
| # mingw-w64-clang-x86_64-virglrenderer is missing | |
| install: >- | |
| base-devel cmake git make mingw-w64-clang-x86_64-SDL2 mingw-w64-clang-x86_64-SDL2_image mingw-w64-clang-x86_64-binutils mingw-w64-clang-x86_64-capstone mingw-w64-clang-x86_64-cc mingw-w64-clang-x86_64-curl-winssl mingw-w64-clang-x86_64-cyrus-sasl mingw-w64-clang-x86_64-gtk-vnc mingw-w64-clang-x86_64-gtk3 mingw-w64-clang-x86_64-libcbor mingw-w64-clang-x86_64-libnfs mingw-w64-clang-x86_64-libslirp mingw-w64-clang-x86_64-libssh mingw-w64-clang-x86_64-libxml2 mingw-w64-clang-x86_64-lzo2 mingw-w64-clang-x86_64-ncurses mingw-w64-clang-x86_64-ninja mingw-w64-clang-x86_64-nsis mingw-w64-clang-x86_64-pixman mingw-w64-clang-x86_64-pkgconf mingw-w64-clang-x86_64-python mingw-w64-clang-x86_64-sccache mingw-w64-clang-x86_64-snappy mingw-w64-clang-x86_64-spice mingw-w64-clang-x86_64-spice-protocol mingw-w64-clang-x86_64-toolchain mingw-w64-clang-x86_64-usbredir mingw-w64-clang-x86_64-zlib mingw-w64-clang-x86_64-zstd patch zip | |
| - name: "π Configure checkout" | |
| run: git config --global core.autocrlf input | |
| - name: "π Checkout" | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| fetch-depth: 1 | |
| - name: "π Link tools" | |
| shell: msys2 {0} | |
| run: | | |
| mkdir -p /usr/local/bin | |
| ln -sf "$PROGRAMFILES\\7-Zip\\7z.exe" "/usr/local/bin/7z.exe" | |
| - name: "π Fetch sources" | |
| shell: msys2 {0} | |
| run: | | |
| wget -q "https://download.qemu.org/qemu-$QEMU_VERSION.tar.xz" | |
| wget -q "https://download.qemu.org/qemu-$QEMU_VERSION.tar.xz.sig" | |
| gpg --keyserver hkps://keys.openpgp.org:443 --recv-key CEACC9E15534EBABB82D3FA03353C9CEF108B584 | |
| gpg "qemu-$QEMU_VERSION.tar.xz.sig" | |
| 7z x -sdel -snld "qemu-$QEMU_VERSION.tar.xz" | |
| 7z x -sdel -snld "qemu-$QEMU_VERSION.tar" | |
| mv "qemu-$QEMU_VERSION" qemu-release | |
| cd qemu-release | |
| patch --binary -l -p 1 < ../patches/qemu/0001-9pfs-Add-9pfs-support-for-Windows-host.patch | |
| patch --binary -l -p 1 < ../patches/qemu/0002-win32-Add-ftruncate-function-detection.patch | |
| patch --binary -l -p 1 < ../patches/qemu/0003-accel-tcg-Remove-non-explicit-endian-cpu_ld-_code-wrappers.patch | |
| patch --binary -l -p 1 < ../patches/qemu/0004-thread-win32-replace-CRITICAL_SECTION-with-SRWLOCK.patch | |
| patch --binary -l -p 1 < ../patches/qemu/0005-whpx-i386-bug-fixes-feature-probing-and-CPUID.patch.patch | |
| patch --binary -l -p 1 < ../patches/qemu/0006-hw-q35-fix-VGA-text-console-with-SMM-disabled.patch | |
| patch --binary -l -p 1 < ../patches/qemu/0007-win32-Windows-specific-fixes-from-the-mailing-list.patch | |
| patch --binary -l -p 1 < ../patches/qemu/0008-whpx-i386-Some-more-changes.patch | |
| - name: "π οΈ Build QEMU" | |
| working-directory: qemu-release | |
| shell: msys2 {0} | |
| # --disable-spice --disable-spice-protocol is needed for no warnings in clang64 config | |
| # --enable-lto is postponed | |
| # --enable-u2f is postponed (no includes in msys2) | |
| run: | | |
| mkdir /usr/local/qemu | |
| ./configure --enable-gtk --enable-sdl --disable-user --disable-debug-info --disable-spice --disable-spice-protocol --extra-cflags="-D_FORTIFY_SOURCE=2" --prefix=/usr/local/qemu | |
| make | |
| make installer | |
| - name: "π¦ Pack QEMU" | |
| shell: msys2 {0} | |
| run: | | |
| mkdir -p qcw | |
| cp qemu-release/build/qemu-setup-*.exe qcw/ | |
| cd qcw | |
| ls | xargs -I fn mv fn ${{ matrix.msystem }}-fn | |
| find . -type f \( ! -iname "*.checksums" \) -exec sha256sum -b {} \; > sha.checksums | |
| find . -type f \( ! -iname "*.checksums" \) -exec sha512sum -b {} \; >> sha.checksums | |
| cat sha.checksums | |
| - id: make_versions | |
| name: "π Export versions" | |
| shell: msys2 {0} | |
| run: | | |
| echo "qemu=$QEMU_VERSION" >> "$GITHUB_OUTPUT" | |
| - name: "π Upload artifact" | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: qcw-qemu-${{ matrix.msystem }} | |
| path: qcw |