6464 description : " Timeout in minutes for the job"
6565 type : number
6666 default : 30
67- use_sccache :
68- description : " Enable sccache for Rust compilation caching"
67+ use_rust_cache :
68+ description : " Enable kache for Rust compilation caching"
6969 type : boolean
7070 default : false
71- sccache_bucket :
72- description : " S3-compatible bucket name for sccache (e.g., Cloudflare R2)"
71+ cache_bucket :
72+ description : " S3-compatible bucket name for cache (e.g., Cloudflare R2)"
7373 type : string
7474 default : " "
75- sccache_endpoint :
76- description : " S3-compatible endpoint URL for sccache "
75+ cache_endpoint :
76+ description : " S3-compatible endpoint URL for cache "
7777 type : string
7878 default : " "
79- sccache_region :
80- description : " S3 region for sccache "
79+ cache_region :
80+ description : " S3 region for cache "
8181 type : string
8282 default : " auto"
83- sccache_use_ssl :
84- description : " Use SSL/TLS for sccache S3 connection (set true for HTTPS endpoints)"
85- type : boolean
86- default : true
8783 system_deps_command :
8884 description : " Command to install system dependencies (e.g., 'apt-get update && apt-get install -y ...')"
8985 type : string
@@ -148,11 +144,11 @@ on:
148144 app_pem :
149145 description : " GitHub App PEM"
150146 required : false
151- sccache_access_key_id :
152- description : " AWS/S3 access key ID for sccache backend"
147+ cache_access_key_id :
148+ description : " AWS/S3 access key ID for cache backend"
153149 required : false
154- sccache_secret_access_key :
155- description : " AWS/S3 secret access key for sccache backend"
150+ cache_secret_access_key :
151+ description : " AWS/S3 secret access key for cache backend"
156152 required : false
157153
158154jobs :
@@ -209,14 +205,9 @@ jobs:
209205 HEAD_SHA : ${{ github.event.pull_request.head.sha }}
210206 HEAD_BRANCH_NAME : ${{ github.head_ref }}
211207
212- # sccache S3-compatible backend configuration (only if enabled)
213- SCCACHE_BUCKET : ${{ inputs.use_sccache && inputs.sccache_bucket || '' }}
214- SCCACHE_ENDPOINT : ${{ inputs.use_sccache && inputs.sccache_endpoint || '' }}
215- SCCACHE_REGION : ${{ inputs.use_sccache && inputs.sccache_region || 'auto' }}
216- SCCACHE_S3_USE_SSL : ${{ inputs.use_sccache && inputs.sccache_use_ssl && 'true' || 'false' }}
217- SCCACHE_CACHE_SIZE : 100G
218- AWS_ACCESS_KEY_ID : ${{ inputs.use_sccache && secrets.sccache_access_key_id || '' }}
219- AWS_SECRET_ACCESS_KEY : ${{ inputs.use_sccache && secrets.sccache_secret_access_key || '' }}
208+ # S3 credentials for runs-on/cache steps
209+ AWS_ACCESS_KEY_ID : ${{ inputs.cache_bucket != '' && secrets.cache_access_key_id || '' }}
210+ AWS_SECRET_ACCESS_KEY : ${{ inputs.cache_bucket != '' && secrets.cache_secret_access_key || '' }}
220211 permissions :
221212 contents : read
222213 id-token : write # Required for Workload Identity Federation
@@ -296,15 +287,15 @@ jobs:
296287 echo "Created .env.local file with $(grep -c "=" .env.local) environment variables"
297288
298289 - name : Cache Cargo registry
299- if : inputs.use_sccache && inputs.sccache_bucket != '' && steps.cache-control.outputs.enabled != 'false'
290+ if : inputs.use_rust_cache && inputs.cache_bucket != '' && steps.cache-control.outputs.enabled != 'false'
300291 uses : runs-on/cache@v4
301292 env :
302- RUNS_ON_S3_BUCKET_CACHE : ${{ inputs.sccache_bucket }}
293+ RUNS_ON_S3_BUCKET_CACHE : ${{ inputs.cache_bucket }}
303294 RUNS_ON_S3_FORCE_PATH_STYLE : " true"
304- AWS_ACCESS_KEY_ID : ${{ secrets.sccache_access_key_id }}
305- AWS_SECRET_ACCESS_KEY : ${{ secrets.sccache_secret_access_key }}
306- AWS_ENDPOINT_URL : ${{ inputs.sccache_endpoint }}
307- AWS_REGION : ${{ inputs.sccache_region }}
295+ AWS_ACCESS_KEY_ID : ${{ secrets.cache_access_key_id }}
296+ AWS_SECRET_ACCESS_KEY : ${{ secrets.cache_secret_access_key }}
297+ AWS_ENDPOINT_URL : ${{ inputs.cache_endpoint }}
298+ AWS_REGION : ${{ inputs.cache_region }}
308299 with :
309300 path : |
310301 ~/.cargo/registry/index
@@ -317,15 +308,15 @@ jobs:
317308 ${{ runner.os }}-cargo-
318309
319310 - name : Cache Next.js build
320- if : inputs.enable_nextjs_cache && inputs.sccache_bucket != '' && steps.cache-control.outputs.enabled != 'false'
311+ if : inputs.enable_nextjs_cache && inputs.cache_bucket != '' && steps.cache-control.outputs.enabled != 'false'
321312 uses : runs-on/cache@v4
322313 env :
323- RUNS_ON_S3_BUCKET_CACHE : ${{ inputs.sccache_bucket }}
314+ RUNS_ON_S3_BUCKET_CACHE : ${{ inputs.cache_bucket }}
324315 RUNS_ON_S3_FORCE_PATH_STYLE : " true"
325- AWS_ACCESS_KEY_ID : ${{ secrets.sccache_access_key_id }}
326- AWS_SECRET_ACCESS_KEY : ${{ secrets.sccache_secret_access_key }}
327- AWS_ENDPOINT_URL : ${{ inputs.sccache_endpoint }}
328- AWS_REGION : ${{ inputs.sccache_region }}
316+ AWS_ACCESS_KEY_ID : ${{ secrets.cache_access_key_id }}
317+ AWS_SECRET_ACCESS_KEY : ${{ secrets.cache_secret_access_key }}
318+ AWS_ENDPOINT_URL : ${{ inputs.cache_endpoint }}
319+ AWS_REGION : ${{ inputs.cache_region }}
329320 with :
330321 path : ${{ inputs.nextjs_cache_paths }}
331322 key : ${{ runner.os }}-nextjs-${{ github.sha }}
@@ -368,23 +359,23 @@ jobs:
368359 fi
369360
370361 - name : Get pnpm store directory
371- if : inputs.sccache_bucket != '' && steps.pm.outputs.pm_name == 'pnpm'
362+ if : inputs.cache_bucket != '' && steps.pm.outputs.pm_name == 'pnpm'
372363 id : pnpm-cache
373364 working-directory : ${{ inputs.working_directory }}
374365 shell : bash
375366 run : |
376367 echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
377368
378369 - name : Cache pnpm store
379- if : inputs.sccache_bucket != '' && steps.pm.outputs.pm_name == 'pnpm' && steps.pnpm-cache.outputs.STORE_PATH != '' && steps.cache-control.outputs.enabled != 'false'
370+ if : inputs.cache_bucket != '' && steps.pm.outputs.pm_name == 'pnpm' && steps.pnpm-cache.outputs.STORE_PATH != '' && steps.cache-control.outputs.enabled != 'false'
380371 uses : runs-on/cache@v4
381372 env :
382- RUNS_ON_S3_BUCKET_CACHE : ${{ inputs.sccache_bucket }}
373+ RUNS_ON_S3_BUCKET_CACHE : ${{ inputs.cache_bucket }}
383374 RUNS_ON_S3_FORCE_PATH_STYLE : " true"
384- AWS_ACCESS_KEY_ID : ${{ secrets.sccache_access_key_id }}
385- AWS_SECRET_ACCESS_KEY : ${{ secrets.sccache_secret_access_key }}
386- AWS_ENDPOINT_URL : ${{ inputs.sccache_endpoint }}
387- AWS_REGION : ${{ inputs.sccache_region }}
375+ AWS_ACCESS_KEY_ID : ${{ secrets.cache_access_key_id }}
376+ AWS_SECRET_ACCESS_KEY : ${{ secrets.cache_secret_access_key }}
377+ AWS_ENDPOINT_URL : ${{ inputs.cache_endpoint }}
378+ AWS_REGION : ${{ inputs.cache_region }}
388379 with :
389380 path : ${{ steps.pnpm-cache.outputs.STORE_PATH }}
390381 key : ${{ runner.os }}-pnpm-${{ github.ref_name }}
@@ -394,15 +385,15 @@ jobs:
394385 ${{ runner.os }}-pnpm-
395386
396387 - name : Cache Bun dependencies
397- if : inputs.sccache_bucket != '' && steps.pm.outputs.pm_name == 'bun' && steps.cache-control.outputs.enabled != 'false'
388+ if : inputs.cache_bucket != '' && steps.pm.outputs.pm_name == 'bun' && steps.cache-control.outputs.enabled != 'false'
398389 uses : runs-on/cache@v4
399390 env :
400- RUNS_ON_S3_BUCKET_CACHE : ${{ inputs.sccache_bucket }}
391+ RUNS_ON_S3_BUCKET_CACHE : ${{ inputs.cache_bucket }}
401392 RUNS_ON_S3_FORCE_PATH_STYLE : " true"
402- AWS_ACCESS_KEY_ID : ${{ secrets.sccache_access_key_id }}
403- AWS_SECRET_ACCESS_KEY : ${{ secrets.sccache_secret_access_key }}
404- AWS_ENDPOINT_URL : ${{ inputs.sccache_endpoint }}
405- AWS_REGION : ${{ inputs.sccache_region }}
393+ AWS_ACCESS_KEY_ID : ${{ secrets.cache_access_key_id }}
394+ AWS_SECRET_ACCESS_KEY : ${{ secrets.cache_secret_access_key }}
395+ AWS_ENDPOINT_URL : ${{ inputs.cache_endpoint }}
396+ AWS_REGION : ${{ inputs.cache_region }}
406397 with :
407398 path : ~/.bun/install/cache
408399 key : ${{ runner.os }}-bun-${{ hashFiles('bun.lockb', 'bun.lock') }}
@@ -416,11 +407,15 @@ jobs:
416407 mise run ci_postinstall
417408 fi
418409
419- - name : Setup sccache
420- if : inputs.use_sccache
421- uses : mozilla-actions/sccache -action@v0.0.9
410+ - name : Setup kache
411+ if : inputs.use_rust_cache
412+ uses : kunobi-ninja/kache -action@v1
422413 with :
423- version : " v0.12.0"
414+ s3-bucket : ${{ inputs.cache_bucket }}
415+ s3-endpoint : ${{ inputs.cache_endpoint }}
416+ s3-region : ${{ inputs.cache_region }}
417+ s3-access-key-id : ${{ secrets.cache_access_key_id }}
418+ s3-secret-access-key : ${{ secrets.cache_secret_access_key }}
424419
425420 - name : Install system dependencies
426421 if : inputs.system_deps_command != ''
@@ -507,9 +502,7 @@ jobs:
507502 working-directory : ${{ inputs.working_directory }}
508503 env :
509504 KIND_EXPERIMENTAL_DOCKER_NETWORK : ${{ job.container.network }}
510- RUSTC_WRAPPER : ${{ inputs.use_sccache && 'sccache' || '' }}
511- SCCACHE_GHA_ENABLED : ${{ inputs.use_sccache && 'true' || '' }}
512- CARGO_INCREMENTAL : ${{ inputs.use_sccache && '0' || '' }}
505+ CARGO_INCREMENTAL : ${{ inputs.use_rust_cache && '0' || '' }}
513506 # Pass project and grep filters via env vars for the test command to use
514507 PLAYWRIGHT_PROJECT : ${{ inputs.playwright_project }}
515508 PLAYWRIGHT_GREP : ${{ inputs.playwright_grep }}
0 commit comments