-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Builds on top of @charlielye's #3866. Tested by doing `bootstrap_cache` + `l1-contracts/bootstrap` + `yarn-project/bootstrap` on an fresh clone. - Extracts missing folders - Removes global bootstrap_cache in favor of individual ones on each root folder - Manually builds the ts for bb.js (it's pretty fast, the main bottleneck was getting the wasm) - Adds missing foundation build step in yarn project bootstrap - Fixes `query_manifest` to handle alternate version of yq that return different strings for `type` - Installs foundry only if needed --------- Co-authored-by: Charlie Lye <karl.lye@gmail.com>
- Loading branch information
1 parent
6783aaa
commit 331598d
Showing
10 changed files
with
86 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
set -eu | ||
|
||
cd "$(dirname "$0")" | ||
source ../build-system/scripts/setup_env '' '' mainframe_$USER > /dev/null | ||
|
||
echo -e "\033[1mRetrieving bb.wasm from remote cache...\033[0m" | ||
extract_repo bb.js \ | ||
/usr/src/barretenberg/cpp/build-wasm/bin ./cpp/build-wasm \ | ||
/usr/src/barretenberg/cpp/build-wasm-threads/bin ./cpp/build-wasm-threads | ||
|
||
echo -e "\033[1mBuilding ESM bb.ts...\033[0m" | ||
(cd ts && ./bootstrap.sh esm) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,36 @@ | ||
#!/usr/bin/env bash | ||
# Given a repository, extracts the builds entire /usr/src dir to the given path. | ||
# Given a repository, extracts the builds entire /usr/src dir to the current path. | ||
# Can be given any number of pairs to extract the first path from the repo to the second path locally. | ||
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace | ||
set -eu | ||
|
||
REPOSITORY=$1 | ||
EXTRACT_FROM=${2:-/usr/src} | ||
EXTRACT_TO=${3:-./} | ||
IMAGE_COMMIT_URI=$(calculate_image_uri $REPOSITORY) | ||
shift | ||
|
||
IMAGE_COMMIT_URI=$(calculate_image_uri $REPOSITORY) | ||
echo "Pulling $IMAGE_COMMIT_URI..." | ||
ecr_login | ||
retry docker pull $IMAGE_COMMIT_URI | ||
TEMP_CONTAINER=$(docker create $IMAGE_COMMIT_URI) | ||
TEMP_CONTAINER=$(docker create $IMAGE_COMMIT_URI dummy_cmd) | ||
|
||
echo "Extracting $EXTRACT_FROM from $REPOSITORY to $EXTRACT_TO..." | ||
mkdir -p $EXTRACT_TO | ||
docker cp $TEMP_CONTAINER:$EXTRACT_FROM $EXTRACT_TO | ||
docker rm -v $TEMP_CONTAINER >/dev/null | ||
|
||
echo "Extracted contents:" | ||
ls -al $EXTRACT_TO | ||
function extract_from_temp_container { | ||
EXTRACT_FROM=$1 | ||
EXTRACT_TO=$2 | ||
echo "Extracting $EXTRACT_FROM from $REPOSITORY to $EXTRACT_TO..." | ||
mkdir -p $EXTRACT_TO | ||
docker cp $TEMP_CONTAINER:$EXTRACT_FROM $EXTRACT_TO | ||
} | ||
|
||
# Default to extracting the entire /usr/src dir | ||
if [ $# -eq 0 ]; then | ||
extract_from_temp_container /usr/src ./ | ||
else | ||
while [ $# -gt 0 ]; do | ||
extract_from_temp_container $1 $2 | ||
shift 2 | ||
done | ||
fi | ||
|
||
echo "Cleaning up temp container" | ||
docker rm -v $TEMP_CONTAINER >/dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
set -eu | ||
|
||
cd "$(dirname "$0")" | ||
source ../build-system/scripts/setup_env '' '' mainframe_$USER > /dev/null | ||
|
||
echo -e "\033[1mRetrieving noir packages from remote cache...\033[0m" | ||
extract_repo noir-packages /usr/src/noir/packages ./noir | ||
echo -e "\033[1mRetrieving nargo from remote cache...\033[0m" | ||
extract_repo noir /usr/src/noir/target/release ./noir/target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters