Skip to content

Commit be94afd

Browse files
authored
feat(checks-rs): plumb kache_github_cache input to kache-action (#113)
kache-action falls back to GitHub Actions cache when no S3 remote is configured (github-cache defaults true). On persistent self-hosted runners the on-disk kache store already survives between runs, so the multi-GB save/restore round-trips to the GH cache backend are pure overhead (observed: a 10+ minute 'Post Setup kache' upload after a cold build). New boolean input kache_github_cache (default true — no behavior change for existing callers) passed to both kache-action invocations; self-hosted callers set it false for a purely local store.
1 parent 11e886d commit be94afd

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/_checks-rs.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ on:
163163
description: "Enable Rust compilation caching via kache"
164164
type: boolean
165165
default: false
166+
kache_github_cache:
167+
description: "Persist the kache store via GitHub Actions cache when no S3 remote is configured. Set false on persistent self-hosted runners: their on-disk store survives between runs, so the multi-GB save/restore round-trips to the GH cache backend are pure overhead."
168+
type: boolean
169+
default: true
166170
rust_debuginfo:
167171
description: "CARGO_PROFILE_DEV_DEBUG for check/test builds (coverage builds are exempt). Full debuginfo dominates target size; the default keeps file:line backtraces at a fraction of the disk. Set 'full' to restore cargo's default. Must be a valid cargo `profile.debug` value."
168172
type: string
@@ -351,10 +355,13 @@ jobs:
351355
s3-region: ${{ inputs.cache_region }}
352356
s3-access-key-id: ${{ secrets.cache_access_key_id }}
353357
s3-secret-access-key: ${{ secrets.cache_secret_access_key }}
358+
github-cache: ${{ inputs.kache_github_cache }}
354359

355360
- name: Setup Rust cache
356361
if: inputs.cache_cargo && !inputs.use_rust_cache && steps.cache-control.outputs.enabled != 'false'
357362
uses: kunobi-ninja/kache-action@v1
363+
with:
364+
github-cache: ${{ inputs.kache_github_cache }}
358365

359366
- name: Install cargo-tarpaulin for coverage
360367
if: inputs.enable_coverage

0 commit comments

Comments
 (0)