Skip to content

Commit

Permalink
chore(ci): migrate protocol-circuits-gate-diff to earthly (#6204)
Browse files Browse the repository at this point in the history
This workflow has quickly become our slowest workflow due to the need to
build `bb` and `nargo` inside github actions.

This PR migrates the `protocol-circuits-gate-diff` to earthly so we can
reuse the speedy AWS build of bb/nargo we're doing anyway.
  • Loading branch information
TomAFrench authored May 3, 2024
1 parent 8418eac commit 4b43295
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 104 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,41 @@ jobs:
working-directory: ./barretenberg/cpp/
timeout-minutes: 15
run: earthly-ci --no-output +bench-ultra-honk --bench_mode=cache

protocol-circuits-gates-report:
needs: setup
runs-on: ${{ inputs.username || github.actor }}-x86
steps:
- {
uses: actions/checkout@v4,
with: { ref: "${{ github.event.pull_request.head.sha }}" },
}
# Only allow one memory-hunger prover test to use this runner
- uses: ./.github/ci-setup-action
with:
dockerhub_password: "${{ secrets.DOCKERHUB_PASSWORD }}"
concurrency_key: protocol-circuits-gates-report-${{ inputs.username || github.actor }}-x86
- name: "Noir Protocol Circuits Report"
working-directory: ./noir-projects/
timeout-minutes: 25
run: |
earthly-ci --artifact +gates-report/gates_report.json
mv gates_report.json ../protocol_circuits_report.json
- name: Compare gates reports
id: gates_diff
uses: vezenovm/noir-gates-diff@acf12797860f237117e15c0d6e08d64253af52b6
with:
report: protocol_circuits_report.json
summaryQuantile: 0 # Display any diff in gate count

- name: Add gates diff to sticky comment
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: marocchino/sticky-pull-request-comment@v2
with:
# delete the comment in case changes no longer impact circuit sizes
delete: ${{ !steps.gates_diff.outputs.markdown }}
message: ${{ steps.gates_diff.outputs.markdown }}

merge-check:
runs-on: ubuntu-latest
Expand Down
104 changes: 0 additions & 104 deletions .github/workflows/protocol-circuits-gate-diff.yml

This file was deleted.

10 changes: 10 additions & 0 deletions noir-projects/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,13 @@ test:
RUN cd noir-protocol-circuits && nargo test --silence-warnings
RUN cd aztec-nr && nargo test --silence-warnings
RUN cd noir-contracts && nargo test --silence-warnings

gates-report:
FROM +build
WORKDIR /usr/src/noir-projects/noir-protocol-circuits

COPY ../barretenberg/cpp/+preset-clang-assert/bin/bb /usr/src/barretenberg/cpp/build/bin/bb

RUN NARGO_BACKEND_PATH=/usr/src/barretenberg/cpp/build/bin/bb nargo info --json > gates_report.json

SAVE ARTIFACT gates_report.json gates_report.json

0 comments on commit 4b43295

Please sign in to comment.