Skip to content
This repository was archived by the owner on Jul 10, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions .github/actions/benchmark/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,17 @@ runs:
path: ${{ inputs.bench-dir }}
if_no_artifact_found: warn

- name: Run benchmarks
shell: bash
run: yarn aztec-benchmark --suffix _latest

- name: Generate Markdown diff
uses: defi-wonderland/aztec-benchmark/action@main
with:
base_suffix: '_latest'
current_suffix: '_new'
reports_dir: ${{ inputs.bench-dir }}
base_suffix: '_baseline'
current_suffix: '_latest'
only_report: true

- name: Comment diff on PR
uses: peter-evans/create-or-update-comment@v4
Expand All @@ -62,14 +68,11 @@ runs:
- name: Prepare benchmark files for upload
shell: bash
run: |
# Remove old _latest files (from base branch fetch) before renaming
rm -f ${{ inputs.bench-dir }}/*_latest.benchmark.json

# Rename _new files to _latest (the canonical stored format)
for file in ${{ inputs.bench-dir }}/*_new.benchmark.json; do
# Remove downloaded baseline files and rename current results to baseline format
rm -f ${{ inputs.bench-dir }}/*_baseline.benchmark.json
for file in ${{ inputs.bench-dir }}/*_latest.benchmark.json; do
if [ -f "$file" ]; then
new_name="${file/_new.benchmark.json/_latest.benchmark.json}"
echo "Renaming $file -> $new_name"
new_name="${file/_latest.benchmark.json/_baseline.benchmark.json}"
mv "$file" "$new_name"
fi
done
Expand All @@ -87,6 +90,6 @@ runs:
uses: actions/upload-artifact@v4
with:
name: benchmark-baseline-${{ steps.encode-head.outputs.head-ref-encoded }}
path: ${{ inputs.bench-dir }}/*_latest.benchmark.json
path: ${{ inputs.bench-dir }}/*_baseline.benchmark.json
retention-days: 90
if-no-files-found: error
6 changes: 3 additions & 3 deletions .github/workflows/update-baseline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ jobs:
run-codegen: 'true'

- name: Run benchmarks
run: yarn aztec-benchmark --suffix _latest
run: yarn aztec-benchmark --suffix _baseline

- name: List baseline files
run: |
echo "Baseline files for branch: ${{ github.ref_name }}"
ls -lh ${{ env.BENCH_DIR }}/*_latest.benchmark.json
ls -lh ${{ env.BENCH_DIR }}/*_baseline.benchmark.json

- name: Encode branch name
id: encode
Expand All @@ -61,6 +61,6 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: benchmark-baseline-${{ steps.encode.outputs.branch-encoded }}
path: ${{ env.BENCH_DIR }}/*_latest.benchmark.json
path: ${{ env.BENCH_DIR }}/*_baseline.benchmark.json
retention-days: 90
if-no-files-found: error