Skip to content

Commit

Permalink
Merge pull request #83 from greatscottgadgets/windows-ci
Browse files Browse the repository at this point in the history
Add Windows to CI matrix
  • Loading branch information
miek authored Jun 10, 2024
2 parents e74cc72 + c0b27be commit 8120c1e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ['macos-latest', 'ubuntu-22.04']
os: ['macos-latest', 'ubuntu-22.04', 'windows-latest']
rust: ['stable', '1.57']

runs-on: ${{ matrix.os }}
Expand All @@ -63,6 +63,26 @@ jobs:
run: brew install gtk4 pkg-config
if: matrix.os == 'macos-latest'

- name: Install dependencies (Windows)
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 01f602195983451bc83e72f4214af2cbc495aa94 # 2024.05.24 release
runVcpkgInstall: true
doNotCache: false
if: matrix.os == 'windows-latest'

- name: Set PKG_CONFIG (Windows)
run: echo "PKG_CONFIG=$env:VCPKG_DEFAULT_BINARY_CACHE/../vcpkg_installed/x64-windows/tools/pkgconf/pkgconf.exe" | Out-File -FilePath $env:GITHUB_ENV -Append
if: matrix.os == 'windows-latest'

- name: Set PKG_CONFIG_PATH (Windows)
run: echo "PKG_CONFIG_PATH=$env:VCPKG_DEFAULT_BINARY_CACHE/../vcpkg_installed/x64-windows/lib/pkgconfig" | Out-File -FilePath $env:GITHUB_ENV -Append
if: matrix.os == 'windows-latest'

- name: Set PATH (Windows)
run: echo "$env:VCPKG_DEFAULT_BINARY_CACHE/../vcpkg_installed/x64-windows/bin" | Out-File -FilePath $env:GITHUB_PATH -Append
if: matrix.os == 'windows-latest'

- uses: Swatinem/rust-cache@v2

- name: Build
Expand Down
3 changes: 3 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"dependencies": ["gtk", "pkgconf"]
}

0 comments on commit 8120c1e

Please sign in to comment.