Skip to content

Commit 29a5223

Browse files
authored
fix: ensure benchmark results are uploaded and commented on failure (#673)
- Add 'if: always()' to save and upload benchmark results steps so artifacts are available even when the benchmark fails - Update benchmark-comment workflow to only trigger when the benchmark run concludes with failure
1 parent 7c4afe6 commit 29a5223

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/benchmark-comment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212
jobs:
1313
comment:
1414
runs-on: ubuntu-24.04
15-
if: github.event.workflow_run.event == 'pull_request'
15+
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'failure'
1616
steps:
1717
- name: Download benchmark results
1818
uses: actions/download-artifact@v4

.github/workflows/benchmark.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,15 @@ jobs:
9090
fi
9191
9292
- name: Save benchmark results
93+
if: always()
9394
run: |
9495
mkdir -p benchmark-results
9596
cp $GITHUB_STEP_SUMMARY benchmark-results/summary.md
9697
echo "${{ github.event.pull_request.number }}" > benchmark-results/pr_number.txt
9798
echo "${{ steps.compare.outputs.regression }}" > benchmark-results/regression.txt
9899
99100
- name: Upload benchmark results
101+
if: always()
100102
uses: actions/upload-artifact@v4
101103
with:
102104
name: benchmark-results

0 commit comments

Comments
 (0)