Skip to content

Commit

Permalink
Simplify vcpkg path usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
martinling committed Jun 14, 2024
1 parent 57ff4cf commit 0d3ecb6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ jobs:
rust: ['stable', '1.57']

runs-on: ${{ matrix.os }}

env:
VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg/installed

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
Expand All @@ -72,15 +76,15 @@ jobs:
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
run: echo "PKG_CONFIG=$env:VCPKG_INSTALLED_DIR/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
run: echo "PKG_CONFIG_PATH=$env:VCPKG_INSTALLED_DIR/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
run: echo "$env:VCPKG_INSTALLED_DIR/x64-windows/bin" | Out-File -FilePath $env:GITHUB_PATH -Append
if: matrix.os == 'windows-latest'

- uses: Swatinem/rust-cache@v2
Expand Down

0 comments on commit 0d3ecb6

Please sign in to comment.