diff --git a/.travis.yml b/.travis.yml index 897b389..b2892e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,10 +4,4 @@ rust: - stable - beta - nightly -script: - - cargo build --verbose - - cargo test --verbose - - cargo doc - - if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then - cargo bench --verbose; - fi +script: ci/script.sh diff --git a/ci/script.sh b/ci/script.sh new file mode 100755 index 0000000..aebb3bd --- /dev/null +++ b/ci/script.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +set -ex + +cargo build --verbose +cargo doc --verbose + +# If we're testing on an older version of Rust, then only check that we +# can build the crate. This is because the dev dependencies might be updated +# more frequently, and therefore might require a newer version of Rust. +# +# This isn't ideal. It's a compromise. +if [ "$TRAVIS_RUST_VERSION" = "1.12.0" ]; then + exit +fi + +cargo test --verbose +if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then + cargo bench --verbose --no-run +fi