language: rust
cache: cargo
sudo: false
rust:
- nightly
- beta
- stable
before_script:
- export PATH=$HOME/.cargo/bin:$HOME/.local/bin:$PATH
- rustup component add rustfmt-preview
script:
- if [[ $(rustup show active-toolchain) == stable* ]]; then cargo fmt -- --check; fi;
- cargo build
- cargo test