Skip to content

ci: run smartcore-benches against release commit (#407) - #409

Merged
Mec-iS merged 1 commit into
developmentfrom
ci-release-bench
Aug 9, 2026
Merged

ci: run smartcore-benches against release commit (#407)#409
Mec-iS merged 1 commit into
developmentfrom
ci-release-bench

Conversation

@Mec-iS

@Mec-iS Mec-iS commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a dedicated CI workflow that clones smartcore-benches into the runner and runs its criterion + iai-callgrind benchmarks against the released smartcore code — all in-repo, no cross-repo dispatch or PAT needed. Scoped to releases per the focused ask (#407).

Changes

  • New file: .github/workflows/release-bench.yml
    • Triggers on: release: types: [published]
    • Checks out smartcore (at the release commit) + smartcore-benches (into a sibling smartcore-benches/ directory)
    • Creates a temporary .cargo/config.toml with [patch.crates-io] smartcore = { path = "../" } so the benches' smartcore = "0.6" dependency resolves to the local checkout instead of crates.io
    • Installs Valgrind (for iai-callgrind)
    • Builds benches (cargo bench --no-run)
    • Runs criterion benchmarks (--output-format bencherbench-output/criterion.json)
    • Runs iai-callgrind benches (per-bench: iai_matmul, iai_ab, iai_svd, iai_cover_tree, iai_iterator_mut)
    • Uploads all results as artifacts (release-benchmark-results, 90-day retention)

No secrets, no PAT, no cross-repo dispatch

The benches run directly in the smartcore CI runner. The [patch.crates-io] override repoints the benches' smartcore dependency to the already-checked-out release commit — no crates.io round-trip, no repository_dispatch, no BENCHES_DISPATCH_PAT secret.

Verification

  • cargo fmt --all -- --check = 0
  • cargo clippy --all-features -- -Drust-2018-idioms -Drust-2024-compatibility -Dwarnings = 0
  • YAML valid; pre-commit hook passed (fmt + clippy)

What this does NOT do (intentionally, per scope)

  • Does not trigger benches on development pushes — that's the per-commit dispatch path (separate concern).
  • Does not add iai-callgrind as a required branch-protection gate — that comes after a baseline is established.

Refs #407.

@Mec-iS Mec-iS added enhancement New feature or request rust Pull requests that update rust code labels Aug 9, 2026
Add .github/workflows/release-bench.yml that triggers on release.published.
It checks out smartcore-benches into a sibling directory and patches its
Cargo.toml via [patch.crates-io] to use the local smartcore checkout (the
release commit), then runs criterion + iai-callgrind benchmarks. Results
are uploaded as artifacts. No cross-repo dispatch or PAT needed.
@Mec-iS
Mec-iS force-pushed the ci-release-bench branch from 4c10a4d to 2e023d7 Compare August 9, 2026 15:10
@Mec-iS Mec-iS changed the title ci: dispatch smartcore-benches on release published (#407) ci: run smartcore-benches against release commit (#407) Aug 9, 2026
@Mec-iS
Mec-iS merged commit 80cf979 into development Aug 9, 2026
13 checks passed
@Mec-iS
Mec-iS deleted the ci-release-bench branch August 9, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant