language: rust
sudo: false

matrix:
  include:
    - rust: 1.29.0
    - rust: stable
    - rust: beta
    - rust: nightly
    - rust: nightly
      env:
       - FEATURES='nightly'

branches:
  only:
    - staging
    - trying
    - master

script:
  - cargo build --verbose --features "$FEATURES"
  - cargo test --verbose --features "$FEATURES"
  - if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then cargo bench --verbose --features "$FEATURES"; fi
  - cargo doc --verbose --features "$FEATURES"

language: rust
sudo: false

matrix:
  include:
    - rust: 1.29.0
    - rust: stable
    - rust: beta
    - rust: nightly
    - rust: nightly
      env:
       - FEATURES='nightly'

branches:
  # Don't build these branches
  except:
    # Used by bors
    - trying.tmp
    - staging.tmp

script:
  - cargo build --verbose --features "$FEATURES"
  - cargo test --verbose --features "$FEATURES"
  - if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then cargo bench --verbose --features "$FEATURES"; fi
  - cargo doc --verbose --features "$FEATURES"

Allow more branches to be built on CI
Allow more branches to be built on CI

Adapted from https://github.com/rust-lang-nursery/rust-clippy/pull/3359.
