@@ -47,26 +47,31 @@ jobs:
4747 with :
4848 command : criterion
4949
50+ - name : Create benchmark results directory
51+ run : mkdir -p target/criterion
52+
5053 - name : Upload benchmark results
5154 uses : actions/upload-artifact@v3
5255 with :
5356 name : benchmark-results
5457 path : target/criterion
58+ if-no-files-found : warn
5559
5660 - name : Generate benchmark report
5761 run : |
5862 mkdir -p benchmark-report
59- cp -r target/criterion/* benchmark-report/
63+ cp -r target/criterion/* benchmark-report/ || true
6064 echo "# Benchmark Results" > benchmark-report/README.md
6165 echo "Generated on $(date)" >> benchmark-report/README.md
6266 echo "## Summary" >> benchmark-report/README.md
63- find target/criterion -name "*/new/estimates.json" -exec cat {} \; | jq -r '.mean | { command: .point_estimate, lower_bound: .confidence_interval.lower_bound, upper_bound: .confidence_interval.upper_bound }' >> benchmark-report/README.md
67+ find target/criterion -name "*/new/estimates.json" -exec cat {} \; | jq -r '.mean | { command: .point_estimate, lower_bound: .confidence_interval.lower_bound, upper_bound: .confidence_interval.upper_bound }' >> benchmark-report/README.md || echo "No benchmark results found" >> benchmark-report/README.md
6468
6569 - name : Upload benchmark report
6670 uses : actions/upload-artifact@v3
6771 with :
6872 name : benchmark-report
6973 path : benchmark-report
74+ if-no-files-found : warn
7075
7176 - name : Compare with previous benchmarks
7277 if : github.event_name == 'pull_request'
7580 git checkout FETCH_HEAD
7681 cargo criterion --baseline main
7782 git checkout ${{ github.sha }}
78- cargo criterion --baseline main
83+ cargo criterion --baseline main
0 commit comments