Skip to content

Commit

Permalink
Add github actions cache
Browse files Browse the repository at this point in the history
  • Loading branch information
michalchecinski committed Apr 16, 2024
1 parent bf0fcd9 commit 1529492
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/build-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@ jobs:
brew install nlohmann-json
brew install boost
- name: Cache vcpkg
if: runner.os == 'Windows'
uses: actions/cache@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
path: C:/vcpkg/
key: vcpkg-${{ runner.os }}-${{ matrix.settings.target }}
restore-keys: |
vcpkg-${{ runner.os }}-
vcpkg-
- name: Export GitHub Actions cache environment variables
if: runner.os == 'Windows'
uses: actions/github-script@v6
Expand All @@ -64,7 +74,7 @@ jobs:
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install libraries for Windows
if: runner.os == 'Windows'
if: runner.os == 'Windows' && steps.cache.outputs.cache-hit != 'true'
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
run: |
Expand All @@ -85,6 +95,7 @@ jobs:
path: languages/cpp/include

- name: List includes
if: runner.os == 'Windows'
run: |
ls languages/cpp/include
Get-Acl languages/cpp/include/* | Format-List
Expand Down

0 comments on commit 1529492

Please sign in to comment.