Make one successful win build #48
Workflow file for this run
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
on: | |
push: | |
pull_request: | |
name: CI | |
# Note: Windows ARM64 builds are currently disabled as GTK4 and its dependencies | |
# are not yet available for this platform in vcpkg | |
jobs: | |
windows: | |
name: "Windows" | |
runs-on: windows-latest | |
# Only build for x64 since GTK4 is not available for Windows ARM64 yet | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [x64] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: moonrepo/setup-rust@v1 | |
- name: Install target | |
if: matrix.arch == 'arm64' | |
run: rustup target add aarch64-pc-windows-msvc | |
- name: Setup Windows build variables | |
run: | | |
$arch = "${{ matrix.arch }}" | |
$triplet = if ($arch -eq "x64") { "x64-windows" } else { "arm64-windows" } | |
echo "VCPKG_TRIPLET=$triplet" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
echo "VCPKG_ROOT=C:\vcpkg" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
shell: pwsh | |
# Cache vcpkg packages | |
- name: Cache vcpkg | |
uses: actions/cache@v3 | |
with: | |
path: | | |
C:\vcpkg\installed | |
C:\vcpkg\packages | |
key: vcpkg-${{ matrix.arch }}-${{ hashFiles('**/vcpkg.json', '.github/workflows/build.yml') }} | |
restore-keys: | | |
vcpkg-${{ matrix.arch }}- | |
- name: Install GTK4 and dependencies | |
run: | | |
Write-Host "Installing GTK4 and dependencies for $env:VCPKG_TRIPLET..." | |
# Only install if not found in cache | |
vcpkg install pkgconf:$env:VCPKG_TRIPLET | |
vcpkg install glib:$env:VCPKG_TRIPLET | |
vcpkg install gtk4:$env:VCPKG_TRIPLET | |
vcpkg install libadwaita:$env:VCPKG_TRIPLET | |
shell: pwsh |