@@ -7,9 +7,106 @@ npx nx run-many --target=lint --all
77cargo +nightly fmt --all -- --check
88cargo clippy --workspace --all-features --all-targets -- -D warnings
99
10- # Check no_std compatibility for light-zero-copy crate
11- echo " Checking no_std compatibility for light-zero-copy..."
12- cargo check -p light-zero-copy --no-default-features
13- cargo check -p light-compressed-account --no-default-features
14- cargo check -p light-sdk-types --no-default-features
15- cargo check -p light-sdk-pinocchio --no-default-features
10+ echo " Testing feature combinations..."
11+
12+ # Test no-default-features for all library crates
13+ echo " Testing all library crates with --no-default-features..."
14+ NO_DEFAULT_CRATES=(
15+ " light-account-checks"
16+ " light-batched-merkle-tree"
17+ " light-bloom-filter"
18+ " light-compressed-account"
19+ " light-compressible"
20+ " light-concurrent-merkle-tree"
21+ " light-ctoken-types"
22+ " light-hash-set"
23+ " light-hasher"
24+ " light-indexed-merkle-tree"
25+ " light-macros"
26+ " light-merkle-tree-metadata"
27+ " light-verifier"
28+ " light-zero-copy"
29+ " light-heap"
30+ " light-array-map"
31+ " light-indexed-array"
32+ " aligned-sized"
33+ " light-sdk-types"
34+ " light-sdk-pinocchio"
35+ " light-sdk-macros"
36+ " light-compressed-token-sdk"
37+ " light-compressed-token-types"
38+ " light-sdk"
39+ )
40+
41+ for crate in " ${NO_DEFAULT_CRATES[@]} " ; do
42+ echo " Checking $crate with --no-default-features..."
43+ cargo check -p " $crate " --no-default-features
44+ done
45+
46+ # Test pinocchio feature for all crates that have it
47+ PINOCCHIO_CRATES=(
48+ " light-hasher"
49+ " light-indexed-merkle-tree"
50+ " light-zero-copy"
51+ " light-bloom-filter"
52+ " light-compressed-account"
53+ " light-merkle-tree-metadata"
54+ " light-macros"
55+ " light-batched-merkle-tree"
56+ " light-concurrent-merkle-tree"
57+ " light-verifier"
58+ " light-account-checks"
59+ " light-compressible"
60+ )
61+
62+ for crate in " ${PINOCCHIO_CRATES[@]} " ; do
63+ echo " Checking $crate with pinocchio feature..."
64+ cargo check -p " $crate " --features pinocchio
65+ done
66+
67+ # Test solana feature for all crates that have it
68+ SOLANA_CRATES=(
69+ " light-hasher"
70+ " light-indexed-merkle-tree"
71+ " light-zero-copy"
72+ " light-bloom-filter"
73+ " light-compressed-account"
74+ " light-hash-set"
75+ " light-merkle-tree-metadata"
76+ " light-ctoken-types"
77+ " light-macros"
78+ " light-batched-merkle-tree"
79+ " light-concurrent-merkle-tree"
80+ " light-verifier"
81+ " light-account-checks"
82+ " light-compressible"
83+ )
84+
85+ for crate in " ${SOLANA_CRATES[@]} " ; do
86+ echo " Checking $crate with solana feature..."
87+ cargo check -p " $crate " --features solana
88+ done
89+
90+ # Test anchor feature for all crates that have it
91+ ANCHOR_CRATES=(
92+ " light-indexed-merkle-tree"
93+ " light-compressed-account"
94+ " light-merkle-tree-metadata"
95+ " light-ctoken-types"
96+ " light-verifier"
97+ " light-compressible"
98+ " light-sdk-types"
99+ " light-sdk"
100+ " light-compressed-token-sdk"
101+ " light-compressed-token-types"
102+ )
103+
104+ for crate in " ${ANCHOR_CRATES[@]} " ; do
105+ echo " Checking $crate with anchor feature..."
106+ cargo check -p " $crate " --features anchor
107+ done
108+
109+ for crate in " ${NO_DEFAULT_CRATES[@]} " ; do
110+ echo " Checking $crate with --no-default-features..."
111+ cargo test -p " $crate " --no-run
112+ done
0 commit comments