Skip to content

Commit

Permalink
CI: Enable vcpkg to use GitHub Actions cache
Browse files Browse the repository at this point in the history
  • Loading branch information
miller-alex committed Mar 31, 2024
1 parent cc781e2 commit 511a524
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,19 @@ jobs:
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: 'Environment setup (Windows)'
if: ${{ runner.os == 'Windows' }}
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
core.exportVariable('CMAKE_TC_ARG', '-DCMAKE_TOOLCHAIN_FILE=' + (process.env.VCPKG_INSTALLATION_ROOT || '') + '\\scripts\\buildsystems\\vcpkg.cmake');
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite');
- name: 'Install dependencies: zlib (Windows)'
if: ${{ runner.os == 'Windows' }}
run: |
vcpkg install zlib:x64-windows
$cmtc = "CMAKE_TC_ARG=-DCMAKE_TOOLCHAIN_FILE=" + $env:VCPKG_INSTALLATION_ROOT + "\scripts\buildsystems\vcpkg.cmake"
echo $cmtc >> $env:GITHUB_ENV
- name: 'Install test dependencies: nihtest'
run: |
pip install nihtest
Expand Down

0 comments on commit 511a524

Please sign in to comment.