Merge pull request #2888 from TheBlueMatt/2024-02-destination-eq
[rust-lightning] / ci / ci-tests.sh
index 11934a8307a6f0723aeeb7a5094f3853a0c0a981..3eccc48798dc6e4b5f3fccd0b0c29003be23b0c8 100755 (executable)
@@ -89,17 +89,19 @@ if [[ "$HOST_PLATFORM" != *windows* ]]; then
        [ "$RUSTC_MINOR_VERSION" -lt 65 ] && cargo update -p reqwest --precise "0.11.20" --verbose
        # Starting with version 1.10.0, the `regex` crate has an MSRV of rustc 1.65.0.
        [ "$RUSTC_MINOR_VERSION" -lt 65 ] && cargo update -p regex --precise "1.9.6" --verbose
+       # Starting with version 0.5.9 (there is no .6-.8), the `home` crate has an MSRV of rustc 1.70.0.
+       [ "$RUSTC_MINOR_VERSION" -lt 70 ] && cargo update -p home --precise "0.5.5" --verbose
 
        DOWNLOAD_ELECTRS_AND_BITCOIND
 
-       RUSTFLAGS="--cfg no_download" cargo test --verbose --color always --features esplora-blocking
-       RUSTFLAGS="--cfg no_download" cargo check --verbose --color always --features esplora-blocking
-       RUSTFLAGS="--cfg no_download" cargo test --verbose --color always --features esplora-async
-       RUSTFLAGS="--cfg no_download" cargo check --verbose --color always --features esplora-async
-       RUSTFLAGS="--cfg no_download" cargo test --verbose --color always --features esplora-async-https
-       RUSTFLAGS="--cfg no_download" cargo check --verbose --color always --features esplora-async-https
-       RUSTFLAGS="--cfg no_download" cargo test --verbose --color always --features electrum
-       RUSTFLAGS="--cfg no_download" cargo check --verbose --color always --features electrum
+       RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo test --verbose --color always --features esplora-blocking
+       RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo check --verbose --color always --features esplora-blocking
+       RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo test --verbose --color always --features esplora-async
+       RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo check --verbose --color always --features esplora-async
+       RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo test --verbose --color always --features esplora-async-https
+       RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo check --verbose --color always --features esplora-async-https
+       RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo test --verbose --color always --features electrum
+       RUSTFLAGS="$RUSTFLAGS --cfg no_download" cargo check --verbose --color always --features electrum
 
        popd
 fi
@@ -123,7 +125,7 @@ popd
 echo -e "\n\nBuilding with all Log-Limiting features"
 pushd lightning
 grep '^max_level_' Cargo.toml | awk '{ print $1 }'| while read -r FEATURE; do
-       cargo check --verbose --color always --features "$FEATURE"
+       RUSTFLAGS="$RUSTFLAGS -A unused_variables -A unused_macros -A unused_imports -A dead_code" cargo check --verbose --color always --features "$FEATURE"
 done
 popd
 
@@ -136,9 +138,9 @@ done
 
 for DIR in lightning lightning-invoice lightning-rapid-gossip-sync; do
        # check if there is a conflict between no-std and the c_bindings cfg
-       RUSTFLAGS="--cfg=c_bindings" cargo test -p $DIR --verbose --color always --no-default-features --features=no-std
+       RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test -p $DIR --verbose --color always --no-default-features --features=no-std
 done
-RUSTFLAGS="--cfg=c_bindings" cargo test --verbose --color always
+RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test --verbose --color always
 
 # Note that outbound_commitment_test only runs in this mode because of hardcoded signature values
 pushd lightning
@@ -171,7 +173,6 @@ if [ -f "$(which arm-none-eabi-gcc)" ]; then
        popd
 fi
 
-echo -e "\n\nTest Taproot builds"
-pushd lightning
-RUSTFLAGS="$RUSTFLAGS --cfg=taproot" cargo test --verbose --color always -p lightning
-popd
+echo -e "\n\nTest cfg-flag builds"
+RUSTFLAGS="--cfg=taproot" cargo test --verbose --color always -p lightning
+RUSTFLAGS="--cfg=async_signing" cargo test --verbose --color always -p lightning