Skip to content

Commit

Permalink
ci: fixed unintentional using vcpkg system installation on Windows ru…
Browse files Browse the repository at this point in the history
…nners
  • Loading branch information
SNMetamorph committed Mar 11, 2024
1 parent d61ff65 commit 68f6ae4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/nightly-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Enables the vcpkg dependency graph integration.
VCPKG_FEATURE_FLAGS: dependencygraph
# Indicates the location of the vcpkg as a Git submodule of the project repository.
VCPKG_ROOT: ${{ github.workspace }}/external/vcpkg
# Tells vcpkg where binary packages are stored.
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/external/vcpkg/bincache
# Let's use GitHub Action cache as storage for the vcpkg Binary Caching feature.
VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite'
steps:
Expand Down Expand Up @@ -68,6 +64,14 @@ jobs:
with:
arch: ${{ matrix.devenv_arch }}

- name: Dynamically set VCPKG_ROOT environment variable
# We need this because previous step overwrites VCPKG_ROOT envvar on Windows runners
uses: actions/github-script@v6
with:
script: |
core.exportVariable('VCPKG_ROOT', `${github.workspace}/external/vcpkg`);
core.exportVariable('VCPKG_DEFAULT_BINARY_CACHE', `${github.workspace}/external/vcpkg/bincache`);
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
Expand All @@ -80,7 +84,7 @@ jobs:

- name: "Create directory '${{ env.VCPKG_DEFAULT_BINARY_CACHE }}'"
shell: bash
run: mkdir -p $VCPKG_DEFAULT_BINARY_CACHE
run: mkdir -p ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}

# Restore vcpkg from the GitHub Action cache service. Note that packages are restored by vcpkg's binary caching
# when it is being run afterwards by CMake.
Expand Down

0 comments on commit 68f6ae4

Please sign in to comment.