Skip to content

Commit 88776d9

Browse files
committed
Only run lightning-net-tokio build on Rust 1.39.0+ on Travis.
This disables building the lightning-net-tokio crate on 1.34.2 on Travis in anticiption of relying on async/await for lightning-net-tokio, with the nice side-effect of reducing the amount of work done on our slowest Travis job. This also adds 1.39.0 to Travis as that is the new MSRV for lightning-net-tokio.
1 parent bae2338 commit 88776d9

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.travis.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,29 @@ language: rust
22
rust:
33
- stable
44
- beta
5+
# 1.22.0 is MSRV for rust-lightning in general:
56
- 1.22.0
7+
# 1.34.2 is Debian stable, and we use it to run fuzzing on:
68
- 1.34.2
9+
# 1.39.0 is MSRV for lightning-net-tokio:
10+
- 1.39.0
711
cache: cargo
812

913
before_install:
1014
- sudo apt-get -qq update
1115
- sudo apt-get install -y binutils-dev libunwind8-dev libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc binutils-dev libiberty-dev
1216

1317
script:
14-
# Build workspaces with Rust stable, beta, and 1.34.0
15-
- if [ "$(rustup show | grep default | grep 1.22.0)" == "" ]; then RUSTFLAGS="-C link-dead-code" cargo build --verbose; fi
16-
# Build lightning workspace with Rust 1.22.0
17-
- if [ "$(rustup show | grep default | grep 1.22.0)" != "" ]; then RUSTFLAGS="-C link-dead-code" cargo build --verbose -p lightning; fi
18+
# Support lightning-net-tokio only on Rust stable, beta, and 1.39.0
19+
- if [ "$(rustup show | grep default | grep '1.39.0')" != "" ]; then export BUILD_NET_TOKIO=1; fi
20+
- if [ "$(rustup show | grep default | grep '1\.')" == "" ]; then export BUILD_NET_TOKIO=1; fi
21+
# Build the appropriate workspace(s)
22+
- if [ "$BUILD_NET_TOKIO" == "1" ]; then RUSTFLAGS="-C link-dead-code" cargo build --verbose; fi
23+
- if [ "$BUILD_NET_TOKIO" != "1" ]; then RUSTFLAGS="-C link-dead-code" cargo build --verbose -p lightning; fi
1824
- rm -f target/debug/lightning-* # Make sure we drop old test binaries
19-
# Test workspaces for Rust stable, beta, and 1.34.2
20-
- if [ "$(rustup show | grep default | grep 1.22.0)" == "" ]; then RUSTFLAGS="-C link-dead-code" cargo test --verbose; fi
21-
# Test lightning workspace for 1.22.0
22-
- if [ "$(rustup show | grep default | grep 1.22.0)" != "" ]; then RUSTFLAGS="-C link-dead-code" cargo test --verbose -p lightning; fi
25+
# Test the appropriate workspace(s)
26+
- if [ "$BUILD_NET_TOKIO" == "1" ]; then RUSTFLAGS="-C link-dead-code" cargo test --verbose; fi
27+
- if [ "$BUILD_NET_TOKIO" != "1" ]; then RUSTFLAGS="-C link-dead-code" cargo test --verbose -p lightning; fi
2328
# Run lightning workspace fuzz tests for Rust 1.34.2
2429
- if [ "$(rustup show | grep default | grep 1.34.2)" != "" ]; then cd fuzz && cargo test --verbose && ./travis-fuzz.sh; fi
2530
- if [ "$(rustup show | grep default | grep stable)" != "" ]; then

0 commit comments

Comments
 (0)