diff --git a/.github/workflows/sdk-wheels.yml b/.github/workflows/sdk-wheels.yml index 3cff4cb..74b3a2a 100644 --- a/.github/workflows/sdk-wheels.yml +++ b/.github/workflows/sdk-wheels.yml @@ -69,14 +69,17 @@ jobs: # the macOS runners), the whole build fails before compiling anything. Native builds # therefore start sccache themselves and drop the compiler cache if it does not come # up; only the manylinux containers keep the action input. sccache's GHA backend - # reads the two ACTIONS_* values, which shell steps do not get without this export. + # reads these ACTIONS_* values, which shell steps do not get without this export. + # ACTIONS_CACHE_SERVICE_V2 selects the current cache API; without it the backend + # falls back to the retired v1 endpoint and every lookup misses. - name: Expose the Actions cache credentials to sccache if: runner.os != 'Linux' uses: actions/github-script@v7 with: script: | - core.exportVariable('ACTIONS_RESULTS_URL', process.env.ACTIONS_RESULTS_URL || ''); - core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); + for (const name of ['ACTIONS_RESULTS_URL', 'ACTIONS_RUNTIME_TOKEN', 'ACTIONS_CACHE_URL', 'ACTIONS_CACHE_SERVICE_V2']) { + core.exportVariable(name, process.env[name] || ''); + } - name: Start sccache (best effort) if: runner.os != 'Linux' shell: bash @@ -210,14 +213,17 @@ jobs: # the macOS runners), the whole build fails before compiling anything. Native builds # therefore start sccache themselves and drop the compiler cache if it does not come # up; only the manylinux containers keep the action input. sccache's GHA backend - # reads the two ACTIONS_* values, which shell steps do not get without this export. + # reads these ACTIONS_* values, which shell steps do not get without this export. + # ACTIONS_CACHE_SERVICE_V2 selects the current cache API; without it the backend + # falls back to the retired v1 endpoint and every lookup misses. - name: Expose the Actions cache credentials to sccache if: runner.os != 'Linux' uses: actions/github-script@v7 with: script: | - core.exportVariable('ACTIONS_RESULTS_URL', process.env.ACTIONS_RESULTS_URL || ''); - core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); + for (const name of ['ACTIONS_RESULTS_URL', 'ACTIONS_RUNTIME_TOKEN', 'ACTIONS_CACHE_URL', 'ACTIONS_CACHE_SERVICE_V2']) { + core.exportVariable(name, process.env[name] || ''); + } - name: Start sccache (best effort) if: runner.os != 'Linux' shell: bash