Skip to content
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

Feature specific MSRV #66

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -9,7 +9,6 @@ rust:
- beta
- nightly
script:
- cargo build --verbose
- ./ci/test_full.sh
matrix:
include:
Expand Down
5 changes: 4 additions & 1 deletion README.md
Expand Up @@ -47,4 +47,7 @@ Release notes are available in [RELEASES.md](RELEASES.md).

## Compatibility

The `num-complex` crate is tested for rustc 1.15 and greater.
The `num-complex` crate is tested for rustc 1.15 and greater, and each feature are tested for

- `rand`: 1.22 and later
- `i128`: 1.26 and later
9 changes: 4 additions & 5 deletions ci/rustup.sh → ci/test_all_versions.sh
@@ -1,12 +1,11 @@
#!/bin/sh
#!/bin/bash
# Use rustup to locally run the same suite of tests as .travis.yml.
# (You should first install/update all versions listed below.)
# This script installs toolchains used in CI process.

set -ex

export TRAVIS_RUST_VERSION
for TRAVIS_RUST_VERSION in 1.15.0 1.22.0 1.26.0 stable beta nightly; do
run="rustup run $TRAVIS_RUST_VERSION"
$run cargo build --verbose
$run $PWD/ci/test_full.sh
rustup install $TRAVIS_RUST_VERSION
rustup run $TRAVIS_RUST_VERSION $(cd $(dirname $0);pwd)/test_full.sh
done
6 changes: 4 additions & 2 deletions ci/test_full.sh
Expand Up @@ -4,11 +4,13 @@ set -ex

echo Testing num-complex on rustc ${TRAVIS_RUST_VERSION}

MINOR_VERSION=$(rustc --version | cut -f 1 | cut -d. -f 2)

FEATURES="std serde"
if [[ "$TRAVIS_RUST_VERSION" =~ ^(nightly|beta|stable|1.26.0|1.22.0)$ ]]; then
if [[ $MINOR_VERSION -ge 22 ]]; then # MSRV of rand feature is 1.22.0
FEATURES="$FEATURES rand"
fi
if [[ "$TRAVIS_RUST_VERSION" =~ ^(nightly|beta|stable|1.26.0)$ ]]; then
if [[ $MINOR_VERSION -ge 26 ]]; then # MSRV of i128 features is 1.26.0
FEATURES="$FEATURES i128"
fi

Expand Down