From 9cb46fadb4ab9bd2a6a5ca361f6e9232ba906bf7 Mon Sep 17 00:00:00 2001 From: Silvio Tomatis Date: Sun, 8 Dec 2024 11:48:57 +0100 Subject: [PATCH] ci: Update GitHub Actions workflow for Windows build with MSYS2 --- .github/workflows/build.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0bdb79a..8912c65 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -297,12 +297,22 @@ jobs: pkg-config --debug --print-errors --cflags --libs glib-2.0 pkg-config --debug --print-errors --cflags --libs gtk4 libadwaita-1 shell: pwsh - - name: Build + + - name: Set up MSYS2 + uses: msys2/setup-msys2@v2 + with: + update: true + install: mingw-w64-ucrt-x86_64-toolchain mingw-w64-ucrt-x86_64-gtk4 pkg-config + + - name: Install dependencies + shell: msys2 {0} run: | - $arch = "${{ matrix.arch }}" - $target = if ($arch -eq "x64") { "x86_64-pc-windows-msvc" } else { "aarch64-pc-windows-msvc" } - cargo build --release --target $target - shell: pwsh + pacman -S --noconfirm mingw-w64-ucrt-x86_64-gtk4 + echo "PKG_CONFIG_PATH=/ucrt64/lib/pkgconfig" >> $GITHUB_ENV + echo "PKG_CONFIG_LIBDIR=/ucrt64/lib/pkgconfig" >> $GITHUB_ENV + - name: Build + shell: msys2 {0} + run: cargo build --release - name: Package run: | mkdir aardvark-${{ matrix.arch }}