From f01cecbc068546c2a1d5ef280820f7d33993f361 Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Mon, 27 Apr 2015 18:44:37 -0700 Subject: [PATCH] chore(travis): add beta testing to travis-ci --- .travis.sh | 12 ++++++++++++ .travis.yml | 18 ++++++++++++------ 2 files changed, 24 insertions(+), 6 deletions(-) create mode 100755 .travis.sh diff --git a/.travis.sh b/.travis.sh new file mode 100755 index 00000000..db267412 --- /dev/null +++ b/.travis.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +if [ "$BENCH" != "" ] +then + echo "cargo bench $FEATURES" + cargo bench $FEATURES +else + echo "cargo build $FEATURES" + cargo build $FEATURES + echo "cargo test $FEATURES" + cargo test $FEATURES +fi diff --git a/.travis.yml b/.travis.yml index adbe77c1..a9a92f87 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,21 +1,27 @@ language: rust +matrix: + fast_finish: true + include: + - rust: nightly + env: FEATURES="--features nightly" + - rust: nightly + env: FEATURES="--features nightly" BENCH=true + - rust: beta + sudo: false cache: directories: - target -script: - - cargo build --features nightly - - cargo test --features nightly - - cargo bench --features nightly +script: ./.travis.sh after_success: | [ $TRAVIS_BRANCH = master ] && [ $TRAVIS_PULL_REQUEST = false ] && - cargo doc --features nightly && + [ $TRAVIS_RUST_VERSION = beta ] && + cargo doc && echo '' > target/doc/index.html && - git shortlog -s -n | cut -c 8- > target/doc/humans.txt && pip install --user ghp-import && /home/travis/.local/bin/ghp-import -n target/doc && git push -fq https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages