Skip to content

Commit

Permalink
Only run benchmarks for PRs that modify code
Browse files Browse the repository at this point in the history
  • Loading branch information
simu committed Mar 19, 2024
1 parent 19fd32a commit 96a9458
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Benchmarks

on:
# Only run benchmarks for PRs that modify code
pull_request:
paths:
- 'src/**'
- 'benches/**'

jobs:
benchmarks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- uses: boa-dev/criterion-compare-action@v3
with:
features: bench
branchName: ${{ github.base_ref }}
14 changes: 0 additions & 14 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,3 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: test

benchmarks:
runs-on: ubuntu-latest
if: github.base_ref != ''
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- uses: boa-dev/criterion-compare-action@v3
with:
features: bench
branchName: ${{ github.base_ref }}

0 comments on commit 96a9458

Please sign in to comment.