Skip to content

Commit a91ec6a

Browse files
committed
update benchmark ci
1 parent 5d3f471 commit a91ec6a

File tree

1 file changed

+9
-25
lines changed

1 file changed

+9
-25
lines changed

.github/workflows/benchmark-pr.yml

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -120,34 +120,18 @@ jobs:
120120
121121
- name: Compare PR and master
122122
if: ${{ env.hasBenchmark == '1' }}
123-
id: benchmark
124123
run: |
125124
cd JAMTests
126-
echo "# 📊 Benchmark Results"
127-
echo "Generated on: $(date)"
128-
echo ""
129-
echo "exitStatus=1" >> $GITHUB_ENV
125+
echo "# 📊 Benchmark Results" >> $GITHUB_STEP_SUMMARY
126+
echo "Generated on: $(date)" >> $GITHUB_STEP_SUMMARY
127+
echo "" >> $GITHUB_STEP_SUMMARY
130128
131-
# Check if master baseline exists for comparison
132129
if [ -f ".benchmarkBaselines/BenchmarkTestVectors/master/results.json" ]; then
133-
echo '## Summary' >> $GITHUB_STEP_SUMMARY
134-
echo $(date) >> $GITHUB_STEP_SUMMARY
135-
echo "exitStatus=1" >> $GITHUB_ENV
136-
swift package benchmark baseline check master pull_request --format markdown >> $GITHUB_STEP_SUMMARY
137-
echo '---' >> $GITHUB_STEP_SUMMARY
138-
swift package benchmark baseline compare master pull_request --no-progress --quiet --format markdown >> $GITHUB_STEP_SUMMARY
139-
echo "exitStatus=0" >> $GITHUB_ENV
130+
swift package benchmark baseline compare master pull_request --no-progress --format markdown >> $GITHUB_STEP_SUMMARY 2>&1 || true
131+
echo "" >> $GITHUB_STEP_SUMMARY
132+
echo "## Threshold Check" >> $GITHUB_STEP_SUMMARY
133+
swift package benchmark baseline check master pull_request --format markdown >> $GITHUB_STEP_SUMMARY 2>&1 || true
140134
else
141-
echo "⚠️ Master baseline not found. This appears to be the first benchmark run."
142-
echo ""
143-
# Run benchmarks to generate results for first time
144-
echo "### Benchmark Results:"
145-
swift package benchmark --format markdown 2>&1 || true
146-
echo "exitStatus=0" >> $GITHUB_ENV
135+
echo "⚠️ Master baseline not found. Running benchmarks for this PR:" >> $GITHUB_STEP_SUMMARY
136+
swift package benchmark --format markdown >> $GITHUB_STEP_SUMMARY 2>&1 || true
147137
fi
148-
continue-on-error: true
149-
150-
- name: Exit with correct status
151-
if: ${{ env.hasBenchmark == '1' }}
152-
run: |
153-
exit ${{ env.exitStatus }}

0 commit comments

Comments
 (0)