From ab4e438cd5010910ec3784855b6384123d970217 Mon Sep 17 00:00:00 2001 From: Martin Ling Date: Mon, 8 Jan 2024 16:12:26 +0000 Subject: [PATCH] Add Windows to CI matrix. --- .github/workflows/rust.yml | 17 ++++++++++++++++- vcpkg.json | 3 +++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 vcpkg.json diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e3a57339..4bca63c2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -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 }} @@ -63,6 +63,21 @@ jobs: run: brew install gtk4 pkg-config if: matrix.os == 'macos-latest' + - name: Install dependencies (Windows) + uses: lukka/run-vcpkg@v11 + with: + vcpkgGitCommitId: c8696863d371ab7f46e213d8f5ca923c4aef2a00 + runVcpkgInstall: true + doNotCache: false + if: matrix.os == 'windows-latest' + + - name: Set environment (Windows) + run: | + echo "PKG_CONFIG=${env:VCPKG_INSTALLED_DIR}\\tools\\pkgconf\\pkgconf.exe" | Out-File -FilePath $env:GITHUB_ENV -Append + echo "PKG_CONFIG_PATH={$env:VCPKG_INSTALLED_DIR}\\lib\\pkgconfig" | Out-File -FilePath $env:GITHUB_ENV -Append + echo "PATH={$env:PATH};{$env:VCPKG_INSTALLED_DIR}\\bin" | Out-File -FilePath $env:GITHUB_ENV -Append + if: matrix.os == 'windows-latest' + - uses: Swatinem/rust-cache@v2 - name: Build diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 00000000..8e4b6b62 --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,3 @@ +{ + "dependencies": ["gtk", "pkgconf"] +}