Skip to content

feat: fix CI workflows #81

feat: fix CI workflows

feat: fix CI workflows #81

Workflow file for this run

name: Circuits E2E Tests
on:
push:
branches:
- main
pull_request:
jobs:
test:
name: Circuits E2E Tests
runs-on: ubuntu-latest
environment: CI
env:
ETHEREUM_JSON_RPC_API_URL: ${{ secrets.ETHEREUM_JSON_RPC_API_URL }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: "20.x"
- name: Enable Corepack and Install Yarn 4
run: |
corepack enable
yarn set version latest
- name: Install Dependencies
run: yarn install
- name: Install Nargo
uses: noir-lang/[email protected]
with:
toolchain: 1.0.0-beta.18
- name: Install Barretenberg
run: |
curl -L https://raw.githubusercontent.com/AztecProtocol/aztec-packages/refs/heads/next/barretenberg/bbup/install | bash
~/.bb/bbup -nv 1.0.0-beta.18
sudo apt install libc++-dev
- name: Compile Circuit
run: |
nargo compile --package get_header --deny-warnings --skip-brillig-constraints-check
nargo compile --package get_account --deny-warnings --skip-brillig-constraints-check
nargo compile --package get_storage --deny-warnings --skip-brillig-constraints-check
nargo compile --package get_storage_recursive --deny-warnings --skip-brillig-constraints-check
nargo compile --package get_receipt --deny-warnings --skip-brillig-constraints-check
nargo compile --package get_transaction --deny-warnings --skip-brillig-constraints-check
nargo compile --package get_log --deny-warnings --skip-brillig-constraints-check
nargo compile --package is_dao_worthy --deny-warnings --skip-brillig-constraints-check
nargo compile --package is_ape_owner --deny-warnings --skip-brillig-constraints-check
# We cannot use the `--deny-warnings` option in `is_dao_worthy_recursive` because the `verify_proof` method generates warnings
# that are actually informational messages from the compiler and cannot be ignored.
nargo compile --package is_dao_worthy_recursive --skip-brillig-constraints-check
- name: Start Oracle Server
working-directory: ethereum/oracles
run: |
yarn oracle-server &
ORACLE_SERVER_PID=$!
echo "ORACLE_SERVER_PID=$ORACLE_SERVER_PID" >> $GITHUB_ENV
- name: Generate Witnesses
run: |
nargo execute --package get_header --oracle-resolver=http://localhost:5555 --skip-brillig-constraints-check
nargo execute --package get_account --oracle-resolver=http://localhost:5555 --skip-brillig-constraints-check
nargo execute --package get_storage --oracle-resolver=http://localhost:5555 --skip-brillig-constraints-check
nargo execute --package get_receipt --oracle-resolver=http://localhost:5555 --skip-brillig-constraints-check
nargo execute --package get_transaction --oracle-resolver=http://localhost:5555 --skip-brillig-constraints-check
nargo execute --package get_log --oracle-resolver=http://localhost:5555 --skip-brillig-constraints-check
nargo execute --package is_dao_worthy --oracle-resolver=http://localhost:5555 --skip-brillig-constraints-check
nargo execute --package is_ape_owner --oracle-resolver=http://localhost:5555 --skip-brillig-constraints-check
- name: Generate Proofs and Verification Keys
run: |
export PATH="$HOME/.bb:$PATH"
bb prove -b ./target/get_header.json -w ./target/get_header.gz -o ./target/get_header --write_vk
bb prove -b ./target/get_account.json -w ./target/get_account.gz -o ./target/get_account --write_vk
bb prove -b ./target/get_storage.json -w ./target/get_storage.gz -o ./target/get_storage --write_vk
bb prove -b ./target/get_receipt.json -w ./target/get_receipt.gz -o ./target/get_receipt --write_vk
bb prove -b ./target/get_transaction.json -w ./target/get_transaction.gz -o ./target/get_transaction --write_vk
bb prove -b ./target/get_log.json -w ./target/get_log.gz -o ./target/get_log --write_vk
bb prove -b ./target/is_dao_worthy.json -w ./target/is_dao_worthy.gz -o ./target/is_dao_worthy --write_vk
bb prove -b ./target/is_ape_owner.json -w ./target/is_ape_owner.gz -o ./target/is_ape_owner --write_vk
- name: Debug - List generated files
run: |
echo "=== Contents of target directory ==="
ls -la ./target/ | head -30
echo "=== Looking for VK directories ==="
find ./target -name "*vk*" -type d | head -10
echo "=== Looking for proof files ==="
ls -la ./target/get_header* || true
# - name: Generate verification key for recursive proof
# working-directory: ethereum/oracles
# run: |
# # Verification key generation uses the TypeScript bindings to generate the VK needed for recursive proofs.
# yarn generate-get-storage-vk
# - name: Generate Recursive Witness
# run: |
# export NARGO_FOREIGN_CALL_TIMEOUT=100000 # miliseconds
# nargo execute --package is_dao_worthy_recursive --oracle-resolver=http://localhost:5555
# - name: Generate Recursive Proof
# run: |
# export PATH="$HOME/.bb:$PATH"
# bb prove -b ./target/is_dao_worthy_recursive.json -w ./target/is_dao_worthy_recursive.gz -o ./target/is_dao_worthy_recursive --write_vk
- name: Verify Proofs
run: |
export PATH="$HOME/.bb:$PATH"
bb verify -k ./target/get_header_vk -p ./target/get_header
bb verify -k ./target/get_account_vk -p ./target/get_account
bb verify -k ./target/get_storage_vk -p ./target/get_storage
bb verify -k ./target/get_receipt_vk -p ./target/get_receipt
bb verify -k ./target/get_transaction_vk -p ./target/get_transaction
bb verify -k ./target/get_log_vk -p ./target/get_log
bb verify -k ./target/is_dao_worthy_vk -p ./target/is_dao_worthy
bb verify -k ./target/is_ape_owner_vk -p ./target/is_ape_owner
- name: Stop Oracle Server
if: always()
run: kill $ORACLE_SERVER_PID