File tree Expand file tree Collapse file tree 4 files changed +21
-25
lines changed Expand file tree Collapse file tree 4 files changed +21
-25
lines changed Original file line number Diff line number Diff line change 1
1
language : rust
2
2
rust :
3
+ - 1.15.0
4
+ - 1.22.0
5
+ - 1.26.0
3
6
- stable
4
7
- beta
5
8
- nightly
6
- matrix :
7
- include :
8
- - rust : 1.8.0
9
- before_script :
10
- # rand 0.3.22 started depending on rand 0.4, which requires rustc 1.15
11
- # manually hacking the lockfile due to the limitations of cargo#2773
12
- - cargo generate-lockfile
13
- - sed -i -e 's/"rand 0.[34].[0-9]\+/"rand 0.3.20/' Cargo.lock
14
- - sed -i -e '/^name = "rand"/,/^$/s/version = "0.3.[0-9]\+"/version = "0.3.20"/' Cargo.lock
15
9
sudo : false
16
10
script :
17
11
- cargo build --verbose
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
# Use rustup to locally run the same suite of tests as .travis.yml.
3
- # (You should first install/update 1.8.0, stable, beta, and nightly .)
3
+ # (You should first install/update all versions listed below .)
4
4
5
5
set -ex
6
6
7
7
export TRAVIS_RUST_VERSION
8
- for TRAVIS_RUST_VERSION in 1.8 .0 stable beta nightly; do
8
+ for TRAVIS_RUST_VERSION in 1.15.0 1.22.0 1.26 .0 stable beta nightly; do
9
9
run=" rustup run $TRAVIS_RUST_VERSION "
10
- if [ " $TRAVIS_RUST_VERSION " = 1.8.0 ]; then
11
- # rand 0.3.22 started depending on rand 0.4, which requires rustc 1.15
12
- # manually hacking the lockfile due to the limitations of cargo#2773
13
- $run cargo generate-lockfile
14
- $run sed -i -e ' s/"rand 0.[34].[0-9]\+/"rand 0.3.20/' Cargo.lock
15
- $run sed -i -e ' /^name = "rand"/,/^$/s/version = "0.3.[0-9]\+"/version = "0.3.20"/' Cargo.lock
16
- fi
17
10
$run cargo build --verbose
18
11
$run $PWD /ci/test_full.sh
19
12
done
Original file line number Diff line number Diff line change 4
4
5
5
echo Testing num on rustc ${TRAVIS_RUST_VERSION}
6
6
7
+ FEATURES=" serde"
8
+ if [[ " $TRAVIS_RUST_VERSION " =~ ^(nightly| beta| stable| 1.26.0| 1.22.0)$ ]]; then
9
+ FEATURES=" $FEATURES rand"
10
+ fi
11
+ if [[ " $TRAVIS_RUST_VERSION " =~ ^(nightly| beta| stable| 1.26.0)$ ]]; then
12
+ FEATURES=" $FEATURES i128"
13
+ fi
14
+
7
15
# num should build and test everywhere.
8
16
cargo build --verbose
9
17
cargo test --verbose
@@ -13,11 +21,12 @@ cargo build --no-default-features
13
21
cargo test --no-default-features
14
22
15
23
# Each isolated feature should also work everywhere.
16
- for feature in bigint complex rational rustc-serialize serde; do
17
- cargo build --verbose --no-default-features --features=" $feature "
18
- cargo test --verbose --no-default-features --features=" $feature "
24
+ # (but still with "std", else bigint breaks)
25
+ for feature in $FEATURES ; do
26
+ cargo build --verbose --no-default-features --features=" std $feature "
27
+ cargo test --verbose --no-default-features --features=" std $feature "
19
28
done
20
29
21
- # Downgrade serde and build test the 0.7.0 channel as well
22
- cargo update -p serde --precise 0.7.0
23
- cargo build --verbose -- features " serde "
30
+ # test all supported features together
31
+ cargo build --features= " std $FEATURES "
32
+ cargo test --features= " std $FEATURES "
Original file line number Diff line number Diff line change 55
55
//!
56
56
//! ## Compatibility
57
57
//!
58
- //! The `num` crate is tested for rustc 1.8 and greater.
58
+ //! The `num` crate is tested for rustc 1.15 and greater.
59
59
60
60
#![ doc( html_root_url = "https://docs.rs/num/0.2" ) ]
61
61
#![ no_std]
You can’t perform that action at this time.
0 commit comments