Skip to content

Commit e71e646

Browse files
committed
ci: cache vcpkg binaries via files provider
1 parent 3a79b72 commit e71e646

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/build-toolchain.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,21 @@ jobs:
3232
runs-on: windows-2022
3333
timeout-minutes: 40
3434
env:
35-
VCPKG_BINARY_SOURCES: clear;x-gha,readwrite
35+
VCPKG_FILE_CACHE: ${{ github.workspace }}\vcpkg-bincache
36+
VCPKG_BINARY_SOURCES: clear;files,${{ env.VCPKG_FILE_CACHE }},readwrite
3637
VCPKG_FEATURE_FLAGS: manifests,versions,binarycaching
3738
steps:
3839
- name: Checkout Code
3940
uses: actions/checkout@v4
4041

42+
- name: Cache vcpkg binary artifacts
43+
uses: actions/cache@v4
44+
with:
45+
path: ${{ env.VCPKG_FILE_CACHE }}
46+
key: vcpkg-bincache-${{ runner.os }}-${{ hashFiles('vcpkg.json','vcpkg-lock.json') }}
47+
restore-keys: |
48+
vcpkg-bincache-${{ runner.os }}-
49+
4150
- name: Cache VC6 Installation
4251
if: startsWith(inputs.preset, 'vc6')
4352
id: cache-vc6

0 commit comments

Comments
 (0)