Skip to content

Commit 83412c4

Browse files
committed
Use different way to cache vcpkg in CI
1 parent e22ddd5 commit 83412c4

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
@@ -312,12 +314,12 @@ jobs:
312314
run: |
313315
brew install automake autoconf-archive cmake libtool ninja
314316
315-
- name: Cache - vcpkg
316-
uses: actions/cache@v4
317+
- name: Export GitHub Actions cache environment variables
318+
uses: actions/github-script@v7
317319
with:
318-
key: ${{ runner.os }}-vcpkg-fb6-0
319-
path: |
320-
$HOME/.cache/vcpkg/archives
320+
script: |
321+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
322+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
321323
322324
- name: Build
323325
run: |

0 commit comments

Comments
 (0)