From e5a318cb723a83e758b0d6c37a3388f9b648eed9 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Mon, 1 Jan 2018 09:34:59 -0500 Subject: [PATCH] ci: don't run tests on 1.12.0 This changes CI to only test compilation when running on the minimum supported version of Rust. --- .travis.yml | 8 +------- ci/script.sh | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 7 deletions(-) create mode 100755 ci/script.sh 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