name: Benchmark
on:
push:
branches:
- main
permissions:
contents: write
deployments: write
jobs:
benchmark:
name: Run Rust benchmark with criterion
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run benchmark
run: |
cargo install cargo-criterion
cargo criterion --output-format bencher --benches 2>&1 | tee output.txt
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Rust Benchmark
tool: 'cargo'
output-file-path: output.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
alert-threshold: '200%'
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@luizirber @castelao'