Skip to content

Commit 67e5399

Browse files
committed
Make CI build -> test flows test -> build.
Doing `cargo test` causes us to build both the crate(s) themselves and the test binaries, which depend on the main builds. However, it can start building the test code while the actual program code for the main crate(s) themselves are being built, making a build -> test flow slightly slower than test -> build. Its not really a huge deal, but I'm using `ci/ci-tests.sh` more locally and it meaningfully changes the time-to-test-run.
1 parent fe63668 commit 67e5399

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

ci/ci-tests.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,30 +37,30 @@ PIN_RELEASE_DEPS # pin the release dependencies in our main workspace
3737
export RUST_BACKTRACE=1
3838

3939
echo -e "\n\nBuilding and testing all workspace crates..."
40-
cargo build --verbose --color always
4140
cargo test --verbose --color always
41+
cargo build --verbose --color always
4242

4343
echo -e "\n\nBuilding and testing Block Sync Clients with features"
4444
pushd lightning-block-sync
45-
cargo build --verbose --color always --features rest-client
4645
cargo test --verbose --color always --features rest-client
47-
cargo build --verbose --color always --features rpc-client
46+
cargo build --verbose --color always --features rest-client
4847
cargo test --verbose --color always --features rpc-client
49-
cargo build --verbose --color always --features rpc-client,rest-client
48+
cargo build --verbose --color always --features rpc-client
5049
cargo test --verbose --color always --features rpc-client,rest-client
51-
cargo build --verbose --color always --features rpc-client,rest-client,tokio
50+
cargo build --verbose --color always --features rpc-client,rest-client
5251
cargo test --verbose --color always --features rpc-client,rest-client,tokio
52+
cargo build --verbose --color always --features rpc-client,rest-client,tokio
5353
popd
5454

5555
if [[ $RUSTC_MINOR_VERSION -gt 67 && "$HOST_PLATFORM" != *windows* ]]; then
5656
echo -e "\n\nBuilding and testing Transaction Sync Clients with features"
5757
pushd lightning-transaction-sync
58-
cargo build --verbose --color always --features esplora-blocking
5958
cargo test --verbose --color always --features esplora-blocking
60-
cargo build --verbose --color always --features esplora-async
59+
cargo build --verbose --color always --features esplora-blocking
6160
cargo test --verbose --color always --features esplora-async
62-
cargo build --verbose --color always --features esplora-async-https
61+
cargo build --verbose --color always --features esplora-async
6362
cargo test --verbose --color always --features esplora-async-https
63+
cargo build --verbose --color always --features esplora-async-https
6464
popd
6565
fi
6666

0 commit comments

Comments
 (0)