Skip to content

Bump rustc to 1.8 and revamp all CI #263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions .rustup.sh

This file was deleted.

10 changes: 4 additions & 6 deletions .travis.yml
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
7 changes: 0 additions & 7 deletions .travis/test_features.sh

This file was deleted.

15 changes: 0 additions & 15 deletions .travis/test_nightly.sh

This file was deleted.

14 changes: 0 additions & 14 deletions Makefile

This file was deleted.

6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions .travis/deploy.sh → ci/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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://[email protected]/${TRAVIS_REPO_SLUG}.git gh-pages
12 changes: 12 additions & 0 deletions ci/rustup.sh
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
43 changes: 43 additions & 0 deletions ci/test_full.sh
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