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

ci: dynamically build evm_binding #261

Merged
merged 1 commit into from
Mar 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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
46 changes: 0 additions & 46 deletions .github/workflows/sdk.yml

This file was deleted.

6 changes: 4 additions & 2 deletions .github/workflows/tilt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,17 @@ jobs:
- name: Clear repository
run: |
rm -rf $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Expand for link to Tilt dashboard (only available during build)
run: >
echo "Tilt progress dashboard: https://$DASHBOARD_URL"
- run: |
kubectl config set-context ci --namespace=$DEPLOY_NS
kubectl config use-context ci

- run: tilt ci -- --evm2 --generic_relayer --solana_watcher --namespace=$DEPLOY_NS
- run: tilt ci -- --evm2 --generic_relayer --solana_watcher --guardiand_loglevel=warn --namespace=$DEPLOY_NS
timeout-minutes: 30

# Clean up k8s resources
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ clean-evm:

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

.PHONY: gen-evm-bindings
gen-evm-bindings: build-evm-prod
cd ci_tests && npm ci && npm run gen-evm-bindings
cd ci_tests && rm -rf evm_binding && npm ci && npm run gen-evm-bindings

#######################
## TESTS
Expand Down
7 changes: 7 additions & 0 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ k8s_resource(
],
)

# EVM build
docker_build(
ref = "ntt-evm-contract",
context = "./evm",
dockerfile = "./evm/Dockerfile",
)

# CI tests
docker_build(
ref = "ntt-ci",
Expand Down
1 change: 1 addition & 0 deletions ci_tests/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
**/node_modules
evm_binding
solana_binding
1 change: 1 addition & 0 deletions ci_tests/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
evm_binding
solana_binding
3 changes: 3 additions & 0 deletions ci_tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ RUN --mount=type=cache,uid=1000,gid=1000,target=/home/node/.npm \
npm ci
COPY . ./

COPY --from=ntt-evm-contract . ../evm/out
RUN npm run gen-evm-bindings

COPY --from=ntt-solana-contract /usr/src/anchor-ntt/target/idl solana_binding/target/idl
COPY --from=ntt-solana-contract /usr/src/anchor-ntt/target/types solana_binding/target/types
COPY --from=ntt-solana-contract /usr/src/anchor-ntt/ts solana_binding/ts
147 changes: 0 additions & 147 deletions ci_tests/evm_binding/Base.ts

This file was deleted.

55 changes: 0 additions & 55 deletions ci_tests/evm_binding/BytesParsing.ts

This file was deleted.

Loading
Loading