Skip to content

Commit 270da43

Browse files
committed
Add vcpkg caching.
1 parent 2c2ec89 commit 270da43

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ jobs:
4141
uses: actions/checkout@v4
4242
with:
4343
submodules: recursive
44+
- name: Cache vcpkg artifacts
45+
uses: actions/cache@v4
46+
with:
47+
path: "d:/.ezvcpkg"
48+
key: vcpkg-windows-${{ hashFiles('native~/vcpkg/ports/**/vcpkg.json', 'native~/vcpkg/triplets/**/*', 'native~/extern/*toolchain.cmake') }}-${{ hashFiles('native~/extern/cesium-native/CMakeLists.txt', 'native~/CMakeLists.txt') }}
49+
restore-keys: |
50+
vcpkg-windows-${{ hashFiles('native~/vcpkg/ports/**/vcpkg.json', 'native~/vcpkg/triplets/**/*', 'native~/extern/*toolchain.cmake') }}-
4451
- name: Install Ninja
4552
run: |
4653
choco install -y ninja
@@ -137,18 +144,19 @@ jobs:
137144
# Only allow a single macOS build at a time, for Unity licensing reasons
138145
concurrency: mac
139146
steps:
140-
# - name: Set XCode version
141-
# uses: maxim-lobanov/setup-xcode@v1
142-
# with:
143-
# xcode-version: "14.1"
144147
- name: Check out repository code
145148
uses: actions/checkout@v4
146149
with:
147150
submodules: recursive
151+
- name: Cache vcpkg artifacts
152+
uses: actions/cache@v4
153+
with:
154+
path: "~/.ezvcpkg"
155+
key: vcpkg-mac-${{ hashFiles('native~/vcpkg/ports/**/vcpkg.json', 'native~/vcpkg/triplets/**/*', 'native~/extern/*toolchain.cmake') }}-${{ hashFiles('native~/extern/cesium-native/CMakeLists.txt', 'native~/CMakeLists.txt') }}
156+
restore-keys: |
157+
vcpkg-mac-${{ hashFiles('native~/vcpkg/ports/**/vcpkg.json', 'native~/vcpkg/triplets/**/*', 'native~/extern/*toolchain.cmake') }}-
148158
- name: Install nasm
149159
uses: ilammy/[email protected]
150-
- name: Install jq
151-
run: brew install jq
152160
- name: Install Unity Hub
153161
run: |
154162
wget --quiet https://public-cdn.cloud.unity3d.com/hub/prod/UnityHubSetup.dmg

0 commit comments

Comments
 (0)