Skip to content

Commit 96a9458

Browse files
committed
Only run benchmarks for PRs that modify code
1 parent 19fd32a commit 96a9458

2 files changed

Lines changed: 22 additions & 14 deletions

File tree

.github/workflows/benchmark.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Benchmarks
2+
3+
on:
4+
# Only run benchmarks for PRs that modify code
5+
pull_request:
6+
paths:
7+
- 'src/**'
8+
- 'benches/**'
9+
10+
jobs:
11+
benchmarks:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions-rs/toolchain@v1
16+
with:
17+
toolchain: stable
18+
profile: minimal
19+
- uses: boa-dev/criterion-compare-action@v3
20+
with:
21+
features: bench
22+
branchName: ${{ github.base_ref }}

.github/workflows/rust.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,3 @@ jobs:
4545
- uses: actions-rs/cargo@v1
4646
with:
4747
command: test
48-
49-
benchmarks:
50-
runs-on: ubuntu-latest
51-
if: github.base_ref != ''
52-
steps:
53-
- uses: actions/checkout@v4
54-
- uses: actions-rs/toolchain@v1
55-
with:
56-
toolchain: stable
57-
profile: minimal
58-
- uses: boa-dev/criterion-compare-action@v3
59-
with:
60-
features: bench
61-
branchName: ${{ github.base_ref }}

0 commit comments

Comments
 (0)