diff --git a/noir-projects/Earthfile b/noir-projects/Earthfile index f3e05320ff2..7a3b55ef995 100644 --- a/noir-projects/Earthfile +++ b/noir-projects/Earthfile @@ -5,8 +5,6 @@ source: # Install nargo COPY ../noir/+nargo/nargo /usr/bin/nargo - # Install bb - COPY ../barretenberg/cpp/+preset-release/bin/bb /usr/src/barretenberg/cpp/build/bin/bb WORKDIR /usr/src/noir-projects @@ -33,6 +31,9 @@ build-protocol-circuits: FROM +source RUN --secret AWS_ACCESS_KEY_ID --secret AWS_SECRET_ACCESS_KEY mkdir -p ~/.aws && \ bash -c 'echo -e "[default]\naws_access_key_id=$AWS_ACCESS_KEY_ID\naws_secret_access_key=$AWS_SECRET_ACCESS_KEY" > ~/.aws/credentials' + + # Install bb + COPY ../barretenberg/cpp/+preset-release/bin/bb /usr/src/barretenberg/cpp/build/bin/bb RUN yarn RUN cd noir-protocol-circuits && BB_HASH=$bb_source_hash NARGO=nargo ./bootstrap.sh SAVE ARTIFACT noir-protocol-circuits @@ -43,6 +44,9 @@ build-mock-protocol-circuits: FROM +source RUN --secret AWS_ACCESS_KEY_ID --secret AWS_SECRET_ACCESS_KEY mkdir -p ~/.aws && \ bash -c 'echo -e "[default]\naws_access_key_id=$AWS_ACCESS_KEY_ID\naws_secret_access_key=$AWS_SECRET_ACCESS_KEY" > ~/.aws/credentials' + + # Install bb + COPY ../barretenberg/cpp/+preset-release/bin/bb /usr/src/barretenberg/cpp/build/bin/bb RUN yarn RUN cd mock-protocol-circuits && BB_HASH=$bb_source_hash NARGO=nargo ./bootstrap.sh SAVE ARTIFACT mock-protocol-circuits @@ -87,9 +91,10 @@ test: NARGO_FOREIGN_CALL_TIMEOUT=300000 nargo test --silence-warnings --oracle-resolver http://localhost:8080 format: - FROM +build + FROM +source WORKDIR /usr/src/noir-projects/noir-protocol-circuits + RUN yarn && node ./generate_variants.js RUN nargo fmt --check WORKDIR /usr/src/noir-projects/mock-protocol-circuits @@ -102,13 +107,16 @@ format: RUN nargo fmt --check gates-report: - FROM +build-protocol-circuits + FROM +source WORKDIR /usr/src/noir-projects - COPY ./gates_report.sh ./gates_report.sh - COPY ../barretenberg/cpp/+preset-clang-assert/bin/bb /usr/src/barretenberg/cpp/build/bin/bb - + # Install bb + COPY ../barretenberg/cpp/+preset-release/bin/bb /usr/src/barretenberg/cpp/build/bin/bb ENV BB_BIN /usr/src/barretenberg/cpp/build/bin/bb + + RUN cd noir-protocol-circuits && yarn && node ./generate_variants.js && nargo compile --silence-warnings + + COPY ./gates_report.sh ./gates_report.sh RUN ./gates_report.sh SAVE ARTIFACT ./noir-protocol-circuits/gates_report.json gates_report.json