@@ -290,8 +290,6 @@ jobs:
290
290
build-macos :
291
291
name : build-macos-${{ matrix.arch }}
292
292
runs-on : ${{ (matrix.arch == 'arm64' && 'macos-14') || 'macos-13' }}
293
- env :
294
- VCPKG_BINARY_SOURCES : " clear;x-gha,readwrite"
295
293
296
294
strategy :
297
295
fail-fast : false
@@ -312,14 +310,16 @@ jobs:
312
310
313
311
- name : Prepare - Install tools
314
312
run : |
315
- brew install automake autoconf-archive libtool ninja python-setuptools
313
+ brew install --quiet automake autoconf-archive libtool ninja python-setuptools
316
314
317
- - name : Export GitHub Actions cache environment variables
318
- uses : actions/github-script@v7
315
+ - name : Restore vcpkg cache
316
+ uses : actions/cache/restore@v4
317
+ id : restore-vcpkg-cache
319
318
with :
320
- script : |
321
- core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
322
- core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
319
+ path : ~/.cache/vcpkg/archives
320
+ key : vcpkg-cache-${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('vcpkg-custom/**', 'vcpkg.json', 'vcpkg-configuration.json') }}
321
+ restore-keys : |
322
+ vcpkg-cache-${{ runner.os }}-${{ matrix.arch }}-
323
323
324
324
- name : Build
325
325
run : |
@@ -348,6 +348,14 @@ jobs:
348
348
mkdir gen/artifacts
349
349
mv gen/Release/*.pkg gen/artifacts
350
350
351
+ - name : Save vcpkg cache
352
+ uses : actions/cache/save@v4
353
+ # Saves if the key changed (hashes on vcpkg/**, vcpkg.json, vcpkg-configuration.json)
354
+ if : steps.restore-vcpkg-cache.outputs.cache-hit != 'true'
355
+ with :
356
+ path : ~/.cache/vcpkg/archives
357
+ key : ${{ steps.restore-vcpkg-cache.outputs.cache-primary-key }}
358
+
351
359
- name : Upload installer
352
360
uses : actions/upload-artifact@v4
353
361
with :
0 commit comments