Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

chore: split out yarn-project bootstrap.sh #1790

Merged
merged 1 commit into from
Aug 24, 2023
Merged
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
36 changes: 1 addition & 35 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,38 +35,4 @@ if [ ! -f ~/.nvm/nvm.sh ]; then
fi

circuits/cpp/bootstrap.sh

if [ "$(uname)" = "Darwin" ]; then
# works around https://github.com/AztecProtocol/aztec3-packages/issues/158
echo "Note: not sourcing nvm on Mac, see github #158"
else
\. ~/.nvm/nvm.sh
fi
nvm install

cd yarn-project
yarn install --immutable

# Build the necessary dependencies for noir contracts typegen.
for DIR in foundation noir-compiler circuits.js; do
echo "Building $DIR..."
cd $DIR
yarn build
cd ..
done

# Run remake bindings before building noir contracts or l1 contracts as they depend on files created by it.
yarn --cwd circuits.js remake-bindings
yarn --cwd circuits.js remake-constants

(cd noir-contracts && ./bootstrap.sh)
(cd .. && l1-contracts/bootstrap.sh)

# Until we push .yarn/cache, we still need to install.
yarn
# We do not need to build individual packages, yarn build will build the root tsconfig.json
yarn build
cd ..

echo
echo "Success! You could now run e.g.: ./scripts/tmux-splits e2e_deploy_contract"
yarn-project/bootstrap.sh
1 change: 1 addition & 0 deletions circuits/cpp/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -eu

export WASI_VERSION=20

# Navigate to script folder
cd "$(dirname "$0")"

# Update the submodule
Expand Down
38 changes: 38 additions & 0 deletions yarn-project/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash
set -eu

# Navigate to script folder
cd "$(dirname "$0")"

if [ "$(uname)" = "Darwin" ]; then
# works around https://github.com/AztecProtocol/aztec3-packages/issues/158
echo "Note: not sourcing nvm on Mac, see github #158"
else
\. ~/.nvm/nvm.sh
fi
nvm install

yarn install --immutable

# Build the necessary dependencies for noir contracts typegen.
for DIR in foundation noir-compiler circuits.js; do
echo "Building $DIR..."
cd $DIR
yarn build
cd ..
done

# Run remake bindings before building noir contracts or l1 contracts as they depend on files created by it.
yarn --cwd circuits.js remake-bindings
yarn --cwd circuits.js remake-constants

(cd noir-contracts && ./bootstrap.sh)
(cd .. && l1-contracts/bootstrap.sh)

# Until we push .yarn/cache, we still need to install.
yarn
# We do not need to build individual packages, yarn build will build the root tsconfig.json
yarn build

echo
echo "Success! You can now e.g. run anvil and end-to-end tests"