Skip to content

Commit

Permalink
Merge pull request #25 from antiguru/test_bench
Browse files Browse the repository at this point in the history
Fix bench
  • Loading branch information
antiguru authored Apr 12, 2024
2 parents 64f785f + d39f5a1 commit 2487d33
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 2 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "Bench Suite"
on:
push:
branches:
- main

jobs:
bench:
name: cargo bench
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
- name: Cargo bench
run: cargo +nightly bench | tee output.txt
# Run `github-action-benchmark` action
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'cargo'
output-file-path: output.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
fail-on-alert: true
20 changes: 19 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
toolchain:
- stable
- 1.65
name: cargo test on ${{ matrix.os }}
name: cargo test on ${{ matrix.os }}, rust ${{ matrix.toolchain }}
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -41,3 +41,21 @@ jobs:
components: rustfmt
- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@v1

bench:
name: cargo bench
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
- name: Cargo bench
run: cargo +nightly bench | tee output.txt
# Run `github-action-benchmark` action
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'cargo'
output-file-path: output.txt
fail-on-alert: true
1 change: 0 additions & 1 deletion benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ fn vec_u_vn_s_copy_region_column(bencher: &mut Bencher) {
CollapseSequence<OwnedRegion<_>>,
CollapseSequence<StringRegion>,
>,
_,
>,
>,
_,
Expand Down

0 comments on commit 2487d33

Please sign in to comment.