Reusable GitHub Actions and workflows for Wonderland's Aztec submodule repos.
actions/
├── setup-aztec/action.yml # Node, Foundry, Aztec CLI, compile, codegen, PXE
├── js-tests/action.yml # yarn test:js wrapper
└── noir-tests/action.yml # aztec test wrapper
.github/workflows/
├── run-tests.yml # Reusable: js-tests + noir-tests
└── pre-release.yml # Reusable: build + tag + GitHub pre-release
# .github/workflows/pr-checks.yml
name: PR Checks
on: [pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
tests:
uses: AztecProtocol/aztec-ci-actions/.github/workflows/run-tests.yml@<tag>
secrets: inherit# .github/workflows/pre-release.yml
name: Pre-Release
on:
workflow_dispatch:
jobs:
pre-release:
uses: AztecProtocol/aztec-ci-actions/.github/workflows/pre-release.yml@<tag>
secrets: inherit
permissions:
contents: writeDependents install the pre-release tarball from the GitHub Release:
npm install https://github.com/<owner>/<repo>/releases/download/prerelease-<sha>/<tarball-name>.tgzOr in package.json:
"<package>": "https://github.com/<owner>/<repo>/releases/download/prerelease-<sha>/<tarball-name>.tgz"steps:
- uses: actions/checkout@v4
- uses: AztecProtocol/aztec-ci-actions/actions/setup-aztec@<tag>
with:
start-pxe: "false"
run-compile: "true"
run-codegen: "false"
foundry-version: "v1.4.1" # default; set "" for latest stable, or override with another versionIf the Aztec contract lives in a sub-package (contracts/foo/, packages/bar/, etc.), pass working-directory:
jobs:
tests:
uses: AztecProtocol/aztec-ci-actions/.github/workflows/run-tests.yml@<tag>
with:
working-directory: contracts/foo
secrets: inheritaztec compile, aztec codegen, yarn test:js, and aztec test will all run from contracts/foo/. yarn install and Aztec version detection still run at the repo root, so yarn workspaces and a root-mirrored config.aztecVersion keep working.
Full Aztec development environment setup:
- Node.js 24.0.0 (with yarn cache)
- Add
~/.aztecto PATH - Detect version from
config.aztecVersioninpackage.json - Install Foundry — pinned to
v1.4.1by default (forge ≥ 1.5 added a--batchrequirement that breaks Aztec 4.2.0's L1 deploy script). Override viafoundry-versiononce Aztec ships a compatible deploy script; pass""for latest stable. - Aztec CLI — restored from cache when available (key:
aztec-<runner.os>-<version>), otherwise installed - (optional) Start local network
yarn --frozen-lockfile- (optional)
aztec compile— controlled byrun-compile(default: true) - (optional)
aztec codegen— controlled byrun-codegen(default: false); requires compile (fails ifrun-codegen: truebutrun-compile: false) - (optional) Start PXE node
For pure-JS repos (no Noir contracts): set run-compile: "false" and run-codegen: "false" to skip contract build steps.
Thin wrappers around yarn test:js and aztec test with proper env vars and terminal allocation.
The pre-release.yml reusable workflow builds the package and publishes a GitHub pre-release with installable artifacts. This allows dependent repos to test unreleased changes without publishing to npm.
What it does:
- Full Aztec environment setup —
run-compile(default: true) andrun-codegen(default: true) control whether to compile Noir contracts and run codegen; set both tofalsefor pure-JS repos yarn build- Generate a pre-release version:
<base-version>-prerelease.<short-sha> - Set the version temporarily (never committed to git)
npm packto create an npm-installable.tgztarballtar -czf dist.tar.gz dist/for the built output- Create a git tag
prerelease-<short-sha>and a GitHub Release marked as pre-release
Artifacts attached to each release:
| Asset | Purpose |
|---|---|
<name>-<version>.tgz |
npm-installable tarball — use with npm install <url> |
dist.tar.gz |
Raw dist/ directory for manual extraction |
Production npm install from the npm registry is completely unaffected — pre-releases only exist as GitHub Release assets.
Pin to @main during development. Tag releases as v1, v1.1, etc. once stable. Submodules pin to @v1 (major) for stability.