Skip to content

Commit bfb2ec0

Browse files
Merge pull request #1612 from glimmerjs/dont-run-benchmark-unless-we-have-to
Don't run the Krausest benchmark unless we have to
2 parents bd5bf06 + 8203597 commit bfb2ec0

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

.github/workflows/perf.yml

+16-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ name: PerformanceCheck
22

33
on:
44
workflow_dispatch:
5-
push:
6-
branches:
7-
- main
5+
# Don't run on every merge to main, because many merges
6+
# may not even be vm related, but infra, or GH Actions
7+
# push:
8+
# branches:
9+
# - main
810
pull_request:
911
branches: [main]
1012

@@ -28,24 +30,34 @@ jobs:
2830
- uses: actions/checkout@v4
2931
with:
3032
fetch-depth: 0
33+
34+
- uses: marceloprado/has-changed-path@v1.0.1
35+
id: did-change
36+
with:
37+
paths: packages/
38+
3139
- uses: wyvox/action-setup-pnpm@v3
40+
if: steps.did-change.outputs.changed == 'true'
3241
with:
3342
node-version: '20.1.0'
3443

3544
- name: RUN
45+
if: steps.did-change.outputs.changed == 'true'
3646
run: pnpm run benchmark:setup
3747

3848
- name: Remove unused artifacts
49+
if: steps.did-change.outputs.changed == 'true'
3950
run: rm -rf ./tracerbench-results/traces && rm -rf ./tracerbench-results/traces.zip
4051

4152
- name: Upload Tracerbench Artifacts
42-
if: failure() || success()
53+
if: steps.did-change.outputs.changed == 'true' && (failure() || success())
4354
uses: actions/upload-artifact@v3
4455
with:
4556
name: Trace Artifacts
4657
path: tracerbench-results
4758

4859
- name: Write message
60+
if: steps.did-change.outputs.changed == 'true'
4961
uses: mshick/add-pr-comment@v2
5062
with:
5163
message-path: "tracerbench-results/msg.txt"

0 commit comments

Comments
 (0)