language: rust
sudo: false
cache: cargo
rust:
- stable
- beta
- nightly
env:
- COMPILE_ARGS=("--no-default-features")
- COMPILE_ARGS=()
os:
- linux
- osx
before_script:
- export PATH="$PATH:$HOME/.cargo/bin"
- |
  # cargo install rustfmt
  if [[ $TRAVIS_RUST_VERSION = nightly ]]; then
      echo "formatting enabled"
      if which rustfmt > /dev/null && [[ $(rustup run nightly rustfmt --version) != "0.2.1-nightly (16920fb"* ]]; then
          echo "uninstalling old rustfmt"
          cargo uninstall rustfmt;
      fi
      if ! which rustfmt > /dev/null; then
          echo "installing rustfmt"
          cargo install rustfmt-nightly --git https://github.com/rust-lang-nursery/rustfmt.git --rev 16920fb -j 1
          cargo install rustfmt-nightly --vers 0.2.1 -j 1
      fi
  fi
- |
  # rustfmt --version
  if [[ $TRAVIS_RUST_VERSION = nightly ]]; then
      rustup run nightly rustfmt --version
  fi
script:
- cargo build --verbose "${COMPILE_ARGS[@]}"
- |
  # cargo fmt
  if [[ $TRAVIS_RUST_VERSION = nightly ]]; then
      cargo fmt --verbose -- --write-mode=diff
  fi
- cargo test --verbose "${COMPILE_ARGS[@]}" -- --skip auth

language: rust
sudo: false
cache: cargo
rust:
- stable
- beta
- nightly
env:
- COMPILE_ARGS=("--no-default-features")
- COMPILE_ARGS=()
os:
- linux
- osx
script:
- cargo build --verbose "${COMPILE_ARGS[@]}"
- cargo test --verbose "${COMPILE_ARGS[@]}" -- --skip auth

Remove formatting testing until rustfmt works on stable rust again.
Remove formatting testing until rustfmt works on stable rust again.
