Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Bring boxes back to CI. Build and run using docker/docker-compose. #3727

Merged
merged 30 commits into from
Dec 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
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
95 changes: 62 additions & 33 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
name: "Build"
command: cond_spot_run_build noir-packages 32

noir-acir-tests:
noir-compile-acir-tests:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
Expand All @@ -123,7 +123,7 @@ jobs:
- *setup_env
- run:
name: "Build"
command: cond_spot_run_build noir-acir-tests 32
command: cond_spot_run_build noir-compile-acir-tests 32

# Barretenberg
barretenberg-wasm-linux-clang:
Expand Down Expand Up @@ -324,6 +324,17 @@ jobs:
name: "Build and test"
command: build l1-contracts

boxes-files:
machine:
image: ubuntu-2204:2023.07.2
resource_class: medium
steps:
- *checkout
- *setup_env
- run:
name: "Build"
command: build boxes-files

yarn-project-base:
machine:
image: ubuntu-2204:2023.07.2
Expand Down Expand Up @@ -423,38 +434,49 @@ jobs:
name: "Build and test"
command: build aztec-faucet | add_timestamps

boxes-blank-react:
machine:
image: ubuntu-2204:2023.07.2
resource_class: large
boxes:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Test via adhoc script"
command: ./boxes/run_tests blank-react
name: "Build"
command: cond_spot_run_build boxes 4

boxes-blank:
machine:
image: ubuntu-2204:2023.07.2
resource_class: large
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Test via adhoc script"
command: ./boxes/run_tests blank
name: "Test"
command: cond_spot_run_compose boxes 4 ./docker-compose.yml BOX=box-blank

boxes-blank-react:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Test"
command: cond_spot_run_compose boxes 4 ./docker-compose.yml BOX=box-blank-react

boxes-token:
machine:
image: ubuntu-2204:2023.07.2
resource_class: large
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Test via adhoc script"
command: ./boxes/run_tests token
name: "Test"
command: cond_spot_run_compose boxes 4 ./docker-compose.yml BOX=box-token

end-to-end:
machine:
Expand Down Expand Up @@ -1045,7 +1067,7 @@ workflows:
- noir-arm64
<<: *defaults
- noir-packages: *defaults
- noir-acir-tests:
- noir-compile-acir-tests:
requires:
- noir-ecr-manifest
<<: *defaults
Expand All @@ -1067,7 +1089,7 @@ workflows:
- barretenberg-acir-tests-bb:
requires:
- barretenberg-x86_64-linux-clang-assert
- noir-acir-tests
- noir-compile-acir-tests
<<: *defaults
- bb-js:
requires:
Expand All @@ -1080,7 +1102,7 @@ workflows:
- bb-js-acir-tests:
requires:
- bb-js
- noir-acir-tests
- noir-compile-acir-tests
<<: *defaults

- l1-contracts: *defaults
Expand All @@ -1089,13 +1111,16 @@ workflows:

- yellow-paper: *defaults

- boxes-files: *defaults

# Yarn Project
- yarn-project-base:
requires:
- l1-contracts
- bb-js
- noir-ecr-manifest
- noir-packages
- boxes-files
<<: *defaults
- yarn-project:
requires:
Expand All @@ -1113,18 +1138,22 @@ workflows:
- aztec-faucet: *defaults_yarn_project_prod

# Boxes.
# - boxes-blank-react:
# requires:
# - aztec-sandbox
# <<: *defaults
# - boxes-blank:
# requires:
# - aztec-sandbox
# <<: *defaults
# - boxes-token:
# requires:
# - aztec-sandbox
# <<: *defaults
- boxes:
requires:
- aztec-sandbox
<<: *defaults
- boxes-blank:
requires:
- boxes
<<: *defaults
- boxes-blank-react:
requires:
- boxes
<<: *defaults
- boxes-token:
requires:
- boxes
<<: *defaults

# End to end tests.
- e2e-join:
Expand Down
2 changes: 2 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build-system/ @charlielye
/build_manifest.yml @charlielye
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ All the packages that make up [Aztec](https://docs.aztec.network).
- [Aztec.nr](./yarn-project/aztec-nr/): A [Noir](https://noir-lang.org) framework for smart contracts on Aztec.
- [Aztec Sandbox](./yarn-project/aztec-sandbox/): A package for setting up a local dev net, including a local Ethereum network, deployed rollup contracts and Aztec execution environment.
- [Aztec.js](./yarn-project/aztec.js/): A tool for interacting with the Aztec network. It communicates via the [Private Execution Environment (PXE)](./yarn-project/pxe/).
- [Aztec Boxes](./yarn-project/boxes/): A minimal framework for building full stack applications for Aztec (using React).
- [Example contracts](./yarn-project/noir-contracts/): Example contracts for the Aztec network, written in Noir.
- [End to end tests](./yarn-project/end-to-end/): Integration tests written in Typescript--a good reference for how to use the packages for specific tasks.
- [Aztec Boxes](./boxes/): Example starter projects.

## Issues Board

Expand Down
1 change: 1 addition & 0 deletions aztec-up/bin/aztec-nargo
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
set -euo pipefail

export SKIP_NET=1
export PATH=$PATH:$HOME/bin

if [ "${1:-}" == "lsp" ]; then
docker run -i -v $HOME:$HOME -e HOME=$HOME aztecprotocol/noir $@
Expand Down
4 changes: 2 additions & 2 deletions barretenberg/acir_tests/Dockerfile.bb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/barretenberg-x86_64-linux-clang-assert
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/noir-acir-tests as noir-acir-tests
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/noir-compile-acir-tests as noir-acir-tests

FROM node:18.19.0-alpine
RUN apk update && apk add git bash curl jq coreutils
Expand All @@ -13,4 +13,4 @@ RUN FLOW=prove_then_verify ./run_acir_tests.sh
# TODO(https://github.com/AztecProtocol/barretenberg/issues/811) make this able to run the default test
RUN FLOW=prove_and_verify_goblin ./run_acir_tests.sh assert_statement
# Run 1_mul through native bb build, all_cmds flow, to test all cli args.
RUN VERBOSE=1 FLOW=all_cmds ./run_acir_tests.sh 1_mul
RUN VERBOSE=1 FLOW=all_cmds ./run_acir_tests.sh 1_mul
2 changes: 1 addition & 1 deletion barretenberg/acir_tests/Dockerfile.bb.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/bb.js
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/noir-acir-tests as noir-acir-tests
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/noir-compile-acir-tests as noir-acir-tests

FROM node:18.19.0
COPY --from=0 /usr/src/barretenberg/ts-build /usr/src/barretenberg/ts
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/acir_tests/Dockerfile.bb.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/barretenberg-x86_64-linux-clang-assert
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/barretenberg-x86_64-linux-clang-sol
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/noir-acir-tests as noir-acir-tests
FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/noir-compile-acir-tests as noir-acir-tests

FROM node:18.19.0-alpine
RUN apk update && apk add git bash curl jq
Expand Down
8 changes: 8 additions & 0 deletions boxes/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.yarn/*
!.yarn/releases
dest
node_modules
.tsbuildinfo
Dockerfile*
.dockerignore
docker-compose.yml
6 changes: 6 additions & 0 deletions boxes/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.yarn/*
!.yarn/releases

node_modules
dest
src/contracts/target
Loading