Skip to content

Commit 32de5d9

Browse files
committed
Backport usage of vcpkg x-gha cache.
1 parent ed24238 commit 32de5d9

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,8 @@ jobs:
290290
build-macos:
291291
name: build-macos-${{ matrix.arch }}
292292
runs-on: ${{ (matrix.arch == 'arm64' && 'macos-14') || 'macos-13' }}
293+
env:
294+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
293295

294296
strategy:
295297
fail-fast: false
@@ -321,12 +323,12 @@ jobs:
321323
brew install [email protected]
322324
ln -s "$(brew --prefix [email protected])/bin/python3" "$(brew --prefix [email protected])/bin/python"
323325
324-
- name: Cache - vcpkg
325-
uses: actions/cache@v4
326+
- name: Export GitHub Actions cache environment variables
327+
uses: actions/github-script@v7
326328
with:
327-
key: ${{ runner.os }}-vcpkg-0
328-
path: |
329-
$HOME/.cache/vcpkg/archives
329+
script: |
330+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
331+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
330332
331333
- name: Build
332334
run: |

0 commit comments

Comments
 (0)