Keep sccache server alive during long jobs
This commit is contained in:
@@ -97,6 +97,7 @@ runs:
|
|||||||
echo "enabled=true" >> "$GITHUB_OUTPUT"
|
echo "enabled=true" >> "$GITHUB_OUTPUT"
|
||||||
echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV"
|
echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV"
|
||||||
echo "SCCACHE_IGNORE_SERVER_IO_ERROR=1" >> "$GITHUB_ENV"
|
echo "SCCACHE_IGNORE_SERVER_IO_ERROR=1" >> "$GITHUB_ENV"
|
||||||
|
echo "SCCACHE_IDLE_TIMEOUT=3600" >> "$GITHUB_ENV"
|
||||||
echo "SCCACHE_LOG=${SCCACHE_LOG:-warn}" >> "$GITHUB_ENV"
|
echo "SCCACHE_LOG=${SCCACHE_LOG:-warn}" >> "$GITHUB_ENV"
|
||||||
if [ -n '${{ inputs.sccache-bucket }}' ]; then
|
if [ -n '${{ inputs.sccache-bucket }}' ]; then
|
||||||
repo="${GITHUB_REPOSITORY:-unknown/repository}"
|
repo="${GITHUB_REPOSITORY:-unknown/repository}"
|
||||||
|
|||||||
@@ -68,4 +68,7 @@ Omit `sccache-bucket` to use the runner-local sccache cache:
|
|||||||
variables from workflow secrets.
|
variables from workflow secrets.
|
||||||
- `SCCACHE_IGNORE_SERVER_IO_ERROR=1` is set so a cache outage falls back to
|
- `SCCACHE_IGNORE_SERVER_IO_ERROR=1` is set so a cache outage falls back to
|
||||||
local compilation instead of failing the build.
|
local compilation instead of failing the build.
|
||||||
|
- `SCCACHE_IDLE_TIMEOUT=3600` keeps the server alive across long build/test
|
||||||
|
steps, which matters when the setup step has S3 credentials scoped only to
|
||||||
|
that step.
|
||||||
- Add `sccache --show-stats` after build/test steps to inspect cache hit rates.
|
- Add `sccache --show-stats` after build/test steps to inspect cache hit rates.
|
||||||
|
|||||||
Reference in New Issue
Block a user