Skip to content

Commit 8e75093

Browse files
evan-graypanoel
authored andcommitted
.github: build wormhole-foundation-example-liquidity-layer in docker
1 parent 58a6930 commit 8e75093

8 files changed

+25
-110
lines changed

.github/workflows/build.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ jobs:
99
steps:
1010
- name: Checkout 🛎️
1111
uses: actions/checkout@v3
12-
with:
13-
submodules: recursive
1412
- uses: actions/setup-node@v3
1513
with:
1614
node-version: 20

.github/workflows/test.yaml

+1-42
Original file line numberDiff line numberDiff line change
@@ -7,49 +7,8 @@ jobs:
77
steps:
88
- name: Checkout repository
99
uses: actions/checkout@v4
10-
with:
11-
submodules: recursive
12-
13-
- name: Ensure Submodules Are Up to Date
14-
run: |
15-
git submodule update --init --recursive --force
16-
17-
- name: Install dependencies
18-
run: sudo apt-get update && sudo apt-get install -y make
19-
20-
- name: Install Foundry
21-
uses: foundry-rs/foundry-toolchain@v1
22-
with:
23-
version: stable
24-
25-
- name: Run Makefile to generate files
26-
run: make init-submodule && make build-ft-sdk
27-
28-
- name: Debug File Differences
29-
run: |
30-
if [ -d "watcher/sdk/example-liquidity-layer" ]; then
31-
echo "✅ Submodule exists. Running checks..."
32-
git status
33-
ls -lah watcher/sdk/example-liquidity-layer
34-
else
35-
echo "❌ Submodule directory does not exist!"
36-
git submodule status
37-
exit 1
38-
fi
39-
40-
- name: Copy select generated files
41-
run: |
42-
cp watcher/sdk/example-liquidity-layer/*.tgz watcher/sdk
4310

44-
- name: Debug Copy Step
45-
run: |
46-
ls -lah watcher/sdk/*.tgz
47-
md5sum watcher/sdk/*.tgz
48-
md5sum watcher/sdk/example-liquidity-layer/*.tgz
49-
cp -v watcher/sdk/example-liquidity-layer/*.tgz watcher/sdk
50-
git diff --stat
51-
git diff --name-only
52-
diff <(tar -tvf watcher/sdk/wormhole-foundation-example-liquidity-layer-evm-0.0.1.tgz) <(tar -tvf watcher/sdk/example-liquidity-layer/wormhole-foundation-example-liquidity-layer-evm-0.0.1.tgz)
11+
- run: cd watcher/sdk && docker build --target export -f Dockerfile -o type=local,dest=. .
5312

5413
- name: Compare checksums
5514
run: git diff --name-only --exit-code && echo "✅ Checksums match. All generated files are consistent with committed versions." || (echo "❌ Checksum mismatch! Generated files do not match committed ones." >&2 && exit 1)

.gitmodules

-4
This file was deleted.

Makefile

-60
This file was deleted.

package-lock.json

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

watcher/sdk/Dockerfile

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM --platform=linux/amd64 ghcr.io/foundry-rs/foundry:nightly-55bf41564f605cae3ca4c95ac5d468b1f14447f9@sha256:8c15d322da81a6deaf827222e173f3f81c653136a3518d5eeb41250a0f2e17ea AS foundry
2+
FROM --platform=linux/amd64 node:20-slim@sha256:0251f1fd7d2c60614c73df5f7dd9006e2592fd38b1cf6c5c9f21b4f0d9aa8a2f AS build
3+
4+
RUN apt update && apt install -y git make
5+
6+
COPY --from=foundry /usr/local/bin/anvil /bin/anvil
7+
COPY --from=foundry /usr/local/bin/forge /bin/forge
8+
9+
WORKDIR /app
10+
11+
RUN git init
12+
RUN git remote add origin https://github.com/wormhole-foundation/example-liquidity-layer.git
13+
RUN git fetch origin 86d6806f3ec38bd784d10f1da9e725f8e02628a5
14+
RUN git checkout FETCH_HEAD
15+
16+
RUN cd evm && make
17+
RUN npm run build && npm run pack && cp *.tgz ..
18+
19+
FROM scratch AS export
20+
COPY --from=build wormhole-foundation-example-liquidity-layer-definitions-0.0.1.tgz .
21+
COPY --from=build wormhole-foundation-example-liquidity-layer-evm-0.0.1.tgz .
22+
COPY --from=build wormhole-foundation-example-liquidity-layer-solana-0.0.1.tgz .

watcher/sdk/example-liquidity-layer

-1
This file was deleted.
Binary file not shown.

0 commit comments

Comments
 (0)