Skip to content

feat(setup-stack): isolate only when asked, cache only on hosted - #6

Merged
azlekov merged 2 commits into
mainfrom
feat/setup-stack-cache-modes
Aug 18, 2026
Merged

feat(setup-stack): isolate only when asked, cache only on hosted#6
azlekov merged 2 commits into
mainfrom
feat/setup-stack-cache-modes

Conversation

@azlekov

@azlekov azlekov commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • setup-stack now takes isolate (default false) and cache (auto / true / false, default auto), and resolves them from runner.environment + runner.arch instead of always pinning caches to RUNNER_TEMP.
  • deps-verify.yml hard-codes isolate: true and cache: false (not a caller-facing input). pr-checks.yml passes isolate: false and cache: auto on all three jobs. release.yml stays hosted-only and skips package cache — still no bun GitHub cache.
  • AGENTS.md cites DODI-00020 (package caches persist per runner; GitHub cache is hosted-only and never uses restore-keys).

How isolate / cache resolve

isolate=true          -> RUNNER_TEMP dirs, cache-disabled (deps-verify)
self-hosted + ARM64   -> isolate anyway (Pi 8 GB must not grow volumes)
self-hosted + X64     -> ~/.bun ~/.gradle ~/.cargo; cache-disabled
github-hosted         -> default home dirs; cache=auto becomes true
                         (setup-gradle / rust-cache / flutter-action only)

Hosted GitHub cache is one mechanism per stack. Never setup-java cache: gradle, never restore-keys on a package store, never bun upload.

Test plan

  • Self test on this PR: YAML parse + actionlint
  • After merge, a pr-checks job on a beelink X64 runner logs isolate=false and does not set GRADLE_USER_HOME / BUN_INSTALL_CACHE_DIR to RUNNER_TEMP
  • A deps-verify run logs isolate=true and cache=false
  • Confirm hosted jobs still use setup-gradle / rust-cache / flutter-action only — no bun GitHub cache, no setup-java cache: gradle

Made with Cursor

azlekov and others added 2 commits August 18, 2026 23:34
Always-isolating to RUNNER_TEMP made self-hosted volumes unused, and
GitHub cache on those runners is how restore-keys reimported poison.

Co-authored-by: Cursor <cursoragent@cursor.com>
…e Pis

Three gaps between this action and the runner image's per-runner cache
volumes (dodi-smart/docker-github-actions-runner-android#6):

pnpm and yarn were never isolated. The image mounts and LRU-caps
/root/.cache/pnpm, and cleanup.sh keeps ~/.cache/yarn, but isolate mode set
only npm_config_cache. npm's `cache` is not pnpm's `cache-dir`, so a
deps-verify job on pnpm still read and wrote the shared store — it was not
verifying. pnpm reads npm_config_* as its own config, so npm_config_store_dir
and npm_config_cache_dir pin it; yarn takes YARN_CACHE_FOLDER and
YARN_GLOBAL_FOLDER, for classic and berry alike.

PUB_CACHE is now job-scoped in every mode, not just when isolated. A home dir
is only worth using if a volume backs it. The image mounts one for bun, npm,
pnpm, gradle and cargo and caps each at ~20 GB; it mounts none for pub. Left
on ~/.pub-cache, a persistent runner would grow it in the container's
writable layer, where the post-job LRU cap cannot reach.

The forced-isolate check is Linux ARM64, not ARM64. The rule exists because a
Pi has 8 GB and must not grow container volumes. The self-hosted Mac is ARM64
too, has no container volumes, and was being made to run every job cold for a
reason that does not describe it.

Also corrects the bun comment: setup-bun still caches the bun executable, a
small exact-keyed binary. What is never uploaded is the install cache — any
package STORE under restore-keys is the poison path.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@azlekov
azlekov merged commit 743c868 into main Aug 18, 2026
1 check passed
@azlekov
azlekov deleted the feat/setup-stack-cache-modes branch August 18, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant