File tree Expand file tree Collapse file tree 6 files changed +43
-6
lines changed Expand file tree Collapse file tree 6 files changed +43
-6
lines changed Original file line number Diff line number Diff line change 4747 - name : Run clippy
4848 run : make clippy
4949
50+ check_features :
51+ name : Check Features
52+ runs-on : ubuntu-latest
53+ steps :
54+ - uses : actions/checkout@v4
55+ - uses : actions/cache@v4
56+ with :
57+ path : |
58+ ~/.cargo/registry
59+ ~/.cargo/git
60+ key : cargo-hack-${{ hashFiles('**/Cargo.lock') }}
61+ restore-keys : |
62+ cargo-hack-
63+ - uses : dtolnay/rust-toolchain@stable
64+ - uses : taiki-e/install-action@v2
65+ with :
66+ tool : cargo-hack
67+ - name : Check all feature combinations
68+ run : make check-features
69+
5070 cargo_build_test :
5171 name : Cargo Build and Test
5272 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 11NIGHTLY_TOOLCHAIN := nightly-2024-11-22
22SOLANA_VERSION := 2.2.0
33
4- .PHONY : audit build-test-programs prepublish publish format format-check clippy test nightly-version solana-version
4+ .PHONY : audit build-test-programs prepublish publish format format-check \
5+ clippy test check-features all-checks nightly-version solana-version
56
67# Print the nightly toolchain version for CI
78nightly-version :
@@ -38,6 +39,7 @@ prepublish:
3839 @$(MAKE ) build-test-programs
3940 @$(MAKE ) format-check
4041 @$(MAKE ) clippy
42+ @$(MAKE ) check-features
4143 @$(MAKE ) test
4244
4345# Publish crates in order
@@ -76,6 +78,19 @@ format-check:
7678clippy :
7779 @cargo +$(NIGHTLY_TOOLCHAIN ) clippy --all --all-features --all-targets -- -D warnings
7880
81+ # Check all feature combinations with cargo-hack
82+ check-features :
83+ @cargo hack check --feature-powerset --no-dev-deps
84+
7985# Run tests
8086test :
81- @cargo test --all-features
87+ @cargo test --all-features
88+
89+ # Run all checks in sequence
90+ all-checks :
91+ @echo " Running all checks..."
92+ @$(MAKE ) format-check
93+ @$(MAKE ) clippy
94+ @$(MAKE ) check-features
95+ @$(MAKE ) test
96+ @echo " All checks passed!"
Original file line number Diff line number Diff line change @@ -23,7 +23,10 @@ fuzz-fd = [
2323 " dep:mollusk-svm-fuzz-fixture-firedancer" ,
2424 " dep:mollusk-svm-fuzz-fs" ,
2525]
26- serde = [" dep:serde" ]
26+ serde = [
27+ " dep:serde" ,
28+ " mollusk-svm-result/serde" ,
29+ ]
2730
2831[dependencies ]
2932agave-feature-set = { workspace = true }
Original file line number Diff line number Diff line change @@ -21,4 +21,4 @@ solana-rent = { workspace = true }
2121[features ]
2222default = []
2323fuzz = [" dep:mollusk-svm-fuzz-fixture" ]
24- serde = [" dep:serde" ]
24+ serde = [" dep:serde" , " solana-pubkey/serde " ]
Original file line number Diff line number Diff line change 22
33use crate :: types:: { InstructionResult , ProgramResult } ;
44
5- #[ cfg( feature = "fuzz" ) ]
65impl From < & InstructionResult > for mollusk_svm_fuzz_fixture:: effects:: Effects {
76 fn from ( input : & InstructionResult ) -> Self {
87 let compute_units_consumed = input. compute_units_consumed ;
@@ -27,7 +26,6 @@ impl From<&InstructionResult> for mollusk_svm_fuzz_fixture::effects::Effects {
2726 }
2827}
2928
30- #[ cfg( feature = "fuzz" ) ]
3129impl From < & mollusk_svm_fuzz_fixture:: effects:: Effects > for InstructionResult {
3230 fn from ( input : & mollusk_svm_fuzz_fixture:: effects:: Effects ) -> Self {
3331 use solana_instruction:: error:: InstructionError ;
Original file line number Diff line number Diff line change 3131pub mod check;
3232pub mod compare;
3333pub mod config;
34+ #[ cfg( feature = "fuzz" ) ]
3435pub mod fuzz;
3536pub mod types;
3637
You can’t perform that action at this time.
0 commit comments