Skip to content

Commit

Permalink
chore: parallelise compilation of contracts and protocol circuits (#7009
Browse files Browse the repository at this point in the history
)
  • Loading branch information
TomAFrench authored Jun 11, 2024
1 parent 2624c26 commit 86a3314
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 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 transpiler
COPY ../avm-transpiler/+build/avm-transpiler /usr/bin/avm-transpiler

WORKDIR /usr/src/noir-projects

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

0 comments on commit 86a3314

Please sign in to comment.