Skip to content

Commit c1dc8e3

Browse files
authored
Merge pull request #534 from TheBlueMatt/2020-02-fuzz-on-stable
[travis] Build lightning-net-tokio on Rust 1.39.0+, fuzz on stable
2 parents 27426f8 + c5fb572 commit c1dc8e3

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

.travis.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,33 @@ 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
68
- 1.34.2
9+
# 1.39.0 is MSRV for lightning-net-tokio and generates coverage
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
23-
# Run lightning workspace fuzz tests for Rust 1.34.2
24-
- if [ "$(rustup show | grep default | grep 1.34.2)" != "" ]; then cd fuzz && cargo test --verbose && ./travis-fuzz.sh; fi
25-
- if [ "$(rustup show | grep default | grep stable)" != "" ]; then
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
28+
# Run lightning workspace fuzz tests on Rust stable
29+
- if [ "$(rustup show | grep default | grep stable)" != "" ]; then cd fuzz && cargo test --verbose && ./travis-fuzz.sh; fi
30+
# Generate code cov information on Rust 1.39.0
31+
- if [ "$(rustup show | grep default | grep 1.39.0)" != "" ]; then
2632
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
2733
tar xzf master.tar.gz &&
2834
cd kcov-master &&

0 commit comments

Comments
 (0)