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(ci): skip vk generation on protocol-circuits-gates-report and noir-format #8398

Merged
merged 6 commits into from
Sep 5, 2024
Merged
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
22 changes: 15 additions & 7 deletions noir-projects/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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 link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: could we have a separate job that just compiles the protocol circuits without key gen. Then that job becomes the target of the gates-report and build-protocol-circuits

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep but that gets into needing to restructure the bootstrap scripts so it's not doing everything. We're way more likely to get backsliding in future as other people change things if we go down that route (as well as it being more invasive) so this seemed cleaner.


COPY ./gates_report.sh ./gates_report.sh
RUN ./gates_report.sh

SAVE ARTIFACT ./noir-protocol-circuits/gates_report.json gates_report.json
Loading