-
Notifications
You must be signed in to change notification settings - Fork 593
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·58 lines (49 loc) · 1.56 KB
/
bootstrap.sh
File metadata and controls
executable file
·58 lines (49 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/env bash
source $(git rev-parse --show-toplevel)/ci3/source_bootstrap
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'" ::: \
mock-protocol-circuits \
noir-protocol-circuits \
noir-contracts \
aztec-nr
}
function test_cmds {
parallel -k ./{}/bootstrap.sh test_cmds ::: noir-protocol-circuits noir-contracts aztec-nr noir-contracts-comp-failures
}
function test {
echo_header "noir-projects test"
test_cmds | filter_test_cmds | parallelize
}
function format {
parallel -k ./{}/bootstrap.sh format ::: noir-protocol-circuits noir-contracts aztec-nr
}
function pin-build {
echo_header "noir-projects pin-build"
parallel --tag --line-buffered --halt now,fail=1 './{}/bootstrap.sh pin-build' ::: \
mock-protocol-circuits \
noir-protocol-circuits
}
case "$cmd" in
"")
build
;;
"hash")
hash_str $(../noir/bootstrap.sh hash) $(cache_content_hash .rebuild_patterns)
;;
*)
default_cmd_handler "$@"
;;
esac