Auto merge of #263 - cuviper:revamp-ci, r=hauleth
Bump rustc to 1.8 and revamp all CI This bumps the minimum rustc to 1.8.0, "fixing" #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.
This commit is contained in:
commit
d273495cbf
16
.rustup.sh
16
.rustup.sh
|
@ -1,16 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Use rustup to locally run the same suite of tests as .travis.yml.
|
||||
# (You should first install/update 1.0.0, beta, and nightly.)
|
||||
|
||||
set -ex
|
||||
|
||||
for toolchain in 1.0.0 beta nightly; do
|
||||
run="rustup run $toolchain"
|
||||
$run cargo build --verbose
|
||||
$run /usr/bin/env make test
|
||||
$run $PWD/.travis/test_features.sh
|
||||
if [ $toolchain = nightly ]; then
|
||||
$run $PWD/.travis/test_nightly.sh
|
||||
fi
|
||||
$run cargo doc
|
||||
done
|
10
.travis.yml
10
.travis.yml
|
@ -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
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
for feature in '' bigint rational complex; do
|
||||
cargo build --verbose --no-default-features --features="$feature"
|
||||
done
|
|
@ -1,15 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
cargo bench --verbose
|
||||
|
||||
cargo test --verbose --manifest-path=macros/Cargo.toml
|
||||
cargo test --verbose --manifest-path=derive/Cargo.toml
|
||||
|
||||
# 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"
|
14
Makefile
14
Makefile
|
@ -1,14 +0,0 @@
|
|||
CARGO_CMD ?= cargo
|
||||
|
||||
packages = bigint complex integer iter rational traits
|
||||
|
||||
test:
|
||||
$(MAKE) run-all TASK="test"
|
||||
|
||||
run-all: $(packages)
|
||||
$(CARGO_CMD) $(TASK)
|
||||
|
||||
$(packages):
|
||||
$(CARGO_CMD) $(TASK) --manifest-path $@/Cargo.toml
|
||||
|
||||
.PHONY: $(packages) test
|
|
@ -22,3 +22,9 @@ and this to your crate root:
|
|||
```rust
|
||||
extern crate num;
|
||||
```
|
||||
|
||||
## Compatibility
|
||||
|
||||
Most of the `num` crates are tested for rustc 1.8 and greater.
|
||||
The exceptions are `num-derive` which requires at least rustc 1.15,
|
||||
and the deprecated `num-macros` which requires nightly rustc.
|
||||
|
|
|
@ -6,7 +6,7 @@ cp doc/* target/doc/
|
|||
pip install ghp-import --user
|
||||
$HOME/.local/bin/ghp-import -n target/doc
|
||||
|
||||
openssl aes-256-cbc -K $encrypted_9e86330b283d_key -iv $encrypted_9e86330b283d_iv -in .travis/deploy.enc -out .travis/deploy -d
|
||||
chmod 600 .travis/deploy
|
||||
ssh-add .travis/deploy
|
||||
openssl aes-256-cbc -K $encrypted_9e86330b283d_key -iv $encrypted_9e86330b283d_iv -in ./ci/deploy.enc -out ./ci/deploy -d
|
||||
chmod 600 ./ci/deploy
|
||||
ssh-add ./ci/deploy
|
||||
git push -qf ssh://git@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue