language: rust

rust:
  - stable
  - beta
  - nightly

cache: cargo

matrix:
  fast_finish: true
  allow_failures:
    - rust: nightly

before_script:
  - rustup component add rustfmt-preview

script:
  - if [ "$TRAVIS_RUST_VERSION" == "stable" ]; then make fmt; fi
  - make build
  - make test
