Skip to content

Commit e708f71

Browse files
authored
Merge pull request #17946 from MinaProtocol/lyh/hf-test-improvement
Improve HF test network bandwitdth usage
2 parents 7c90a01 + 5ddd2e5 commit e708f71

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

scripts/hardfork/build-and-test.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ fi
6666

6767
if [[ ! -L compatible-devnet ]]; then
6868
if [[ $# == 0 ]]; then
69-
compatible_build=$(mktemp -d)
70-
git clone -b compatible --single-branch "https://github.com/MinaProtocol/mina.git" "$compatible_build"
69+
compatible_build=$(mktemp --tmpdir -d mina-compatible-worktree.XXXXXXXXXX)
70+
git fetch origin compatible
71+
git worktree add "$compatible_build" origin/compatible
7172
cd "$compatible_build"
7273
else
7374
git checkout -f $1
@@ -76,7 +77,7 @@ if [[ ! -L compatible-devnet ]]; then
7677
compatible_build="$INIT_DIR"
7778
fi
7879
git submodule sync --recursive
79-
git submodule update --init --recursive
80+
git submodule update --init --recursive --depth 1
8081
nix "${NIX_OPTS[@]}" build "$compatible_build?submodules=1#devnet" --out-link "$INIT_DIR/compatible-devnet"
8182
nix "${NIX_OPTS[@]}" build "$compatible_build?submodules=1#devnet.genesis" --out-link "$INIT_DIR/compatible-devnet"
8283
if [[ $# == 0 ]]; then
@@ -89,7 +90,7 @@ if [[ $# -gt 0 ]]; then
8990
# Branch is specified, this is a CI run
9091
git checkout -f $1
9192
git submodule sync --recursive
92-
git submodule update --init --recursive
93+
git submodule update --init --recursive --depth 1
9394
fi
9495
nix "${NIX_OPTS[@]}" build "$INIT_DIR?submodules=1#devnet" --out-link "$INIT_DIR/fork-devnet"
9596
nix "${NIX_OPTS[@]}" build "$INIT_DIR?submodules=1#devnet.genesis" --out-link "$INIT_DIR/fork-devnet"

0 commit comments

Comments
 (0)