X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ci%2Fci-tests.sh;h=5cae6d45de5f56a778fc95b2e78b5c5fd9f5ffb6;hb=f852d16d924a9c547c8c4995a8e61cda711711af;hp=374e3616c149d7a8578f6f21851d3aff352dfb34;hpb=c9d52cf1854b09bd9dc8d7a5916e8f8c840c07bb;p=rust-lightning diff --git a/ci/ci-tests.sh b/ci/ci-tests.sh index 374e3616..5cae6d45 100755 --- a/ci/ci-tests.sh +++ b/ci/ci-tests.sh @@ -63,8 +63,14 @@ PIN_RELEASE_DEPS # pin the release dependencies in our main workspace # The addr2line v0.21 crate (a dependency of `backtrace` starting with 0.3.69) relies on rustc 1.65 [ "$RUSTC_MINOR_VERSION" -lt 65 ] && cargo update -p backtrace --precise "0.3.68" --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 + export RUST_BACKTRACE=1 +# Build `lightning-transaction-sync` in no_download mode. +export RUSTFLAGS="$RUSTFLAGS --cfg no_download" + echo -e "\n\nBuilding and testing all workspace crates..." cargo test --verbose --color always cargo check --verbose --color always @@ -85,22 +91,16 @@ if [[ "$HOST_PLATFORM" != *windows* ]]; then echo -e "\n\nBuilding and testing Transaction Sync Clients with features" pushd lightning-transaction-sync - # reqwest 0.11.21 had a regression that broke its 1.63.0 MSRV - [ "$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 - 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 - + cargo test --verbose --color always --features esplora-blocking + cargo check --verbose --color always --features esplora-blocking + cargo test --verbose --color always --features esplora-async + cargo check --verbose --color always --features esplora-async + cargo test --verbose --color always --features esplora-async-https + cargo check --verbose --color always --features esplora-async-https + cargo test --verbose --color always --features electrum + cargo check --verbose --color always --features electrum popd fi @@ -123,7 +123,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 +136,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 @@ -172,5 +172,8 @@ if [ -f "$(which arm-none-eabi-gcc)" ]; then fi echo -e "\n\nTest cfg-flag builds" -RUSTFLAGS="$RUSTFLAGS --cfg=taproot" cargo test --verbose --color always -p lightning -RUSTFLAGS="$RUSTFLAGS --cfg=async_signing" cargo test --verbose --color always -p lightning +RUSTFLAGS="--cfg=taproot" cargo test --verbose --color always -p lightning +[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean +RUSTFLAGS="--cfg=async_signing" cargo test --verbose --color always -p lightning +[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean +RUSTFLAGS="--cfg=dual_funding" cargo test --verbose --color always -p lightning