@@ -2,29 +2,32 @@ name: whirlpools
22
33services :
44 build-solana-program :
5- image : backpackapp/build:v0.32.1
5+ platform : linux/amd64
6+ image : solanafoundation/anchor:v0.32.1
67 working_dir : /usr/src/whirlpools
78 command : >
89 anchor build
9- profiles : [build]
10+ profiles : [build, test ]
1011 volumes :
1112 - ./:/usr/src/whirlpools
1213
1314 yarn-install :
15+ platform : linux/amd64
1416 image : rust:1.84.0
1517 working_dir : /usr/src/whirlpools
1618 command : >
1719 sh -c "curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
1820 && apt-get update && apt-get install -y nodejs
1921 && corepack enable && corepack prepare [email protected] --activate 2022 && yarn install"
21- profiles : [build]
23+ profiles : [build, test ]
2224 volumes :
2325 - ./:/usr/src/whirlpools
2426 - node_modules:/usr/src/whirlpools/node_modules
2527 - yarn_cache:/usr/src/whirlpools/.yarn/cache
2628
2729 build-ts-sdk :
30+ platform : linux/amd64
2831 image : rust:1.84.0
2932 working_dir : /usr/src/whirlpools
3033 command : >
@@ -37,7 +40,7 @@ services:
3740 && yarn workspace @orca-so/tx-sender build
3841 && yarn workspace @orca-so/whirlpools build
3942 && yarn workspace @orca-so/whirlpools-lint format"
40- profiles : [build]
43+ profiles : [build, test ]
4144 depends_on :
4245 build-solana-program :
4346 condition : service_completed_successfully
@@ -49,6 +52,7 @@ services:
4952 - yarn_cache:/usr/src/whirlpools/.yarn/cache:ro
5053
5154 build-legacy-sdk :
55+ platform : linux/amd64
5256 image : rust:1.84.0
5357 working_dir : /usr/src/whirlpools
5458 command : >
@@ -58,7 +62,7 @@ services:
5862 && yarn workspace @orca-so/common-sdk build
5963 && yarn workspace @orca-so/whirlpools-sdk build
6064 && yarn workspace @orca-so/whirlpools-sdk-cli build"
61- profiles : [build]
65+ profiles : [build, test ]
6266 depends_on :
6367 build-solana-program :
6468 condition : service_completed_successfully
@@ -70,25 +74,27 @@ services:
7074 - yarn_cache:/usr/src/whirlpools/.yarn/cache:ro
7175
7276 build-rust-sdk :
77+ platform : linux/amd64
7378 image : rust:1.84.0
7479 working_dir : /usr/src/whirlpools
7580 command : >
7681 sh -c "rustup component add clippy rustfmt
77- && cargo build --manifest-path rust-sdk/macros/Cargo.toml --locked
78- && cargo build --manifest-path rust-sdk/core/Cargo.toml --locked
79- && cargo build --manifest-path rust-sdk/client/Cargo.toml --locked
80- && cargo build --manifest-path rust-sdk/whirlpool/Cargo.toml --locked
81- && cargo build --manifest-path rust-sdk/tx-sender/Cargo.toml --locked
82+ && cargo build --manifest-path rust-sdk/macros/Cargo.toml
83+ && cargo build --manifest-path rust-sdk/core/Cargo.toml
84+ && cargo build --manifest-path rust-sdk/client/Cargo.toml
85+ && cargo build --manifest-path rust-sdk/whirlpool/Cargo.toml
86+ && cargo build --manifest-path rust-sdk/tx-sender/Cargo.toml
8287 && cargo clippy --fix --allow-dirty --allow-staged
8388 && cargo fmt"
84- profiles : [build]
89+ profiles : [build, test ]
8590 depends_on :
8691 build-solana-program :
8792 condition : service_completed_successfully
8893 volumes :
8994 - ./:/usr/src/whirlpools
9095
9196 build-integration :
97+ platform : linux/amd64
9298 image : rust:1.84.0
9399 working_dir : /usr/src/whirlpools
94100 command : >
@@ -109,6 +115,7 @@ services:
109115 - yarn_cache:/usr/src/whirlpools/.yarn/cache:ro
110116
111117 build-docs :
118+ platform : linux/amd64
112119 image : rust:1.84.0
113120 working_dir : /usr/src/whirlpools
114121 command : >
@@ -133,14 +140,15 @@ services:
133140 - yarn_cache:/usr/src/whirlpools/.yarn/cache:ro
134141
135142 build-examples :
143+ platform : linux/amd64
136144 image : rust:1.84.0
137145 working_dir : /usr/src/whirlpools
138146 command : >
139147 sh -c "curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
140148 && apt-get update && apt-get install -y nodejs
141149 && corepack enable && corepack prepare [email protected] --activate 142150 && yarn workspace @orca-so/whirlpools-example-ts-next build
143- && cargo build --manifest-path examples/rust-sdk/whirlpool_repositioning_bot/Cargo.toml --locked "
151+ && cargo build --manifest-path examples/rust-sdk/whirlpool_repositioning_bot/Cargo.toml"
144152 profiles : [build]
145153 depends_on :
146154 build-rust-sdk :
@@ -153,6 +161,7 @@ services:
153161 - yarn_cache:/usr/src/whirlpools/.yarn/cache:ro
154162
155163 build :
164+ platform : linux/amd64
156165 image : alpine:3
157166 working_dir : /usr/src/whirlpools
158167 command : >
@@ -178,6 +187,129 @@ services:
178187 volumes :
179188 - ./:/usr/src/whirlpools
180189
190+ test-program :
191+ platform : linux/amd64
192+ image : rust:1.84.0
193+ working_dir : /usr/src/whirlpools
194+ command : >
195+ cargo test -p whirlpool
196+ profiles : [test]
197+ depends_on :
198+ build-solana-program :
199+ condition : service_completed_successfully
200+ volumes :
201+ - ./:/usr/src/whirlpools
202+
203+ test-program-integration :
204+ platform : linux/amd64
205+ image : ubuntu:24.04
206+ working_dir : /usr/src/whirlpools
207+ command : >
208+ sh -c "apt-get update && apt-get install -y curl ca-certificates
209+ && curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
210+ && apt-get install -y nodejs
211+ && corepack enable && corepack prepare [email protected] --activate 212+ && yarn install
213+ && yarn workspace @orca-so/whirlpools-sdk test"
214+ profiles : [test]
215+ depends_on :
216+ build-solana-program :
217+ condition : service_completed_successfully
218+ yarn-install :
219+ condition : service_completed_successfully
220+ build-legacy-sdk :
221+ condition : service_completed_successfully
222+ volumes :
223+ - ./:/usr/src/whirlpools
224+ - node_modules:/usr/src/whirlpools/node_modules
225+ - yarn_cache:/usr/src/whirlpools/.yarn/cache:ro
226+
227+ test-ts-sdk :
228+ platform : linux/amd64
229+ image : rust:1.84.0
230+ working_dir : /usr/src/whirlpools
231+ command : >
232+ sh -c "curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
233+ && apt-get update && apt-get install -y nodejs
234+ && corepack enable && corepack prepare [email protected] --activate 235+ && yarn workspace @orca-so/whirlpools-client test
236+ && yarn workspace @orca-so/whirlpools-core test
237+ && yarn workspace @orca-so/tx-sender test
238+ && yarn workspace @orca-so/whirlpools test"
239+ profiles : [test]
240+ depends_on :
241+ build-solana-program :
242+ condition : service_completed_successfully
243+ yarn-install :
244+ condition : service_completed_successfully
245+ build-ts-sdk :
246+ condition : service_completed_successfully
247+ volumes :
248+ - ./:/usr/src/whirlpools
249+ - node_modules:/usr/src/whirlpools/node_modules
250+ - yarn_cache:/usr/src/whirlpools/.yarn/cache:ro
251+
252+ test-rust-sdk :
253+ platform : linux/amd64
254+ image : rust:1.84.0
255+ working_dir : /usr/src/whirlpools
256+ command : >
257+ sh -c "cp legacy-sdk/whirlpool/tests/external_program/token_2022.20250510.so target/deploy/
258+ && cargo test --manifest-path rust-sdk/macros/Cargo.toml --lib
259+ && cargo test --manifest-path rust-sdk/core/Cargo.toml --lib
260+ && cargo test --manifest-path rust-sdk/client/Cargo.toml --lib
261+ && cargo test --manifest-path rust-sdk/whirlpool/Cargo.toml --lib
262+ && cargo test --manifest-path rust-sdk/tx-sender/Cargo.toml --lib"
263+ profiles : [test]
264+ depends_on :
265+ build-solana-program :
266+ condition : service_completed_successfully
267+ build-rust-sdk :
268+ condition : service_completed_successfully
269+ volumes :
270+ - ./:/usr/src/whirlpools
271+
272+ test-integration :
273+ image : rust:1.84.0
274+ working_dir : /usr/src/whirlpools
275+ command : >
276+ sh -c "curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
277+ && apt-get update && apt-get install -y nodejs
278+ && corepack enable && corepack prepare [email protected] --activate 279+ && yarn workspace @orca-so/whirlpools-integration test
280+ && yarn workspace @orca-so/whirlpools-rust-integration test"
281+ profiles : [test-integration]
282+ depends_on :
283+ build-rust-sdk :
284+ condition : service_completed_successfully
285+ build-ts-sdk :
286+ condition : service_completed_successfully
287+ build-integration :
288+ condition : service_completed_successfully
289+ volumes :
290+ - ./:/usr/src/whirlpools
291+ - node_modules:/usr/src/whirlpools/node_modules:ro
292+ - yarn_cache:/usr/src/whirlpools/.yarn/cache:ro
293+
294+ test :
295+ platform : linux/amd64
296+ image : alpine:3
297+ working_dir : /usr/src/whirlpools
298+ command : >
299+ echo "Tests Completed"
300+ depends_on :
301+ # test-program:
302+ # condition: service_completed_successfully
303+ # test-program-integration:
304+ # condition: service_completed_successfully
305+ # test-ts-sdk:
306+ # condition: service_completed_successfully
307+ test-rust-sdk :
308+ condition : service_completed_successfully
309+ profiles : [test]
310+ volumes :
311+ - ./:/usr/src/whirlpools
312+
181313volumes :
182314 node_modules :
183315 yarn_cache :
0 commit comments