Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ jobs:
with:
key: msrv
- run: cargo build --workspace --all-features

# ── Benchmark compile check ──────────────────────────────────────────────────
bench-check:
name: Benchmarks Compile
Expand All @@ -137,6 +136,32 @@ jobs:
- uses: Swatinem/rust-cache@v2
- run: cargo bench --workspace --no-run --all-features

# ── Benchmark regression check (PR only, non-blocking — informational) ───────
bench-compare:
name: Benchmark Regression Check
runs-on: ubuntu-latest
needs: [fmt, clippy]
if: github.event_name == 'pull_request'
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: bench-compare
- name: Install critcmp
run: cargo install critcmp --locked
- name: Run benchmarks on PR branch
run: cargo bench -p mohu-buffer --bench ndarray_ops -- --save-baseline pr
- name: Compare against committed baseline
run: |
echo "## Benchmark comparison vs \`benches/baselines/main.json\`" >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
critcmp benches/baselines/main.json pr >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
echo "Comparisons within ±5% are noise on shared CI runners. Larger deltas warrant a closer look before merging." >> "$GITHUB_STEP_SUMMARY"

# ── Semver (PR only; non-blocking until crates are published) ────────────────
semver:
name: Semver Check
Expand Down
215 changes: 215 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ tracing = "0.1"
# ── Testing ───────────────────────────────────────────────────────────────────
proptest = "1"
approx = "0.5"
criterion = { version = "0.5", features = ["html_reports"] }

# ── Build utilities ───────────────────────────────────────────────────────────
cfg-if = "1"
Expand Down
Loading
Loading