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 Dec 6, 2024
1 parent 55016ae commit a397e8e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
13 changes: 11 additions & 2 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ load('ext://namespace', 'namespace_create', 'namespace_inject')
load('ext://git_resource', 'git_checkout')

git_checkout('https://github.com/wormhole-foundation/wormhole.git#main', '.wormhole/', unsafe_mode=True)
local(['sed','-i','/{chainId: vaa.ChainIDEthereum, addr: "000000000000000000000000855FA758c77D68a04990E992aA4dcdeF899F654A"},/i {chainId: vaa.ChainIDSolana, addr: "8bf0b547c96edc5c1d512ca25c5c1d1812a180438a0046e511d1fb61561d5cdf"},{chainId: vaa.ChainIDSolana, addr: "0a490691c21334ca173d9ce386e2a86774ce173f351db10d5d0cccc5c4875376"},{chainId: vaa.ChainIDEthereum, addr: "0000000000000000000000006f84742680311cef5ba42bc10a71a4708b4561d1"},{chainId: vaa.ChainIDEthereum, addr: "0000000000000000000000009ba423008e530c4d464da15f0c9652942216f019"},{chainId: vaa.ChainIDBSC, addr: "0000000000000000000000006f84742680311cef5ba42bc10a71a4708b4561d1"},{chainId: vaa.ChainIDBSC, addr: "000000000000000000000000baac7efcddde498b0b791eda92d43b20f5cd8ff6"},', '.wormhole/node/pkg/accountant/ntt_config.go'])
local(['sed','-i.bak','s/{chainId: vaa.ChainIDEthereum, addr: "000000000000000000000000855FA758c77D68a04990E992aA4dcdeF899F654A"},/{chainId: vaa.ChainIDEthereum, addr: "000000000000000000000000855FA758c77D68a04990E992aA4dcdeF899F654A"},{chainId: vaa.ChainIDSolana, addr: "8bf0b547c96edc5c1d512ca25c5c1d1812a180438a0046e511d1fb61561d5cdf"},{chainId: vaa.ChainIDSolana, addr: "0a490691c21334ca173d9ce386e2a86774ce173f351db10d5d0cccc5c4875376"},{chainId: vaa.ChainIDEthereum, addr: "0000000000000000000000006f84742680311cef5ba42bc10a71a4708b4561d1"},{chainId: vaa.ChainIDEthereum, addr: "0000000000000000000000009ba423008e530c4d464da15f0c9652942216f019"},{chainId: vaa.ChainIDBSC, addr: "0000000000000000000000006f84742680311cef5ba42bc10a71a4708b4561d1"},{chainId: vaa.ChainIDBSC, addr: "000000000000000000000000baac7efcddde498b0b791eda92d43b20f5cd8ff6"},/g', '.wormhole/node/pkg/accountant/ntt_config.go'])

load(".wormhole/Tiltfile", "namespace", "k8s_yaml_with_ns")
load(".wormhole/Tiltfile", "namespace", "k8s_yaml_with_ns", "m1")

# Solana deploy
docker_build(
Expand All @@ -14,6 +14,15 @@ docker_build(
ignore=["./sdk/__tests__", "./sdk/Dockerfile", "./sdk/ci.yaml", "./sdk/**/dist", "./sdk/node_modules", "./sdk/**/node_modules"],
dockerfile = "./solana/Dockerfile",
)
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("./solana/solana-devnet.yaml")
k8s_resource(
"solana-devnet",
Expand Down
4 changes: 2 additions & 2 deletions evm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/foundry-rs/foundry@sha256:8b843eb65cc7b155303b316f65d27173c862b37719dc095ef3a2ef27ce8d3c00 as builder
FROM --platform=linux/amd64 ghcr.io/foundry-rs/foundry@sha256:8b843eb65cc7b155303b316f65d27173c862b37719dc095ef3a2ef27ce8d3c00 as builder

WORKDIR /app
COPY foundry.toml foundry.toml
Expand All @@ -11,4 +11,4 @@ RUN FOUNDRY_PROFILE=prod forge build
FROM scratch AS foundry-export

COPY --from=builder /app/out .
COPY --from=builder /app/ts ts
COPY --from=builder /app/ts ts
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=ntt-solana-contract
FROM ${BASE_IMAGE}
COPY --from=ntt-solana-contract /opt/solana/deps/ /opt/solana/deps/
2 changes: 1 addition & 1 deletion solana/solana-devnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
terminationGracePeriodSeconds: 1
containers:
- name: solana-devnet
image: ntt-solana-contract
image: solana-test-validator
command:
- solana-test-validator
- --bpf-program
Expand Down

0 comments on commit a397e8e

Please sign in to comment.