ci: add vcpkg cache

This commit is contained in:
2026-07-17 14:22:34 +08:00
parent 0c8073d71d
commit 116dd98712
2 changed files with 15 additions and 4 deletions

View File

@@ -27,7 +27,9 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
env:
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/.vcpkg-cache
VCPKG_BINARY_SOURCES: clear;files,${{ github.workspace }}/.vcpkg-cache,readwrite
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -48,7 +50,13 @@ jobs:
- name: Setup MSVC - name: Setup MSVC
if: matrix.platform == 'windows' if: matrix.platform == 'windows'
uses: ilammy/msvc-dev-cmd@v1 uses: ilammy/msvc-dev-cmd@v1
- name: Cache vcpkg
uses: actions/cache@v4
with:
path: .vcpkg-cache
key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json') }}
restore-keys: |
${{ runner.os }}-vcpkg-
- name: Bootstrap vcpkg - name: Bootstrap vcpkg
run: | run: |
git clone https://github.com/microsoft/vcpkg.git git clone https://github.com/microsoft/vcpkg.git

View File

@@ -5,7 +5,10 @@
"openal-soft", "openal-soft",
"harfbuzz", "harfbuzz",
"freetype", "freetype",
"sdl3" {
"name": "sdl3",
"default-features": false
}
], ],
"builtin-baseline": "a0400024711b283056538ac19ced80b91a83c24c" "builtin-baseline": "a0400024711b283056538ac19ced80b91a83c24c"
} }