@@ -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-whirlpools-program, 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, lint ]
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 : >
@@ -70,15 +74,16 @@ 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 --quiet -- manifest-path rust-sdk/macros/Cargo.toml
83+ && cargo build --quiet -- manifest-path rust-sdk/core/Cargo.toml
84+ && cargo build --quiet -- manifest-path rust-sdk/client/Cargo.toml
85+ && cargo build --quiet -- manifest-path rust-sdk/whirlpool/Cargo.toml
86+ && cargo build --quiet -- manifest-path rust-sdk/tx-sender/Cargo.toml
8287 && cargo clippy --fix --allow-dirty --allow-staged
8388 && cargo fmt"
8489 profiles : [build]
@@ -89,6 +94,7 @@ services:
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,163 @@ 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+ && node --version
212+ && corepack enable && corepack prepare [email protected] --activate 213+ && yarn install
214+ && yarn workspace @orca-so/common-sdk build
215+ && yarn workspace @orca-so/whirlpools-sdk build
216+ && yarn workspace @orca-so/whirlpools-sdk-integration test"
217+ profiles : [test-whirlpools-program]
218+ depends_on :
219+ build-solana-program :
220+ condition : service_completed_successfully
221+ volumes :
222+ - ./:/usr/src/whirlpools
223+ - node_modules:/usr/src/whirlpools/node_modules
224+ - yarn_cache:/usr/src/whirlpools/.yarn/cache:ro
225+
226+ test-ts-sdk :
227+ platform : linux/amd64
228+ image : rust:1.84.0
229+ working_dir : /usr/src/whirlpools
230+ command : >
231+ sh -c "curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
232+ && apt-get update && apt-get install -y nodejs
233+ && corepack enable && corepack prepare [email protected] --activate 234+ && yarn workspace @orca-so/whirlpools-client test
235+ && yarn workspace @orca-so/whirlpools-core test
236+ && yarn workspace @orca-so/tx-sender test
237+ && yarn workspace @orca-so/whirlpools test"
238+ profiles : [test]
239+ depends_on :
240+ build-solana-program :
241+ condition : service_completed_successfully
242+ yarn-install :
243+ condition : service_completed_successfully
244+ build-ts-sdk :
245+ condition : service_completed_successfully
246+ volumes :
247+ - ./:/usr/src/whirlpools
248+ - node_modules:/usr/src/whirlpools/node_modules
249+ - yarn_cache:/usr/src/whirlpools/.yarn/cache:ro
250+
251+ test-rust-sdk :
252+ platform : linux/amd64
253+ image : rust:1.84.0
254+ working_dir : /usr/src/whirlpools
255+ command : >
256+ sh -c "cp legacy-sdk/whirlpool/tests/external_program/token_2022.20250510.so target/deploy/
257+ && cargo test --quiet --manifest-path rust-sdk/macros/Cargo.toml --lib
258+ && cargo test --quiet --manifest-path rust-sdk/core/Cargo.toml --lib
259+ && cargo test --quiet --manifest-path rust-sdk/client/Cargo.toml --lib
260+ && cargo test --quiet --manifest-path rust-sdk/whirlpool/Cargo.toml --lib
261+ && cargo test --quiet --manifest-path rust-sdk/tx-sender/Cargo.toml --lib"
262+ profiles : [test]
263+ depends_on :
264+ build-solana-program :
265+ condition : service_completed_successfully
266+ volumes :
267+ - ./:/usr/src/whirlpools
268+
269+ test-integration :
270+ image : rust:1.84.0
271+ working_dir : /usr/src/whirlpools
272+ command : >
273+ sh -c "curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
274+ && apt-get update && apt-get install -y nodejs
275+ && corepack enable && corepack prepare [email protected] --activate 276+ && yarn workspace @orca-so/whirlpools-integration test
277+ && yarn workspace @orca-so/whirlpools-rust-integration test"
278+ profiles : [test-integration]
279+ depends_on :
280+ build-rust-sdk :
281+ condition : service_completed_successfully
282+ build-ts-sdk :
283+ condition : service_completed_successfully
284+ build-integration :
285+ condition : service_completed_successfully
286+ volumes :
287+ - ./:/usr/src/whirlpools
288+ - node_modules:/usr/src/whirlpools/node_modules:ro
289+ - yarn_cache:/usr/src/whirlpools/.yarn/cache:ro
290+
291+ test-whirlpools-program :
292+ platform : linux/amd64
293+ image : alpine:3
294+ working_dir : /usr/src/whirlpools
295+ command : >
296+ echo "Tests Completed"
297+ profiles : [test-whirlpools-program]
298+ depends_on :
299+ test-program :
300+ condition : service_completed_successfully
301+ test-program-integration :
302+ condition : service_completed_successfully
303+ volumes :
304+ - ./:/usr/src/whirlpools
305+
306+ test-sdks :
307+ platform : linux/amd64
308+ image : alpine:3
309+ working_dir : /usr/src/whirlpools
310+ command : >
311+ echo "Tests Completed"
312+ depends_on :
313+ test-ts-sdk :
314+ condition : service_completed_successfully
315+ test-rust-sdk :
316+ condition : service_completed_successfully
317+ profiles : [test]
318+ volumes :
319+ - ./:/usr/src/whirlpools
320+
321+ lint :
322+ platform : linux/amd64
323+ image : rust:1.84.0
324+ working_dir : /usr/src/whirlpools
325+ command : >
326+ sh -c "curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
327+ && apt-get update && apt-get install -y nodejs
328+ && corepack enable && corepack prepare [email protected] --activate 329+ && rustup component add clippy rustfmt
330+ && yarn workspace @orca-so/whirlpools-lint lint
331+ && cargo clippy -p whirlpool && cargo fmt --check -p whirlpool
332+ && cargo clippy --manifest-path rust-sdk/macros/Cargo.toml && cargo fmt --check --manifest-path rust-sdk/macros/Cargo.toml
333+ && cargo clippy --manifest-path rust-sdk/core/Cargo.toml && cargo fmt --check --manifest-path rust-sdk/core/Cargo.toml
334+ && cargo clippy --manifest-path rust-sdk/client/Cargo.toml && cargo fmt --check --manifest-path rust-sdk/client/Cargo.toml
335+ && cargo clippy --manifest-path rust-sdk/whirlpool/Cargo.toml && cargo fmt --check --manifest-path rust-sdk/whirlpool/Cargo.toml
336+ && cargo clippy --manifest-path rust-sdk/tx-sender/Cargo.toml && cargo fmt --check --manifest-path rust-sdk/tx-sender/Cargo.toml
337+ && cargo clippy --manifest-path examples/rust-sdk/whirlpool_repositioning_bot/Cargo.toml && cargo fmt --check --manifest-path examples/rust-sdk/whirlpool_repositioning_bot/Cargo.toml"
338+ profiles : [lint]
339+ depends_on :
340+ yarn-install :
341+ condition : service_completed_successfully
342+ volumes :
343+ - ./:/usr/src/whirlpools
344+ - node_modules:/usr/src/whirlpools/node_modules:ro
345+ - yarn_cache:/usr/src/whirlpools/.yarn/cache:ro
346+
181347volumes :
182348 node_modules :
183349 yarn_cache :
0 commit comments