name: Benchmark on: push: branches: - main paths: - '**/*.rs' - '**/Cargo.toml' - '**/Cargo.lock' - '.github/workflows/benchmark.yaml' permissions: contents: write deployments: write jobs: benchmark: name: Run Rust benchmark example runs-on: ubuntu-latest steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Toolchain setup run: rustup toolchain update nightly && rustup default nightly - name: Run benchmark run: cargo +nightly bench | tee output.txt - name: Store benchmark result uses: benchmark-action/github-action-benchmark@4bdcce38c94cec68da58d012ac24b7b1155efe8b # v1.20.7 with: name: Rust Benchmark tool: 'cargo' output-file-path: output.txt github-token: ${{ secrets.GITHUB_TOKEN }} auto-push: true # Show alert with commit comment on detecting possible performance regression alert-threshold: '200%' comment-on-alert: true fail-on-alert: true benchmark-data-dir-path: docs