Skip to content

Commit

Permalink
Add Windows to CI matrix.
Browse files Browse the repository at this point in the history
  • Loading branch information
martinling committed May 17, 2024
1 parent 9331bda commit 0a10442
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .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,7 +63,25 @@ jobs:
run: brew install gtk4 pkg-config
if: matrix.os == 'macos-latest'

- uses: Swatinem/rust-cache@v2
- name: Install dependencies (Windows)
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: c8696863d371ab7f46e213d8f5ca923c4aef2a00
runVcpkgInstall: true
doNotCache: false
if: matrix.os == 'windows-latest'

- name: Set PKG_CONFIG (Windows)
run: echo ('PKG_CONFIG=' + $env:VCPKG_ROOT + '\installed\x64-windows\tools\pkgconf\pkgconf.exe') >> $env:GITHUB_ENV
if: matrix.os == 'windows-latest'

- name: Set PKG_CONFIG_PATH (Windows)
run: echo ('PKG_CONFIG_PATH=' + $env:VCPKG_ROOT + '\installed\x64-windows\lib\pkgconfig') >> $env:GITHUB_ENV
if: matrix.os == 'windows-latest'

- name: Set PATH (Windows)
run: echo ('PATH=' + $env:PATH + ';' + $env:VCPKG_ROOT + '\installed\x64-windows\bin') >> $env:GITHUB_ENV
if: matrix.os == 'windows-latest'

- name: Build
uses: actions-rs/cargo@v1
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 0a10442

Please sign in to comment.