Files
luma/.github/workflows/qemu.yml
Ole André Vadla Ravnås 4767b7ded0 ci: Build QEMU on Windows from source
The emulators were downloaded from a qemu-<build> release built in
MSYS2 against MinGW's GLib and pixman, so the installer carried
those beside the vcpkg ones the app links: two copies of GLib and
friends.

Build them in the Windows job instead, against the vcpkg prefix,
cached like the other dependencies on the QEMU version and the
build script. QEMU builds under MinGW and nowhere else on Windows,
but UCRT64 and CLANGARM64 sit on the same C runtime as the MSVC
DLLs they now link, so a descriptor means the same on both sides.
The x86_64 environment moves from MINGW64 for that reason.

The emulators live a directory below the app, where nothing looks
for its GLib on its own, so they are started with the installation
root on PATH.

Windows drops out of the QEMU workflow, which macOS still uses.
2026-09-15 13:45:03 +02:00

65 lines
1.6 KiB
YAML

name: QEMU
on:
push:
tags:
- qemu-*
pull_request:
paths:
- scripts/build-qemu-macos.sh
- .github/workflows/qemu.yml
workflow_dispatch:
env:
QEMU_VERSION: "11.1.0"
jobs:
macos:
runs-on: ${{ matrix.runner }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
include:
- arch: arm64
runner: macos-26
- arch: x86_64
runner: macos-15-intel
steps:
- name: Check out repo
uses: actions/checkout@v7
- name: Install dependencies
run: brew install glib pixman pkgconf ninja
- name: Resolve build name
run: |
case "$GITHUB_REF" in
refs/tags/qemu-*)
echo "QEMU_BUILD=${GITHUB_REF#refs/tags/qemu-}" >> "$GITHUB_ENV"
;;
*)
echo "QEMU_BUILD=$QEMU_VERSION-dev" >> "$GITHUB_ENV"
;;
esac
- name: Build QEMU
run: |
mkdir artifacts
scripts/build-qemu-macos.sh "$QEMU_VERSION" "$QEMU_BUILD" artifacts | tee artifacts.txt
- name: Upload archive
uses: actions/upload-artifact@v7
with:
name: qemu-${{ env.QEMU_BUILD }}-macos-${{ matrix.arch }}.zip
path: artifacts/qemu-${{ env.QEMU_BUILD }}-macos-${{ matrix.arch }}.zip
if-no-files-found: error
- name: Publish release
if: startsWith(github.ref, 'refs/tags/qemu-')
uses: softprops/action-gh-release@v2
with:
body_path: artifacts.txt
append_body: true
files: artifacts/qemu-${{ env.QEMU_BUILD }}-macos-${{ matrix.arch }}.zip