Skip to content

Commit 8936c14

Browse files
committed
ci: dynamically build evm_binding
1 parent feea345 commit 8936c14

File tree

315 files changed

+52
-151007
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

315 files changed

+52
-151007
lines changed

.github/workflows/sdk.yml

-46
This file was deleted.

.github/workflows/tilt.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,17 @@ jobs:
2424
- name: Clear repository
2525
run: |
2626
rm -rf $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
27-
- uses: actions/checkout@v2
27+
- uses: actions/checkout@v4
28+
with:
29+
submodules: recursive
2830
- name: Expand for link to Tilt dashboard (only available during build)
2931
run: >
3032
echo "Tilt progress dashboard: https://$DASHBOARD_URL"
3133
- run: |
3234
kubectl config set-context ci --namespace=$DEPLOY_NS
3335
kubectl config use-context ci
3436
35-
- run: tilt ci -- --evm2 --generic_relayer --solana_watcher --namespace=$DEPLOY_NS
37+
- run: tilt ci -- --evm2 --generic_relayer --solana_watcher --guardiand_loglevel=warn --namespace=$DEPLOY_NS
3638
timeout-minutes: 30
3739

3840
# Clean up k8s resources

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ clean-evm:
1313

1414
.PHONY: build-evm-prod
1515
build-evm-prod: clean-evm
16-
cd evm && FOUNDRY_PROFILE=prod forge build
16+
cd evm && docker build --target foundry-export -f Dockerfile -o out .
1717

1818
.PHONY: gen-evm-bindings
1919
gen-evm-bindings: build-evm-prod
20-
cd ci_tests && npm ci && npm run gen-evm-bindings
20+
cd ci_tests && rm -rf evm_binding && npm ci && npm run gen-evm-bindings
2121

2222
#######################
2323
## TESTS

Tiltfile

+7
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ k8s_resource(
3737
],
3838
)
3939

40+
# EVM build
41+
docker_build(
42+
ref = "ntt-evm-contract",
43+
context = "./evm",
44+
dockerfile = "./evm/Dockerfile",
45+
)
46+
4047
# CI tests
4148
docker_build(
4249
ref = "ntt-ci",

ci_tests/.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
**/node_modules
2+
evm_binding
23
solana_binding

ci_tests/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
evm_binding
12
solana_binding

ci_tests/Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
55
npm ci
66
COPY . ./
77

8+
COPY --from=ntt-evm-contract . ../evm/out
9+
RUN npm run gen-evm-bindings
10+
811
COPY --from=ntt-solana-contract /usr/src/anchor-ntt/target/idl solana_binding/target/idl
912
COPY --from=ntt-solana-contract /usr/src/anchor-ntt/target/types solana_binding/target/types
1013
COPY --from=ntt-solana-contract /usr/src/anchor-ntt/ts solana_binding/ts

ci_tests/evm_binding/Base.ts

-147
This file was deleted.

ci_tests/evm_binding/BytesParsing.ts

-55
This file was deleted.

0 commit comments

Comments
 (0)