rust-bench #40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: rust-bench | |
| on: | |
| schedule: | |
| # Nightly at 06:00 UTC — runs criterion against main and compares to baseline. | |
| - cron: '0 6 * * *' | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| bench: | |
| name: criterion (ubuntu-latest) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| persist-credentials: false | |
| - name: Cache cargo registry & target | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: cargo-bench-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }} | |
| # Bench harnesses (criterion) land in crates that have a `benches/` | |
| # directory: bignum, logic, save. Workspace bench is a no-op until | |
| # those are wired. | |
| - name: cargo bench (dry) | |
| run: cargo bench --workspace --no-run | |
| # Once criterion benches exist, swap the dry run for: | |
| # cargo bench --workspace -- --output-format bencher | |
| # and pipe the JSON through a small formatter (mirrors the TS | |
| # `bench-report.mjs` in legacy/core_split) to produce BENCH_REPORT.md. |