Skip to content

Prepare QCW QEMU (from TarBall sources) #39

Prepare QCW QEMU (from TarBall sources)

Prepare QCW QEMU (from TarBall sources) #39

name: Prepare QCW QEMU (from TarBall sources)
on: workflow_dispatch
env:
QEMU_VERSION: 9.0.1
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