Skip to content

feat: use aztec codegen for typesafe contract definitions #681

feat: use aztec codegen for typesafe contract definitions

feat: use aztec codegen for typesafe contract definitions #681

Workflow file for this run

name: Docker build CI
on:
push:
branches:
- main
tags:
- "**"
paths:
- "docker-compose.yaml"
- "docker-bake.hcl"
- "Dockerfile.test"
- "contracts/**"
- "scripts/**"
- "services/**"
- "package.json"
- "bun.lock"
- "tsconfig*.json"
- ".github/workflows/docker-build-ci.yml"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
outputs:
relevant: ${{ steps.filter.outputs.relevant }}
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Detect relevant changes
id: filter
uses: dorny/paths-filter@v3
with:
filters: |
relevant:
- "docker-compose.yaml"
- "docker-bake.hcl"
- "Dockerfile.test"
- "contracts/**"
- "scripts/**"
- "services/**"
- "package.json"
- "bun.lock"
- "tsconfig*.json"
- ".github/workflows/docker-build-ci.yml"
docker-build:
needs: [changes]
if: github.event_name != 'pull_request' || needs.changes.outputs.relevant == 'true'
runs-on: ubuntu-latest
permissions:
packages: write
outputs:
ci-tag: ${{ steps.ci-tag.outputs.tag }}
env:
PXE_PROVER_ENABLED: false
steps:
- name: Compute CI tag
id: ci-tag
run: |
sha="${{ github.sha }}"
short="${sha:0:7}"
if [ "${{ github.event_name }}" = "pull_request" ]; then
echo "tag=pr-${{ github.event.pull_request.number }}-${short}" >> "$GITHUB_OUTPUT"
else
echo "tag=${GITHUB_REF_NAME}-${short}" >> "$GITHUB_OUTPUT"
fi
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: recursive
- name: Login to Docker Hub
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Pull images to warm up cache
env:
TAG: latest
run: docker compose pull
- name: Build and push all images
uses: docker/bake-action@5be5f02ff8819ecd3092ea6b2e6261c31774f2b4 # v6.10.0
env:
PLATFORMS: linux/amd64,linux/arm64
TAG: ${{ steps.ci-tag.outputs.tag }}
REGISTRY: ghcr.io/nethermindeth/
with:
source: .
push: true
set: |
*.cache-from=type=gha
*.cache-to=type=gha,mode=max
docker-test:
needs: [docker-build]
strategy:
fail-fast: false
matrix:
runner: [ubuntu-latest, ubuntu-24.04-arm]
runs-on: ${{ matrix.runner }}
permissions:
packages: read
env:
PXE_PROVER_ENABLED: false
TAG: ${{ needs.docker-build.outputs.ci-tag }}
REGISTRY: ghcr.io/nethermindeth/
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: recursive
- name: Login to GitHub Container Registry
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Run services and tests
run: docker compose --profile full up wait --wait
- name: Print tests-services logs
if: always()
run: docker compose --profile full logs --timestamps tests-services
- name: Print tests-same-token-transfer logs
if: always()
run: docker compose --profile full logs --timestamps tests-same-token-transfer
- name: Print tests-always-revert logs
if: always()
run: docker compose --profile full logs --timestamps tests-always-revert
- name: Print tests-cold-start logs
if: always()
run: docker compose --profile full logs --timestamps tests-cold-start
- name: Print tests-cold-start-validation logs
if: always()
run: docker compose --profile full logs --timestamps tests-cold-start-validation
- name: Print tests-fee-entrypoint-validation logs
if: always()
run: docker compose --profile full logs --timestamps tests-fee-entrypoint-validation
- name: Print tests-concurrent logs
if: always()
run: docker compose --profile full logs --timestamps tests-concurrent
- name: Print deploy logs
if: always()
run: docker compose --profile full logs --timestamps deploy
- name: Print configure-token logs
if: always()
run: docker compose --profile full logs --timestamps configure-token
- name: Print attestation logs
if: always()
run: docker compose --profile full logs --timestamps attestation
- name: Print topup logs
if: always()
run: docker compose --profile full logs --timestamps topup
- name: Print aztec-node logs
if: always()
run: docker compose --profile full logs --timestamps aztec-node
- name: Tear down
if: always()
run: docker compose --profile full down -v --remove-orphans
- name: Deploy to testnet
env:
FPC_DEPLOYER_SECRET_KEY: ${{ secrets.FPC_DEPLOYER_SECRET_KEY }}
FPC_OPERATOR_SECRET_KEY: ${{ secrets.FPC_OPERATOR_SECRET_KEY }}
FPC_ACCEPTED_ASSET: ${{ vars.FPC_ACCEPTED_ASSET }}
AZTEC_NODE_URL: ${{ vars.AZTEC_NODE_URL }}
run: |
docker run \
-e FPC_DEPLOYER_SECRET_KEY \
-e FPC_OPERATOR_SECRET_KEY \
-e FPC_ACCEPTED_ASSET \
-e AZTEC_NODE_URL \
-e FPC_SKIP_CONFIG_GEN=1 \
-e PXE_SYNC_CHAIN_TIP=checkpointed \
-v ${{ github.workspace }}/deployments:/app/data \
${REGISTRY}aztec-fpc-contract-deployment:${TAG}