Merge pull request #119 from Apich-Organization/dependabot/github_act… #43
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: Benchmarks | |
| on: | |
| push: | |
| branches: [main, master, "v*.x", "ci/*"] | |
| paths: | |
| - "src/**" | |
| - "benches/**" | |
| - "derive/**" | |
| - ".github/workflows/bench.yml" | |
| pull_request: | |
| branches: [main, master, "v*.x", "ci/*"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| # ── Criterion benchmarks ───────────────────────────────────────────────── | |
| build-bench: | |
| name: Run Benchmarks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable | |
| - name: Cache Cargo registry + build | |
| uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 | |
| - name: Run Criterion benchmarks | |
| run: cargo bench --all-features --bench cbor_comparison --bench postcard_comparison --bench complex | |
| - name: Upload criterion report artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: criterion-report | |
| path: target/criterion |