From 86a33140f9a65e518003b3f4c60f97d132f85b89 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Tue, 11 Jun 2024 13:54:21 +0100 Subject: [PATCH] chore: parallelise compilation of contracts and protocol circuits (#7009) --- noir-projects/Earthfile | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/noir-projects/Earthfile b/noir-projects/Earthfile index 80e1e157c17..2a7c32ab568 100644 --- a/noir-projects/Earthfile +++ b/noir-projects/Earthfile @@ -5,8 +5,6 @@ source: # Install nargo COPY ../noir/+nargo/nargo /usr/bin/nargo - # Install transpiler - COPY ../avm-transpiler/+build/avm-transpiler /usr/bin/avm-transpiler WORKDIR /usr/src/noir-projects @@ -16,10 +14,28 @@ source: # for debugging rebuilds RUN echo CONTENT HASH $(find . -type f -exec sha256sum {} ';' | sort | sha256sum | awk '{print $1}') | tee .content-hash -build: +build-contracts: FROM +source + + # Install transpiler + COPY ../avm-transpiler/+build/avm-transpiler /usr/bin/avm-transpiler + RUN cd noir-contracts && NARGO=nargo TRANSPILER=avm-transpiler ./bootstrap.sh + SAVE ARTIFACT noir-contracts + +build-protocol-circuits: + FROM +source RUN cd noir-protocol-circuits && NARGO=nargo ./bootstrap.sh + SAVE ARTIFACT noir-protocol-circuits + +build: + FROM +source + BUILD +build-contracts + BUILD +build-protocol-circuits + + COPY +build-contracts/noir-contracts ./noir-contracts + COPY +build-protocol-circuits/noir-protocol-circuits ./noir-protocol-circuits + SAVE ARTIFACT aztec-nr SAVE ARTIFACT noir-contracts SAVE ARTIFACT noir-protocol-circuits