diff options
author | Hiroshi SHIBATA <[email protected]> | 2024-06-21 14:42:22 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2024-06-21 18:25:03 +0900 |
commit | bf061ce6fea774f9d400d7cc06386c7bccb927d5 (patch) | |
tree | 51c633c6826da9bbc0b4e40dc56250c28246d58c | |
parent | ac9e84df3d0b06e62498aafbca99e8f8475ec142 (diff) |
Use the official way for binary cache with vcpkg
https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-actions-cache
-rw-r--r-- | .github/workflows/windows.yml | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index acd257024d..2ed3601cce 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -97,25 +97,18 @@ jobs: bundler: none windows-toolchain: none - - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 + - name: Export GitHub Actions cache environment variables + uses: actions/github-script@v7 with: - path: C:\vcpkg\downloads - key: ${{ runner.os }}-vcpkg-download-${{ env.OS_VER }}-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-vcpkg-download-${{ env.OS_VER }}- - ${{ runner.os }}-vcpkg-download- - - - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 - with: - path: C:\vcpkg\installed - key: ${{ runner.os }}-vcpkg-installed-${{ env.OS_VER }}-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-vcpkg-installed-${{ env.OS_VER }}- - ${{ runner.os }}-vcpkg-installed- + script: | + core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); + core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - name: Install libraries with vcpkg run: | vcpkg --triplet x64-windows install gmp libffi libyaml openssl zlib + env: + VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" - name: Install libraries with scoop run: | |