language: rust
sudo: false
matrix:
  include:
    - rust: 1.12.0
      env:
      - ALL=' '
    - rust: stable
      env:
      - FEATURES='unstable quickcheck'
    - rust: beta
    - rust: nightly
    - rust: nightly
      env:
       - FEATURES='unstable quickcheck'
       - BENCH=1
branches:
  only:
    - master
script:
  - |
      cargo build --verbose --no-default-features &&
      cargo test --verbose --no-default-features &&
      cargo build --verbose --features "$FEATURES" &&
      cargo test ${ALL:---all} --verbose --features "$FEATURES"

language: rust
sudo: false
matrix:
  include:
    - rust: 1.12.0
      before_script:
        # rand 0.4.2 requires rust 1.15, and rand-0.3.22 requires rand-0.4  :/
        # manually hacking the lockfile due to the limitations of cargo#2773
        - cargo generate-lockfile
        - sed -i -e 's/"rand 0.[34].[0-9]\+/"rand 0.3.20/' Cargo.lock
        - sed -i -e '/^name = "rand"/,/^$/s/version = "0.3.[0-9]\+"/version = "0.3.20"/' Cargo.lock
      env:
      - ALL=' '
    - rust: 1.15.0
    - rust: stable
      env:
      - FEATURES='unstable quickcheck'
    - rust: beta
    - rust: nightly
    - rust: nightly
      env:
       - FEATURES='unstable quickcheck'
       - BENCH=1
branches:
  only:
    - master
script:
  - |
      cargo build --verbose --no-default-features &&
      cargo test --verbose --no-default-features &&
      cargo build --verbose --features "$FEATURES" &&
      cargo test ${ALL:---all} --verbose --features "$FEATURES"

Fix testing on Rust 1.12 using cuviper's trick again
MAINT: Fix testing on Rust 1.12 using cuviper's trick again

As seen in rayon and itertools
