diff --git a/.gitea/actions/rust-cache/action.yml b/.gitea/actions/rust-cache/action.yml index 73771e4..e9e1f20 100644 --- a/.gitea/actions/rust-cache/action.yml +++ b/.gitea/actions/rust-cache/action.yml @@ -97,6 +97,7 @@ runs: echo "enabled=true" >> "$GITHUB_OUTPUT" echo "RUSTC_WRAPPER=sccache" >> "$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" if [ -n '${{ inputs.sccache-bucket }}' ]; then repo="${GITHUB_REPOSITORY:-unknown/repository}" diff --git a/README.md b/README.md index 31cd9ad..2f52cd4 100644 --- a/README.md +++ b/README.md @@ -68,4 +68,7 @@ Omit `sccache-bucket` to use the runner-local sccache cache: variables from workflow secrets. - `SCCACHE_IGNORE_SERVER_IO_ERROR=1` is set so a cache outage falls back to 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.