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

fix: AVM / aztec-up CircleCI issues #7045

Merged
merged 9 commits into from
Jun 13, 2024
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
52 changes: 43 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ jobs:
command: cond_spot_run_build noir-packages 32
aztec_manifest_key: noir-packages

avm-transpiler:
avm-transpiler-x86_64:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
Expand All @@ -243,7 +243,7 @@ jobs:
command: cond_spot_run_build avm-transpiler 32
aztec_manifest_key: avm-transpiler

aztec-nargo:
avm-transpiler-arm64:
docker:
- image: aztecprotocol/alpine-build-image
resource_class: small
Expand All @@ -252,7 +252,31 @@ jobs:
- *setup_env
- run:
name: "Build"
command: cond_spot_run_build aztec-nargo 32
command: cond_spot_run_build avm-transpiler 32 arm64
aztec_manifest_key: avm-transpiler

avm-transpiler-ecr-manifest:
machine:
image: default
resource_class: medium
steps:
- *checkout
- *setup_env
- run:
name: "Create ECR manifest"
command: create_ecr_manifest avm-transpiler x86_64,arm64
aztec_manifest_key: avm-transpiler

aztec-nargo:
machine:
image: default
resource_class: small
steps:
- *checkout
- *setup_env
- run:
name: "Build image"
command: build aztec-nargo
aztec_manifest_key: aztec-nargo

l1-contracts:
Expand Down Expand Up @@ -429,8 +453,9 @@ jobs:
- run:
name: "Update aztec-up"
command: |
should_release || exit 0
deploy_terraform "" aztec-up/terraform
if [ -n "$COMMIT_TAG" ]; then
deploy_terraform "" aztec-up/terraform
fi

# Repeatable config for defining the workflow below.
defaults: &defaults
Expand Down Expand Up @@ -510,15 +535,24 @@ workflows:
<<: *defaults

# Transpiler
- avm-transpiler:
- avm-transpiler-x86_64:
requires:
- noir-ecr-manifest
- noir-x86_64
<<: *defaults
- avm-transpiler-arm64:
requires:
- noir-arm64
<<: *defaults
- avm-transpiler-ecr-manifest:
requires:
- avm-transpiler-x86_64
- avm-transpiler-arm64
<<: *defaults

# aztec-nargo (nargo & transpiler)
- aztec-nargo:
requires:
- avm-transpiler
- avm-transpiler-ecr-manifest
<<: *defaults

# Barretenberg
Expand All @@ -536,7 +570,7 @@ workflows:

- noir-projects:
requires:
- avm-transpiler
- avm-transpiler-ecr-manifest
- noir-ecr-manifest
<<: *defaults

Expand Down
4 changes: 2 additions & 2 deletions avm-transpiler/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn main() {
let in_contract_artifact_path = &args[1];
let out_transpiled_artifact_path = &args[2];

// Parse original (pre-transpile) contract
// Parse original (pre-transpile) contract.
let contract_json =
fs::read_to_string(Path::new(in_contract_artifact_path)).expect("Unable to read file");
let raw_json_obj: serde_json::Value =
Expand All @@ -33,7 +33,7 @@ fn main() {
return;
}

// Backup the original file
// Backup the original file.
std::fs::copy(
Path::new(in_contract_artifact_path),
Path::new(&(in_contract_artifact_path.clone() + ".bak")),
Expand Down
2 changes: 2 additions & 0 deletions build-system/scripts/deploy_terraform
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export TF_VAR_CHAIN_ID=$CHAIN_ID
if [ -n "$REPOSITORY" ]; then
BACKEND_CONFIG=-backend-config="key=$DEPLOY_TAG/$REPOSITORY"
echo "Using backend key $DEPLOY_TAG/$REPOSITORY"
else
BACKEND_CONFIG=""
fi

terraform init -input=false $BACKEND_CONFIG
Expand Down
2 changes: 2 additions & 0 deletions build_manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ avm-transpiler:
- ^noir/
dependencies:
- noir
multiarch: host

aztec-nargo:
buildDir: .
Expand All @@ -61,6 +62,7 @@ aztec-nargo:
dependencies:
- avm-transpiler
- noir
multiarch: buildx

# Compiles all aztec noir projects using nargo and the avm-transpiler.
noir-projects:
Expand Down
Loading