Skip to content

Commit 42e26c2

Browse files
committed
Use less Travis jobs
No longer test the entire matrix of Rust and bitcoind versions.
1 parent 71d37c3 commit 42e26c2

File tree

2 files changed

+41
-19
lines changed

2 files changed

+41
-19
lines changed

.travis.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
language: rust
2-
rust:
3-
- stable
4-
- nightly
5-
- 1.29.0
6-
env:
7-
- BITCOINVERSION=0.18.0
8-
- BITCOINVERSION=0.18.1
9-
- BITCOINVERSION=0.19.0.1
10-
- BITCOINVERSION=0.19.1
11-
- BITCOINVERSION=0.20.0
12-
- BITCOINVERSION=0.20.1
2+
3+
jobs:
4+
include:
5+
- rust: stable
6+
env: RUSTFMTCHECK=true
7+
- rust: nightly
8+
- rust: 1.29.0
9+
# Integration tests
10+
- rust: stable
11+
env: BITCOINVERSION=0.18.0
12+
- rust: stable
13+
env: BITCOINVERSION=0.18.1
14+
- rust: stable
15+
env: BITCOINVERSION=0.19.0.1
16+
- rust: stable
17+
env: BITCOINVERSION=0.19.1
18+
- rust: stable
19+
env: BITCOINVERSION=0.20.0
20+
- rust: stable
21+
env: BITCOINVERSION=0.20.1
1322

1423
script:
1524
- ./contrib/test.sh

contrib/test.sh

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11

2+
set -xe
3+
4+
# Just echo all the relevant env vars to help debug Travis.
5+
echo "TRAVIS_RUST_VERSION: \"$TRAVIS_RUST_VERSION\""
6+
echo "RUSTFMTCHECK: \"$RUSTFMTCHECK\""
7+
echo "BITCOINVERSION: \"$BITCOINVERSION\""
8+
echo "PATH: \"$PATH\""
9+
10+
211
# Pin dependencies for Rust v1.29
312
if [ "$TRAVIS_RUST_VERSION" = "1.29.0" ]; then
413
cargo generate-lockfile --verbose
@@ -10,18 +19,22 @@ if [ "$TRAVIS_RUST_VERSION" = "1.29.0" ]; then
1019
cargo update --verbose --package "serde_derive" --precise "1.0.98"
1120
fi
1221

13-
if [ "$TRAVIS_RUST_VERSION" = "stable" ]; then
22+
if [ -n "$RUSTFMTCHECK" ]; then
1423
rustup component add rustfmt
1524
cargo fmt --all -- --check
1625
fi
1726

27+
# Integration test.
28+
if [ -n "$BITCOINVERSION" ]; then
29+
wget https://bitcoincore.org/bin/bitcoin-core-$BITCOINVERSION/bitcoin-$BITCOINVERSION-x86_64-linux-gnu.tar.gz
30+
tar -xzvf bitcoin-$BITCOINVERSION-x86_64-linux-gnu.tar.gz
31+
export PATH=$PATH:$(pwd)/bitcoin-$BITCOINVERSION/bin
32+
cd integration_test
33+
./run.sh
34+
exit 0
35+
fi
36+
37+
# Regular build/unit test.
1838
cargo build --verbose
1939
cargo test --verbose
2040
cargo build --verbose --examples
21-
22-
# Integration test
23-
wget https://bitcoincore.org/bin/bitcoin-core-$BITCOINVERSION/bitcoin-$BITCOINVERSION-x86_64-linux-gnu.tar.gz
24-
tar -xzvf bitcoin-$BITCOINVERSION-x86_64-linux-gnu.tar.gz
25-
export PATH=$PATH:$(pwd)/bitcoin-$BITCOINVERSION/bin
26-
(cd integration_test && ./run.sh)
27-

0 commit comments

Comments
 (0)