Skip to content

Cache built clojure-rs binary by resolved SHA in perf-callgrind - #46

Closed
m-hu wants to merge 1 commit into
masterfrom
perf-cache-cljrs-bin
Closed

m-hu wants to merge 1 commit into
masterfrom
perf-cache-cljrs-bin

Conversation

@m-hu

@m-hu m-hu commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Caches the built clojure-rs release binary in actions/cache, keyed by
runner OS + the resolve-rs SHA, so the 8 perf-callgrind clojure-rs legs
skip toolchain install, checkout, and cargo build whenever the upstream
revision hasn't moved.

How it works

  • New Restore cached clojure-rs binary step (actions/cache@v5, same
    action family already used for jars) restores cljrs-bin/ on key
    cljrs-bin-<os>-<resolved-sha>.
  • Toolchain, checkout, cargo-cache, and build steps now run only on
    cache miss; the build stamps a .rev marker with the SHA it built.
  • New Use clojure-rs binary step runs on hit AND miss: it verifies
    the marker matches the resolved revision (fails loudly on mismatch
    instead of benchmarking the wrong commit) and puts cljrs-bin on PATH.
  • First run on a new upstream rev: all 8 legs miss, build, and race to
    save the same immutable key (first wins, rest warn harmlessly).

Validation

  • YAML parsed locally; no runner available here, so CI on this PR is the
    gate — expect a miss-build on this run and hits on the next run that
    resolves the same upstream SHA.

AI-Tool: Muse Code (Meta Muse Spark)

Each perf-callgrind run resolves the upstream revision once but all 8
clojure-rs legs still check out + build it from scratch. Cache the
release binary in actions/cache keyed by runner OS + resolved SHA so
repeat runs skip toolchain, checkout, and build; a .rev marker file
fails the leg loudly if a cached binary ever mismatches the revision.

AI-Tool: Muse Code (Meta Muse Spark)
@m-hu

m-hu commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #45 — merged into the single batch PR.

@m-hu m-hu closed this Nov 3, 2026
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