Skip to content

ci: skip remote npm cache and success-path uploads on Mac minis - #135

Merged
joeblau merged 1 commit into
mainfrom
cursor/ci-faster-minis-045f
Oct 21, 2026
Merged

joeblau merged 1 commit into
mainfrom
cursor/ci-faster-minis-045f

Conversation

@joeblau

@joeblau joeblau commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Behavior and issues

Make candidate quality and docs CI faster on the self-hosted Mac mini runners ([self-hosted, macOS, ARM64]). Verified against GitHub Actions runs and the cache store from 17–20 Oct 2026; publish.yml is untouched.

Every job stays on the minis. Playwright remains Chromium and WebKit only.

Changes and expected time savings

Verified this repo’s cache store and step timings (not only the Oct 17–20 note):

  • Cache store: 10.59 GB / 26 entries. 10 npm caches = 10.05 GB, mostly per-PR/branch refs (refs/pull/*/merge, hig/*). Font caches are ~4 MB each and stay.
  • Quality run max 33.1 min (p50 6.6 min). Smoking gun: Post Run actions/setup-node 1655 s (27.6 min) on native (run 39287592105) while saving ~1.1 GB at ~1 MB/s.
  • Quality upload-artifact 36 s typical, max 362 s (same run); browser upload 24 s typical, max 183 s. Both currently if: always().
  • Docs p50 2.1 min, long tails 31 min and a 160 min PR wait whose job itself was 75 s (queue behind cache saves / uploads). Pages artifact upload on PRs is 4–23 s and unused because deploy only runs on main.
Change What Expected saving
Drop cache: npm from the three setup-node blocks in quality.yml and the one in docs.yml No remote dependency cache on self-hosted runners. Minis already keep ~/.npm. Pinned setup-node v4 has no package-manager-cache input (that is v5+); comments warn not to re-add cache: npm or to set package-manager-cache: false if the pin moves to v5. Font actions/cache (~4 MB) is unchanged. Removes restore 30–90 s on cold GitHub cache and save tails up to ~27 min (Post setup-node). Stops growing the 10 GB npm cache store. npm ci should stay in the 35–50 s range from the on-disk cache.
Quality + browser upload-artifact if: always() → if: failure() Uploads are useful for failed visual/review debugging. Release tooling does not download them: publish.yml only requires a successful quality run for the commit, then rebuilds. release:dry-run and smoke:release-artifact still run in the quality job. ~36 s p50 / up to 362 s off green quality jobs; ~24 s p50 / up to 183 s off green browser jobs. Failed runs still upload captures and tarballs.
Skip Pages artifact (and gtar) on PRs in docs.yml docs:build and check -w hig-docs still run on every PR. Upload + gtar only when github.ref == 'refs/heads/main' && github.event_name != 'pull_request' (same condition as deploy). ~10–23 s off PR docs jobs, plus less mini occupancy so docs no longer sits behind 30–160 min queues as often.

publish.yml is not modified (separate release PR).

Observed on this PR (green on the minis)

Runs quality 39507834646 and docs 39507834659 on mini-m4-02, mini-m6-01, and mini-m6-02 (self-hosted, macOS, ARM64).

Step Before (worst / typical) This PR
setup-node restore 30–92 s 0 s on quality, native, browser, docs
Post setup-node (npm cache save) 1655 s worst 0–1 s
quality upload-artifact 36 s p50 / 362 s max skipped (green run, 0 artifacts)
browser upload-artifact 24 s p50 / 183 s max skipped
docs Pages upload 4–23 s on PRs skipped; deploy skipped
npm ci 35–50 s 44–47 s (on-disk ~/.npm)
quality / native / browser job 336 s / 211 s / 323 s recent green 278 s / 177 s / 203 s
docs build job ~2 min p50 38 s

Wall-clock quality was ~99 min because jobs queued ~80 min for a mini; once scheduled, the jobs themselves were faster and produced no GitHub artifacts.

Validation

  • YAML workflows parse; all quality.yml / docs.yml jobs remain [self-hosted, macOS, ARM64].
  • Playwright install stays chromium webkit.
  • CI on this PR is green: candidate quality + Documentation on the minis.

Platform limitations and migration/rollback

  • First green run after this lands may npm ci from registry if a mini’s ~/.npm is cold; later runs use the on-disk cache.
  • Existing GitHub node-cache-* entries age out; they are no longer written.
  • Maintainers who want tarballs/docs out/ from a green run will need a failed rerun or a local dry-run; release publication still rebuilds.
Open in Web Open in Cursor 

Self-hosted Mac minis already keep ~/.npm on disk. setup-node cache: npm
was saving 1.1–1.3 GB archives to GitHub at ~1 MB/s (Post setup-node tails
up to 27 minutes). Quality/browser artifacts now upload only on failure;
docs PRs still build and typecheck but skip the unused Pages artifact.

Co-authored-by: Joe Blau <[email protected]>
@joeblau
joeblau marked this pull request as ready for review October 21, 2026 00:24
@joeblau
joeblau merged commit 4c6033f into main Oct 21, 2026
8 checks passed
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.

2 participants