Merge pull request #552 from theseus-rs/implement-class-isrecord #1530
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 | |
| pull_request: | |
| types: [ opened, reopened, synchronize ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| benchmark: | |
| name: Run Benchmarks | |
| runs-on: ubuntu-24.04-arm | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| components: 'llvm-tools-preview' | |
| toolchain: stable | |
| - name: Install benchmarking tools | |
| uses: bencherdev/bencher@main | |
| - name: Run benchmarks | |
| if: ${{ github.event_name == 'pull_request' }} | |
| env: | |
| BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }} | |
| BENCHER_PROJECT: theseus-rs-ristretto | |
| BENCHER_ADAPTER: rust_criterion | |
| run: | | |
| bencher run \ | |
| --branch $GITHUB_HEAD_REF \ | |
| --ci-number "${{ github.event.number }}" \ | |
| --github-actions "${{ secrets.GITHUB_TOKEN }}" \ | |
| --err \ | |
| "cargo bench" | |
| - name: Run benchmarks | |
| if: ${{ github.event_name != 'pull_request' }} | |
| env: | |
| BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }} | |
| BENCHER_PROJECT: theseus-rs-ristretto | |
| BENCHER_ADAPTER: rust_criterion | |
| run: | | |
| bencher run "cargo bench" |