Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

tilt: mac improvements #4181

Merged
merged 2 commits into from
Dec 6, 2024
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
13 changes: 11 additions & 2 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ config.define_bool("manual", False, "Set TRIGGER_MODE_MANUAL by default")
config.define_bool("m1", False, "Use this flag for M-series Macs (e.g. use an arm64 solana-test-validator due to AVX requirement)")

config.define_string("num", False, "Number of guardian nodes to run")
config.define_string("maxWorkers", False, "Maximum number of workers for sdk-ci-tests. See https://jestjs.io/docs/cli#--maxworkersnumstring")

# You do not usually need to set this argument - this argument is for debugging only. If you do use a different
# namespace, note that the "wormhole" namespace is hardcoded in tests and don't forget specifying the argument
Expand Down Expand Up @@ -78,6 +79,7 @@ config.define_bool("query_server", False, "Enable cross-chain query server")

cfg = config.parse()
num_guardians = int(cfg.get("num", "1"))
max_workers = cfg.get("maxWorkers", "50%")
namespace = cfg.get("namespace", "wormhole")
webHost = cfg.get("webHost", "localhost")
ci = cfg.get("ci", False)
Expand Down Expand Up @@ -644,8 +646,10 @@ if ci_tests:
k8s_yaml_with_ns(
encode_yaml_stream(
set_env_in_jobs(
set_env_in_jobs(read_yaml_stream("devnet/tests.yaml"), "NUM_GUARDIANS", str(num_guardians)),
"BOOTSTRAP_PEERS", str(ccqBootstrapPeers)))
set_env_in_jobs(
set_env_in_jobs(read_yaml_stream("devnet/tests.yaml"), "NUM_GUARDIANS", str(num_guardians)),
"BOOTSTRAP_PEERS", str(ccqBootstrapPeers)),
"MAX_WORKERS", max_workers))
)

# separate resources to parallelize docker builds
Expand Down Expand Up @@ -685,12 +689,14 @@ if terra_classic:
ref = "terra-image",
context = "./terra/devnet",
dockerfile = "terra/devnet/Dockerfile",
platform = "linux/amd64",
)

docker_build(
ref = "terra-contracts",
context = "./terra",
dockerfile = "./terra/Dockerfile",
platform = "linux/amd64",
)

k8s_yaml_with_ns("devnet/terra-devnet.yaml")
Expand All @@ -711,13 +717,15 @@ if terra2 or wormchain:
context = ".",
dockerfile = "./cosmwasm/Dockerfile",
target = "artifacts",
platform = "linux/amd64",
)

if terra2:
docker_build(
ref = "terra2-image",
context = "./cosmwasm/deployment/terra2/devnet",
dockerfile = "./cosmwasm/deployment/terra2/devnet/Dockerfile",
platform = "linux/amd64",
)

docker_build(
Expand Down Expand Up @@ -825,6 +833,7 @@ if wormchain:
ref = "wormchaind-image",
context = ".",
dockerfile = "./wormchain/Dockerfile",
platform = "linux/amd64",
build_args = {"num_guardians": str(num_guardians)},
only = [],
ignore = ["./wormchain/testing", "./wormchain/ts-sdk", "./wormchain/design", "./wormchain/vue", "./wormchain/build/wormchaind"],
Expand Down
2 changes: 1 addition & 1 deletion testing/sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ done
while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' spy:6060/metrics)" != "200" ]]; do sleep 5; done
while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' ibc-relayer:7597/debug/pprof/)" != "200" ]]; do sleep 5; done
while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' relayer-engine:3000/metrics)" != "200" ]]; do sleep 5; done
CI=true npm --prefix ../sdk/js run test-ci
CI=true npm --prefix ../sdk/js run test-ci -- --maxWorkers=$MAX_WORKERS
Loading