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
92 changes: 92 additions & 0 deletions .github/actions/benchmark/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: 'Run Benchmarks'
description: 'Run Aztec benchmarks, generate diff report, and upload results'

inputs:
pr-number:
description: 'Pull request number'
required: true
base-ref:
description: 'Base branch ref for comparison'
required: true
head-ref:
description: 'Head branch ref (source branch of PR)'
required: true
bench-dir:
description: 'Directory for benchmark files'
required: false
default: './benchmarks'

runs:
using: 'composite'
steps:
- name: Encode base branch name
id: encode-base
shell: bash
run: |
# Replace slashes with hyphens for artifact naming
# GitHub artifact names don't support slashes
encoded=$(echo "${{ inputs.base-ref }}" | sed 's/\//-/g')
echo "base-ref-encoded=${encoded}" >> $GITHUB_OUTPUT

# Determine which workflow created the baseline
# dev/main baselines are from update-baseline.yml, others from pr-checks.yml
if [[ "${{ inputs.base-ref }}" == "dev" || "${{ inputs.base-ref }}" == "main" ]]; then
echo "workflow=update-baseline.yml" >> $GITHUB_OUTPUT
else
echo "workflow=pr-checks.yml" >> $GITHUB_OUTPUT
fi

- name: Download baseline artifact
id: download-baseline
continue-on-error: true
uses: dawidd6/action-download-artifact@0bd50d53a6d7fb5cb921e607957e9cc12b4ce392 # v12
with:
workflow: ${{ steps.encode-base.outputs.workflow }}
branch: ${{ inputs.base-ref }}
name: benchmark-baseline-${{ steps.encode-base.outputs.base-ref-encoded }}
path: ${{ inputs.bench-dir }}
if_no_artifact_found: warn

- name: Generate Markdown diff
uses: defi-wonderland/aztec-benchmark/action@main
with:
base_suffix: '_latest'
current_suffix: '_new'

- name: Comment diff on PR
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ inputs.pr-number }}
body-path: benchmark-comparison.md

- 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
if [ -f "$file" ]; then
new_name="${file/_new.benchmark.json/_latest.benchmark.json}"
echo "Renaming $file -> $new_name"
mv "$file" "$new_name"
fi
done

- name: Encode head branch name
id: encode-head
shell: bash
run: |
# Replace slashes with hyphens for artifact naming
# GitHub artifact names don't support slashes
encoded=$(echo "${{ inputs.head-ref }}" | sed 's/\//-/g')
echo "head-ref-encoded=${encoded}" >> $GITHUB_OUTPUT

- name: Upload branch baseline
uses: actions/upload-artifact@v4
with:
name: benchmark-baseline-${{ steps.encode-head.outputs.head-ref-encoded }}
path: ${{ inputs.bench-dir }}/*_latest.benchmark.json
retention-days: 90
if-no-files-found: error
10 changes: 10 additions & 0 deletions .github/actions/js-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: 'Run JS Tests'
description: 'Run JavaScript integration tests'

runs:
using: 'composite'
steps:
- name: Run JS tests
shell: bash
run: |
script -e -c "BASE_PXE_URL=http://localhost NODE_NO_WARNINGS=1 yarn test:js"
16 changes: 16 additions & 0 deletions .github/actions/noir-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 'Run Noir Tests'
description: 'Run Noir contract tests'

inputs:
threads:
description: 'Number of test threads'
required: false
default: '12'

runs:
using: 'composite'
steps:
- name: Run Noir tests
shell: bash
run: |
script -e -c "aztec test --test-threads ${{ inputs.threads }}"
85 changes: 85 additions & 0 deletions .github/actions/setup-aztec/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: 'Setup Aztec Environment'
description: 'Common setup for Aztec development: Node, Docker, Aztec CLI, dependencies, and local network'

inputs:
start-pxe:
description: 'Whether to start PXE node'
required: false
default: 'false'
run-codegen:
description: 'Whether to run yarn codegen'
required: false
default: 'false'

outputs:
aztec-version:
description: 'The detected Aztec version'
value: ${{ steps.aztec-version.outputs.version }}

runs:
using: 'composite'
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.17.0'

- name: Update PATH for Aztec
shell: bash
run: echo "/home/runner/.aztec/bin" >> $GITHUB_PATH

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Detect Aztec version
id: aztec-version
shell: bash
run: |
VER=$(node -p "require('./package.json').config.aztecVersion")
echo "version=$VER" >> "$GITHUB_OUTPUT"
echo "Aztec version: $VER"

- name: Install Aztec CLI
shell: bash
run: |
INSTALL_URL="https://install.aztec.network/${{ steps.aztec-version.outputs.version }}/"
echo "Installing from: $INSTALL_URL"
curl -s $INSTALL_URL > tmp.sh
VERSION=${{ steps.aztec-version.outputs.version }} bash tmp.sh <<< yes "yes"

- name: Switch CLI to target version
shell: bash
run: |
VERSION=${{ steps.aztec-version.outputs.version }} aztec-up

# Temporary hack to fix a problem with v3 releases
- name: Tag Aztec Docker image as latest
shell: bash
run: |
docker tag aztecprotocol/aztec:${{ steps.aztec-version.outputs.version }} aztecprotocol/aztec:latest

- name: Start local network
if: inputs.start-pxe == 'true'
shell: bash
run: aztec start --local-network &

- name: Install dependencies
shell: bash
run: yarn --frozen-lockfile

- name: Compile contracts
shell: bash
run: yarn compile

- name: Codegen wrappers
if: inputs.run-codegen == 'true'
shell: bash
run: yarn codegen

- name: Start PXE node
if: inputs.start-pxe == 'true'
shell: bash
run: |
VERSION=${{ steps.aztec-version.outputs.version }} aztec \
start --port 8081 --pxe --pxe.nodeUrl=http://localhost:8080/ \
--pxe.proverEnabled false &
41 changes: 0 additions & 41 deletions .github/dependabot.yml

This file was deleted.

Loading
Loading