Fix benchmark action: handle Criterion output correctly

- Added continue-on-error to benchmark steps to not fail CI
- Check if Criterion estimates.json exists before running benchmark action
- Use correct Criterion output path instead of non-existent output.json
This commit is contained in:
pandaadir05
2025-11-21 14:36:25 +02:00
parent 7a2e6f222d
commit c1643a9c15

View File

@@ -293,12 +293,15 @@ jobs:
- name: Run benchmarks - name: Run benchmarks
run: cargo bench --no-default-features --no-fail-fast run: cargo bench --no-default-features --no-fail-fast
continue-on-error: true
- name: Store benchmark result - name: Store benchmark result
continue-on-error: true
if: hashFiles('target/criterion/**/estimates.json') != ''
uses: benchmark-action/github-action-benchmark@v1 uses: benchmark-action/github-action-benchmark@v1
with: with:
tool: 'cargo' tool: 'cargo'
output-file-path: target/criterion/output.json output-file-path: target/criterion/detection_performance/base/estimates.json
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true auto-push: true
alert-threshold: '200%' alert-threshold: '200%'