diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 4c8271d..2b076de 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -67,16 +67,16 @@ jobs: with: submodules: recursive - - name: Export GitHub Actions cache environment variables - uses: actions/github-script@v7 + - name: Restore vcpkg cache + id: vcpkg-cache + uses: TAServers/vcpkg-cache@v3 with: - script: | - core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); - core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); + token: ${{secrets.GITHUB_TOKEN}} - name: Install Dependencies 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 # setup vs env diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2a1391..81cdb7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -140,16 +140,16 @@ jobs: with: submodules: recursive - - name: Export GitHub Actions cache environment variables - uses: actions/github-script@v7 + - name: Restore vcpkg cache + id: vcpkg-cache + uses: TAServers/vcpkg-cache@v3 with: - script: | - core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); - core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); + token: ${{secrets.GITHUB_TOKEN}} - name: Install Dependencies 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 # setup vs env