From ca357409604cf6d4ffb5d5f8d0daf2a65d92b6ea Mon Sep 17 00:00:00 2001 From: Tom French Date: Thu, 5 Sep 2024 15:57:00 +0100 Subject: [PATCH 1/3] chore(ci): skip vk generation on `protocol-circuits-gates-report` --- noir-projects/Earthfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/noir-projects/Earthfile b/noir-projects/Earthfile index f3e05320ff25..e17c27924346 100644 --- a/noir-projects/Earthfile +++ b/noir-projects/Earthfile @@ -87,7 +87,7 @@ 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 nargo fmt --check @@ -102,11 +102,10 @@ 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 ENV BB_BIN /usr/src/barretenberg/cpp/build/bin/bb RUN ./gates_report.sh From 4b8475c399b59aadab09857a9a1ece72c9c4fe24 Mon Sep 17 00:00:00 2001 From: Tom French Date: Thu, 5 Sep 2024 16:00:02 +0100 Subject: [PATCH 2/3] . --- noir-projects/Earthfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/noir-projects/Earthfile b/noir-projects/Earthfile index e17c27924346..4eb6a1accb4c 100644 --- a/noir-projects/Earthfile +++ b/noir-projects/Earthfile @@ -105,9 +105,12 @@ gates-report: FROM +source WORKDIR /usr/src/noir-projects - COPY ./gates_report.sh ./gates_report.sh - ENV BB_BIN /usr/src/barretenberg/cpp/build/bin/bb + + RUN yarn + RUN cd noir-protocol-circuits && BB_HASH=$bb_source_hash NARGO=nargo ./bootstrap.sh + + COPY ./gates_report.sh ./gates_report.sh RUN ./gates_report.sh SAVE ARTIFACT ./noir-protocol-circuits/gates_report.json gates_report.json From c3525c2636b17bfca6a260c2a51a340c65faa44e Mon Sep 17 00:00:00 2001 From: Tom French Date: Thu, 5 Sep 2024 18:01:15 +0100 Subject: [PATCH 3/3] . --- noir-projects/Earthfile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/noir-projects/Earthfile b/noir-projects/Earthfile index 4eb6a1accb4c..7a3b55ef9956 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 @@ -90,6 +94,7 @@ format: 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 @@ -105,10 +110,11 @@ gates-report: FROM +source WORKDIR /usr/src/noir-projects + # 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 yarn - RUN cd noir-protocol-circuits && BB_HASH=$bb_source_hash NARGO=nargo ./bootstrap.sh + 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