Skip to content

Commit

Permalink
tilt: m1 flag
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-gray committed Nov 30, 2024
1 parent 02cdf9e commit 2c3b155
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
13 changes: 13 additions & 0 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ update_settings(max_parallel_updates = 10)
# Runtime configuration
config.define_bool("ci", False, "We are running in CI")
config.define_bool("manual", False, "Set TRIGGER_MODE_MANUAL by default")
config.define_bool("m1", False, "Build Solana from source for m1 arm64")

config.define_string("num", False, "Number of guardian nodes to run")

Expand Down Expand Up @@ -100,6 +101,7 @@ btc = cfg.get("btc", False)
redis = cfg.get('redis', ci)
generic_relayer = cfg.get("generic_relayer", ci)
query_server = cfg.get("query_server", ci)
m1 = cfg.get("m1", False)

if ci:
guardiand_loglevel = cfg.get("guardiand_loglevel", "warn")
Expand Down Expand Up @@ -485,6 +487,17 @@ if solana or pythnet:

# solana local devnet

build_args = {}
if m1:
build_args = {"BASE_IMAGE": "ghcr.io/wormholelabs-xyz/solana-test-validator-m1:1.17.29@sha256:c5a43c0762f2dab4873a9e632a389029b6d5f706be7dfb89a42a66cc65a3dd24"}

docker_build(
ref = "solana-test-validator",
context = "solana",
dockerfile = "solana/Dockerfile.test-validator",
build_args = build_args
)

k8s_yaml_with_ns("devnet/solana-devnet.yaml")

k8s_resource(
Expand Down
4 changes: 2 additions & 2 deletions devnet/solana-devnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ spec:
terminationGracePeriodSeconds: 1
containers:
- name: devnet
image: solana-contract
image: solana-test-validator
command:
- /root/.local/share/solana/install/active_release/bin/solana-test-validator
- solana-test-validator
- --bpf-program
- Bridge1p5gheXUvJ6jGWGeCsgPKgnE3YgdGKRVCMY9o
- /opt/solana/deps/bridge.so
Expand Down
3 changes: 3 additions & 0 deletions solana/Dockerfile.test-validator
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ARG BASE_IMAGE=solana-contract
FROM ${BASE_IMAGE}
COPY --from=solana-contract /opt/solana/deps/ /opt/solana/deps/

0 comments on commit 2c3b155

Please sign in to comment.