Skip to content
This repository was archived by the owner on Jul 10, 2026. It is now read-only.

Commit 9745371

Browse files
0xShaitoclaude
andauthored
claude: fix comparison workflow ocwwh (#109)
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 241fef4 commit 9745371

2 files changed

Lines changed: 16 additions & 13 deletions

File tree

.github/actions/benchmark/action.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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
@@ -87,6 +90,6 @@ runs:
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

.github/workflows/update-baseline.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ jobs:
4242
run-codegen: 'true'
4343

4444
- name: Run benchmarks
45-
run: yarn aztec-benchmark --suffix _latest
45+
run: yarn aztec-benchmark --suffix _baseline
4646

4747
- name: List baseline files
4848
run: |
4949
echo "Baseline files for branch: ${{ github.ref_name }}"
50-
ls -lh ${{ env.BENCH_DIR }}/*_latest.benchmark.json
50+
ls -lh ${{ env.BENCH_DIR }}/*_baseline.benchmark.json
5151
5252
- name: Encode branch name
5353
id: encode
@@ -61,6 +61,6 @@ jobs:
6161
uses: actions/upload-artifact@v4
6262
with:
6363
name: benchmark-baseline-${{ steps.encode.outputs.branch-encoded }}
64-
path: ${{ env.BENCH_DIR }}/*_latest.benchmark.json
64+
path: ${{ env.BENCH_DIR }}/*_baseline.benchmark.json
6565
retention-days: 90
6666
if-no-files-found: error

0 commit comments

Comments
 (0)