diff --git a/.github/workflows/release-macos.yml b/.github/workflows/release-macos.yml --- a/.github/workflows/release-macos.yml +++ b/.github/workflows/release-macos.yml @@ -32,6 +32,14 @@ jobs: - name: Enable Rust cache uses: Swatinem/rust-cache@v2 + - name: Setup vcpkg caching + uses: actions/github-script@v6 + with: + script: | + core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); + core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); + core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite') + - name: Install dependencies env: HOMEBREW_NO_AUTO_UPDATE: 1 @@ -47,20 +55,6 @@ jobs: cargo install dump_syms echo "::endgroup::" - - name: Prepare cache key - id: key - run: | - echo "image=$ImageOS-$ImageVersion" >> $GITHUB_OUTPUT - - - name: Enable vcpkg cache - uses: actions/cache@v3 - with: - path: /usr/local/share/vcpkg/installed - key: ${{ steps.key.outputs.image }}-vcpkg-release-1 # Increase the number whenever dependencies are modified - restore-keys: | - ${{ steps.key.outputs.image }}-vcpkg-release - ${{ steps.key.outputs.image }}-vcpkg-x64 - - name: Prepare vcpkg run: | vcpkg install \