forked from rust-num/num
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This bumps the minimum rustc to 1.8.0, "fixing" rust-num#257. I normally consider this a breaking change, but we were already broken due to external factors, for which I couldn't find a workaround. This adds 1.15.0 to the CI matrix to build stable num-derive. We still need nightly to run its tests though, because of compiletest_rs, and dev-dependencies can't be optional. The testing scripts are moved from .travis/ to ci/, as they don't really need to be hidden. It's also now consolidated into one test_full.sh which considers $TRAVIS_RUST_VERSION as needed.
- Loading branch information
Showing
11 changed files
with
68 additions
and
61 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
language: rust | ||
rust: | ||
- 1.0.0 | ||
- 1.8.0 | ||
- 1.15.0 | ||
- beta | ||
- nightly | ||
sudo: false | ||
script: | ||
- cargo build --verbose | ||
- make test | ||
- .travis/test_features.sh | ||
- | | ||
[ $TRAVIS_RUST_VERSION != nightly ] || .travis/test_nightly.sh | ||
- ./ci/test_full.sh | ||
- cargo doc | ||
after_success: | | ||
[ $TRAVIS_BRANCH = master ] && | ||
[ $TRAVIS_PULL_REQUEST = false ] && | ||
[ $TRAVIS_RUST_VERSION = nightly ] && | ||
ssh-agent .travis/deploy.sh | ||
ssh-agent ./ci/deploy.sh | ||
notifications: | ||
email: | ||
on_success: never |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
# Use rustup to locally run the same suite of tests as .travis.yml. | ||
# (You should first install/update 1.8.0, 1.15.0, beta, and nightly.) | ||
|
||
set -ex | ||
|
||
for toolchain in 1.8.0 1.15.0 beta nightly; do | ||
run="rustup run $toolchain" | ||
$run cargo build --verbose | ||
$run $PWD/ci/test_full.sh $toolchain | ||
$run cargo doc | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
echo Testing num on rustc ${TRAVIS_RUST_VERSION:=$1} | ||
|
||
# All of these packages should build and test everywhere. | ||
for package in bigint complex integer iter rational traits; do | ||
cargo build --manifest-path $package/Cargo.toml | ||
cargo test --manifest-path $package/Cargo.toml | ||
done | ||
|
||
# Each isolated feature should also work everywhere. | ||
for feature in '' bigint rational complex; do | ||
cargo build --verbose --no-default-features --features="$feature" | ||
cargo test --verbose --no-default-features --features="$feature" | ||
done | ||
|
||
# Build test for the serde feature | ||
cargo build --verbose --features "serde" | ||
|
||
# Downgrade serde and build test the 0.7.0 channel as well | ||
cargo update -p serde --precise 0.7.0 | ||
cargo build --verbose --features "serde" | ||
|
||
|
||
if [ "$TRAVIS_RUST_VERSION" = 1.8.0 ]; then exit; fi | ||
|
||
# num-derive should build on 1.15.0+ | ||
cargo build --verbose --manifest-path=derive/Cargo.toml | ||
|
||
|
||
if [ "$TRAVIS_RUST_VERSION" != nightly ]; then exit; fi | ||
|
||
# num-derive testing requires compiletest_rs, which requires nightly | ||
cargo test --verbose --manifest-path=derive/Cargo.toml | ||
|
||
# num-macros only works on nightly, soon to be deprecated | ||
cargo build --verbose --manifest-path=macros/Cargo.toml | ||
cargo test --verbose --manifest-path=macros/Cargo.toml | ||
|
||
# benchmarks only work on nightly | ||
cargo bench --verbose |