Prepare QCW QEMU (from TarBall sources) #46
This file contains 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 | |
env: | |
QEMU_VERSION: 9.1.0 | |
MSYS: "winsymlinks:native" | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: "ποΈ Install msys2" | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: UCRT64 | |
update: true | |
install: >- | |
base-devel | |
bison | |
diffutils | |
flex | |
git | |
grep | |
make | |
sed | |
unzip | |
mingw-w64-ucrt-x86_64-binutils | |
mingw-w64-ucrt-x86_64-capstone | |
mingw-w64-ucrt-x86_64-ccache | |
mingw-w64-ucrt-x86_64-curl-gnutls | |
mingw-w64-ucrt-x86_64-cyrus-sasl | |
mingw-w64-ucrt-x86_64-dtc | |
mingw-w64-ucrt-x86_64-gcc | |
mingw-w64-ucrt-x86_64-glib2 | |
mingw-w64-ucrt-x86_64-gnutls | |
mingw-w64-ucrt-x86_64-gtk3 | |
mingw-w64-ucrt-x86_64-libgcrypt | |
mingw-w64-ucrt-x86_64-libjpeg-turbo | |
mingw-w64-ucrt-x86_64-libnfs | |
mingw-w64-ucrt-x86_64-libpng | |
mingw-w64-ucrt-x86_64-libslirp | |
mingw-w64-ucrt-x86_64-libssh | |
mingw-w64-ucrt-x86_64-libtasn1 | |
mingw-w64-ucrt-x86_64-libusb | |
mingw-w64-ucrt-x86_64-lzo2 | |
mingw-w64-ucrt-x86_64-meson | |
mingw-w64-ucrt-x86_64-nettle | |
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-SDL2 | |
mingw-w64-ucrt-x86_64-SDL2_image | |
mingw-w64-ucrt-x86_64-snappy | |
mingw-w64-ucrt-x86_64-spice | |
mingw-w64-ucrt-x86_64-toolchain | |
mingw-w64-ucrt-x86_64-usbredir | |
mingw-w64-ucrt-x86_64-virglrenderer | |
mingw-w64-ucrt-x86_64-zstd | |
- name: "ποΈ Install tools" | |
uses: crazy-max/ghaction-chocolatey@v3 | |
with: | |
args: install 7zip.install | |
- name: "π Configure checkout" | |
run: git config --global core.autocrlf input | |
- name: "π Checkout" | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: "π Link tools" | |
shell: msys2 {0} | |
run: | | |
mkdir -p /usr/local/bin | |
ln -sf "/c/Program Files/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 keys.openpgp.org --recv-key CEACC9E15534EBABB82D3FA03353C9CEF108B584 | |
gpg "qemu-$QEMU_VERSION.tar.xz.sig" | |
7z x "qemu-$QEMU_VERSION.tar.xz" | |
7z x "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-WHPX-Add-support-for-device-backed-memory-regions.patch | |
patch --binary -l -p 1 < ../patches/qemu/0003-Windows-installer-keep-dependency-cache.patch | |
- name: "π οΈ Build QEMU" | |
working-directory: qemu-release | |
shell: msys2 {0} | |
run: | | |
./configure --enable-gtk --enable-sdl --disable-debug-info | |
make | |
make installer | |
- name: "π¦ Pack QEMU" | |
shell: msys2 {0} | |
run: | | |
mkdir -p qcw | |
cp qemu-release/build/qemu-setup-*.exe qcw/ | |
cd qcw | |
find . -type f \( ! -iname "*.checksums" \) -exec sha256sum -b {} \; > sha.checksums | |
find . -type f \( ! -iname "*.checksums" \) -exec sha512sum -b {} \; >> sha.checksums | |
cat sha.checksums | |
- name: "π Upload artifact" | |
uses: actions/upload-artifact@v4 | |
with: | |
name: qcw-qemu | |
path: qcw |