language: rust
rust:
  - 1.39.0

cache: cargo

before_script:
  - rustup component add rustfmt

script:
  - cargo build --verbose --release --all
  - cargo fmt --all -- --check
  - cargo test --verbose --release --all
  - cargo test --verbose --release --all -- --ignored

before_cache:
  - rm -rf "$TRAVIS_HOME/.cargo/registry/src"
  - cargo install cargo-update || echo "cargo-update already installed"
  - cargo install-update -a # update outdated cached binaries
