Skip to content

Commit d48caa4

Browse files
committed
Somewhat clean up ci-tests.sh and sort by RUSTFLAGS
1 parent 023ad67 commit d48caa4

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

ci/ci-tests.sh

+13-12
Original file line numberDiff line numberDiff line change
@@ -75,25 +75,26 @@ grep '^max_level_' lightning/Cargo.toml | awk '{ print $1 }'| while read -r FEAT
7575
done
7676

7777
echo -e "\n\nTesting no-std builds"
78-
for DIR in lightning-invoice lightning-background-processor lightning-rapid-gossip-sync; do
78+
for DIR in lightning-invoice lightning-background-processor lightning-rapid-gossip-sync; do
7979
cargo test -p $DIR --verbose --color always --no-default-features
80-
# check if there is a conflict between no-std and the c_bindings cfg
81-
RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test -p $DIR --verbose --color always --no-default-features
8280
done
8381

84-
echo -e "\n\nTesting no-std flags in various combinations"
85-
for DIR in lightning; do
86-
cargo test -p $DIR --verbose --color always --no-default-features --features no-std
87-
# check if there is a conflict between no-std and the default std feature
88-
cargo test -p $DIR --verbose --color always --features no-std
89-
done
82+
cargo test -p lightning --verbose --color always --no-default-features --features no-std
83+
# check if there is a conflict between no-std and the default std feature
84+
cargo test -p lightning --verbose --color always --features no-std
85+
86+
echo -e "\n\nTesting c_bindings builds"
87+
RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test --verbose --color always
9088

91-
for DIR in lightning; do
89+
for DIR in lightning-invoice lightning-background-processor lightning-rapid-gossip-sync; do
9290
# check if there is a conflict between no-std and the c_bindings cfg
93-
RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test -p $DIR --verbose --color always --no-default-features --features=no-std
91+
RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test -p $DIR --verbose --color always --no-default-features
9492
done
95-
RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test --verbose --color always
9693

94+
# check if there is a conflict between no-std and the c_bindings cfg
95+
RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test -p lightning --verbose --color always --no-default-features --features=no-std
96+
97+
echo -e "\n\nTesting other crate-specific builds"
9798
# Note that outbound_commitment_test only runs in this mode because of hardcoded signature values
9899
cargo test -p lightning --verbose --color always --no-default-features --features=std,_test_vectors
99100
# This one only works for lightning-invoice

0 commit comments

Comments
 (0)