Skip to content

Commit a97b4b2

Browse files
Try better windows cache
1 parent 2bad7a8 commit a97b4b2

2 files changed

Lines changed: 5 additions & 12 deletions

File tree

.github/workflows/builds.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ env:
2121
# vcpkg binary caching for Windows. The x-gha backend was removed from vcpkg,
2222
# so use vcpkg's files provider and persist that directory with actions/cache.
2323
VCPKG_GIT_COMMIT: fb87e2bb3fe69e16c224989acb5a61349166c782
24-
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/.vcpkg-binary-cache
24+
VCPKG_BINARY_CACHE_DIR: ${{ github.workspace }}/.vcpkg-binary-cache
2525
VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}/.vcpkg-binary-cache,readwrite"
2626
VCPKG_DEFAULT_TRIPLET: x64-windows-static-md
2727
VCPKG_DEFAULT_HOST_TRIPLET: x64-windows-static-md
@@ -88,7 +88,7 @@ jobs:
8888
id: cache-vcpkg-binary
8989
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
9090
with:
91-
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
91+
path: ${{ env.VCPKG_BINARY_CACHE_DIR }}
9292
key: ${{ runner.os }}-${{ matrix.name }}-vcpkg-binary-${{ env.VCPKG_TARGET_TRIPLET }}-${{ env.VCPKG_GIT_COMMIT }}-${{ hashFiles('vcpkg.json') }}
9393
restore-keys: |
9494
${{ runner.os }}-${{ matrix.name }}-vcpkg-binary-${{ env.VCPKG_TARGET_TRIPLET }}-${{ env.VCPKG_GIT_COMMIT }}-
@@ -208,7 +208,7 @@ jobs:
208208
if: runner.os == 'Windows' && steps.cache-vcpkg-binary.outputs.cache-hit != 'true'
209209
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
210210
with:
211-
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
211+
path: ${{ env.VCPKG_BINARY_CACHE_DIR }}
212212
key: ${{ runner.os }}-${{ matrix.name }}-vcpkg-binary-${{ env.VCPKG_TARGET_TRIPLET }}-${{ env.VCPKG_GIT_COMMIT }}-${{ hashFiles('vcpkg.json') }}
213213

214214
# ---------- Smoke test cpp-example-collection binaries ----------

.github/workflows/tests.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ env:
2222
# was removed from vcpkg, so use vcpkg's files provider and persist that
2323
# directory with actions/cache.
2424
VCPKG_GIT_COMMIT: fb87e2bb3fe69e16c224989acb5a61349166c782
25-
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/.vcpkg-binary-cache
25+
VCPKG_BINARY_CACHE_DIR: ${{ github.workspace }}/.vcpkg-binary-cache
2626
VCPKG_BINARY_SOURCES: "clear;files,${{ github.workspace }}/.vcpkg-binary-cache,readwrite"
2727
VCPKG_DEFAULT_TRIPLET: x64-windows-static-md
2828
VCPKG_DEFAULT_HOST_TRIPLET: x64-windows-static-md
@@ -88,7 +88,7 @@ jobs:
8888
id: cache-vcpkg-binary
8989
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
9090
with:
91-
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
91+
path: ${{ env.VCPKG_BINARY_CACHE_DIR }}
9292
key: ${{ runner.os }}-${{ matrix.name }}-vcpkg-binary-${{ env.VCPKG_TARGET_TRIPLET }}-${{ env.VCPKG_GIT_COMMIT }}-${{ hashFiles('vcpkg.json') }}
9393
restore-keys: |
9494
${{ runner.os }}-${{ matrix.name }}-vcpkg-binary-${{ env.VCPKG_TARGET_TRIPLET }}-${{ env.VCPKG_GIT_COMMIT }}-
@@ -200,13 +200,6 @@ jobs:
200200
path: client-sdk-rust/target/
201201
key: ${{ runner.os }}-${{ matrix.name }}-cargo-target-${{ steps.rust_sha.outputs.sha }}
202202

203-
- name: Save vcpkg binary cache
204-
if: runner.os == 'Windows' && steps.cache-vcpkg-binary.outputs.cache-hit != 'true'
205-
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
206-
with:
207-
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
208-
key: ${{ runner.os }}-${{ matrix.name }}-vcpkg-binary-${{ env.VCPKG_TARGET_TRIPLET }}-${{ env.VCPKG_GIT_COMMIT }}-${{ hashFiles('vcpkg.json') }}
209-
210203
# ---------- Run unit tests ----------
211204
- name: Run unit tests (Unix)
212205
if: runner.os != 'Windows'

0 commit comments

Comments
 (0)