ci/cd vcpkg caching

This commit is contained in:
Green Sky
2025-08-06 17:13:00 +02:00
parent 93ff61d350
commit 6857e893a1
2 changed files with 12 additions and 12 deletions

View File

@@ -67,16 +67,16 @@ jobs:
with: with:
submodules: recursive submodules: recursive
- name: Export GitHub Actions cache environment variables - name: Restore vcpkg cache
uses: actions/github-script@v7 id: vcpkg-cache
uses: TAServers/vcpkg-cache@v3
with: with:
script: | token: ${{secrets.GITHUB_TOKEN}}
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install Dependencies - name: Install Dependencies
env: env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" VCPKG_FEATURE_FLAGS: "binarycaching"
VCPKG_BINARY_SOURCES: "clear;files,${{steps.vcpkg-cache.outputs.path}},readwrite"
run: vcpkg install pkgconf:x64-windows libsodium:x64-windows-static pthreads:x64-windows-static run: vcpkg install pkgconf:x64-windows libsodium:x64-windows-static pthreads:x64-windows-static
# setup vs env # setup vs env

View File

@@ -140,16 +140,16 @@ jobs:
with: with:
submodules: recursive submodules: recursive
- name: Export GitHub Actions cache environment variables - name: Restore vcpkg cache
uses: actions/github-script@v7 id: vcpkg-cache
uses: TAServers/vcpkg-cache@v3
with: with:
script: | token: ${{secrets.GITHUB_TOKEN}}
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install Dependencies - name: Install Dependencies
env: env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" VCPKG_FEATURE_FLAGS: "binarycaching"
VCPKG_BINARY_SOURCES: "clear;files,${{steps.vcpkg-cache.outputs.path}},readwrite"
run: vcpkg install pkgconf:x64-windows libsodium:x64-windows-static pthreads:x64-windows-static run: vcpkg install pkgconf:x64-windows libsodium:x64-windows-static pthreads:x64-windows-static
# setup vs env # setup vs env