Skip to content

Commit 080c28d

Browse files
Use a vckpg binary cache on Windows
1 parent f09182e commit 080c28d

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,17 @@ jobs:
9797
build-windows:
9898
name: Build & Test (Windows, VS 2022)
9999
strategy:
100+
fail-fast: false
100101
matrix:
101102
arch: [x86, amd64, arm64]
102103
runs-on: windows-2022
103104
steps:
104105
- *checkout
106+
- name: Prepare Caches
107+
uses: actions/cache@v4
108+
with:
109+
path: _build/_cache
110+
key: msvc-${{matrix.arch}}
105111
- name: Build & Test
106112
shell: pwsh
107113
# 17.* select VS 2022

tools/ci.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ $this_dir = $PSScriptRoot
2727

2828
$root = Split-Path -Parent $this_dir
2929

30+
# Set the directory where vcpkg will store its binary cache artifacts. This can
31+
# be persisted between CI runs
32+
$env:VCPKG_DEFAULT_BINARY_CACHE = "$root/_build/_cache/vcpkg"
33+
[void](New-Item -ItemType Directory $env:VCPKG_DEFAULT_BINARY_CACHE -Force)
34+
3035
Write-Verbose "Loading uv environment..."
3136
$uv_env = Get-UvEnvironment -ArgumentList "--group=build"
3237
Write-Verbose "Loading MSVS environment..."

0 commit comments

Comments
 (0)