Skip to content
Draft
Show file tree
Hide file tree
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
17 changes: 12 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ endef
# PHONY TARGETS - List every target that has a file/dir of the same name.
#==============================================================================

.PHONY: noir barretenberg noir-projects l1-contracts release-image boxes playground docs aztec-up spartan
.PHONY: noir barretenberg noir-projects noir-projects-deps l1-contracts release-image boxes playground docs aztec-up spartan

#==============================================================================
# BOOTSTRAP TARGETS
Expand Down Expand Up @@ -284,19 +284,26 @@ claude-tests:
# Noir Projects
#==============================================================================

noir-protocol-circuits: noir bb-cpp-native
# Serial pre-step that caches the shared `noir-lang/*` git dependencies into
# ~/.nargo/. Without this, the four noir-projects targets below race on the
# same cache and one of the parallel `nargo` invocations can fail (e.g. with
# a "Could not resolve host" git clone error) before the others populate it.
noir-projects-deps: noir
$(call run_command,$@,$(ROOT)/noir-projects,$(ROOT)/ci3/denoise './bootstrap.sh prep')

noir-protocol-circuits: noir bb-cpp-native noir-projects-deps
$(call build,$@,noir-projects/noir-protocol-circuits)

noir-protocol-circuits-tests: noir noir-protocol-circuits
$(call test,$@,noir-projects/noir-protocol-circuits)

mock-protocol-circuits: noir bb-cpp-native
mock-protocol-circuits: noir bb-cpp-native noir-projects-deps
$(call build,$@,noir-projects/mock-protocol-circuits)

noir-contracts: noir bb-cpp-native
noir-contracts: noir bb-cpp-native noir-projects-deps
$(call build,$@,noir-projects/noir-contracts)

aztec-nr: noir bb-cpp-native
aztec-nr: noir bb-cpp-native noir-projects-deps
$(call build,$@,noir-projects/aztec-nr)

# These tests are not included in the dep tree.
Expand Down
26 changes: 14 additions & 12 deletions noir-projects/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
#!/usr/bin/env bash
source $(git rev-parse --show-toplevel)/ci3/source_bootstrap

# Use fmt as a trick to download dependencies.
# Otherwise parallel runs of nargo will trip over each other trying to download dependencies.
# Also doubles up as our formatting check.
# Exposed as a top-level command so the root Makefile can run it as a serial barrier
# before the parallel noir-projects sub-builds.
function prep {
set -eu
(cd noir-protocol-circuits && yarn && node ./scripts/generate_variants.js)
for dir in noir-contracts noir-protocol-circuits mock-protocol-circuits aztec-nr; do
(cd $dir && ../../noir/noir-repo/target/release/nargo fmt --check)
done
}
export -f prep

function build {
echo_header "noir-projects build"

# Use fmt as a trick to download dependencies.
# Otherwise parallel runs of nargo will trip over each other trying to download dependencies.
# Also doubles up as our formatting check.
function prep {
set -eu
(cd noir-protocol-circuits && yarn && node ./scripts/generate_variants.js)
for dir in noir-contracts noir-protocol-circuits mock-protocol-circuits aztec-nr; do
(cd $dir && ../../noir/noir-repo/target/release/nargo fmt --check)
done
}
export -f prep

denoise prep

parallel --tag --line-buffered --joblog joblog.txt --halt now,fail=1 denoise "'./{}/bootstrap.sh $cmd'" ::: \
Expand Down
Loading