diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e3a57339..03f41de5 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,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: 261dd6831673d3b07e5118261f7e161a21d1a759 + 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 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"] +}