Skip to content

Commit

Permalink
new GH action: Benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
Siel committed Sep 19, 2024
1 parent 68c62c0 commit 7fd05a4
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Rust Example
on:
push:
branches:
- master

permissions:
contents: write
deployments: write

jobs:
benchmark:
name: Run Rust benchmark example
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup toolchain update
- name: Run benchmark
run: cargo bench | 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
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '200%'
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@siel'

- name: Store benchmark result - separate results repo
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
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '200%'
summary-always: true
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@siel'
gh-repository: 'github.com/benchmark-action/github-action-benchmark-results'

0 comments on commit 7fd05a4

Please sign in to comment.