@@ -47,11 +47,17 @@ runs:
4747 path : ${{ inputs.bench-dir }}
4848 if_no_artifact_found : warn
4949
50+ - name : Run benchmarks
51+ shell : bash
52+ run : yarn aztec-benchmark --suffix _latest
53+
5054 - name : Generate Markdown diff
5155 uses : defi-wonderland/aztec-benchmark/action@main
5256 with :
53- base_suffix : ' _latest'
54- current_suffix : ' _new'
57+ reports_dir : ${{ inputs.bench-dir }}
58+ base_suffix : ' _baseline'
59+ current_suffix : ' _latest'
60+ only_report : true
5561
5662 - name : Comment diff on PR
5763 uses : peter-evans/create-or-update-comment@v4
@@ -62,14 +68,11 @@ runs:
6268 - name : Prepare benchmark files for upload
6369 shell : bash
6470 run : |
65- # Remove old _latest files (from base branch fetch) before renaming
66- rm -f ${{ inputs.bench-dir }}/*_latest.benchmark.json
67-
68- # Rename _new files to _latest (the canonical stored format)
69- for file in ${{ inputs.bench-dir }}/*_new.benchmark.json; do
71+ # Remove downloaded baseline files and rename current results to baseline format
72+ rm -f ${{ inputs.bench-dir }}/*_baseline.benchmark.json
73+ for file in ${{ inputs.bench-dir }}/*_latest.benchmark.json; do
7074 if [ -f "$file" ]; then
71- new_name="${file/_new.benchmark.json/_latest.benchmark.json}"
72- echo "Renaming $file -> $new_name"
75+ new_name="${file/_latest.benchmark.json/_baseline.benchmark.json}"
7376 mv "$file" "$new_name"
7477 fi
7578 done
8790 uses : actions/upload-artifact@v4
8891 with :
8992 name : benchmark-baseline-${{ steps.encode-head.outputs.head-ref-encoded }}
90- path : ${{ inputs.bench-dir }}/*_latest .benchmark.json
93+ path : ${{ inputs.bench-dir }}/*_baseline .benchmark.json
9194 retention-days : 90
9295 if-no-files-found : error
0 commit comments