Skip to content

Commit

Permalink
chore: Add circuit input checks to bootstrap.sh (#11261)
Browse files Browse the repository at this point in the history
This pulls across the tests which are in earthly so they exist in
bootstrap.sh as well


https://github.com/AztecProtocol/aztec-packages/blob/642bce68a3e0eea29fa3ebb8c11cf4af02fe992b/noir-projects/Earthfile#L13-L17

There's a small amount of duplication here as it seems like `bootstrap
test` doesn't make use of `bootstrap test-cmds` in this package. I'm not
sure what's up so I'm doing light touches.
  • Loading branch information
TomAFrench authored Jan 17, 2025
1 parent f787a52 commit a718b15
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions noir-projects/noir-protocol-circuits/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ function build {
return $code
}

# We don't blindly execute all circuits as some will have no `Prover.toml`.
CIRCUITS_TO_EXECUTE="private-kernel-init private-kernel-inner private-kernel-reset private-kernel-tail-to-public private-kernel-tail rollup-base-private rollup-base-public rollup-block-root rollup-block-merge rollup-merge rollup-root"

function test {
set -eu
name=$(basename "$PWD")
Expand All @@ -146,6 +149,10 @@ function test {

RAYON_NUM_THREADS= $NARGO test --skip-brillig-constraints-check
cache_upload_flag $name-tests-$CIRCUITS_HASH

for circuit in $CIRCUITS_TO_EXECUTE; do
$NARGO execute --program-dir noir-projects/noir-protocol-circuits/crates/$circuit --silence-warnings --skip-brillig-constraints-check
done
}

export -f compile test build
Expand All @@ -171,6 +178,9 @@ case "$CMD" in
$NARGO test --list-tests --silence-warnings | while read -r package test; do
echo "noir-projects/scripts/run_test.sh noir-protocol-circuits $package $test"
done
for circuit in $CIRCUITS_TO_EXECUTE; do
echo "$NARGO execute --program-dir noir-projects/noir-protocol-circuits/crates/$circuit --silence-warnings --skip-brillig-constraints-check"
done
;;
"ci")
parallel --tag --line-buffered {} ::: build test
Expand Down

0 comments on commit a718b15

Please sign in to comment.