language: rust rust: - stable cache: cargo: true timeout: 1200 addons: apt: packages: - unzip before_install: # The Rust stable toolchain is already installed, ${RUST_NEXT} is added to # provide `cargo clippy` and `cargo fmt`. - rustup toolchain install ${RUST_NEXT} - rustup component add --toolchain=${RUST_NEXT} rustfmt-preview clippy-preview # Some symlinking is still necessary for clippy to function properly. - ln -sf ${HOME}/.rustup/toolchains/${RUST_NEXT}-x86_64-unknown-linux-gnu/bin/clippy-driver ${HOME}/.rustup/toolchains/${RUST_NEXT}-x86_64-unknown-linux-gnu/bin/cargo-clippy $HOME/.cargo/bin/ env: global: - RUST_BACKTRACE=1 # Enables additional cpu-specific optimizations. - RUSTFLAGS="-D warnings -C target-cpu=native" # Note: `beta` should be removed along with `RUST_NEXT` after the 1.28 # stable release on 2018-09-13. - RUST_NEXT=beta script: - cargo +${RUST_NEXT} clippy -- --deny clippy - cargo +${RUST_NEXT} clippy --tests --examples --benches -- --deny clippy - cargo +${RUST_NEXT} clippy --all-features -- --deny clippy - cargo +${RUST_NEXT} clippy --all-features --tests -- --deny clippy - cargo +${RUST_NEXT} fmt -- --check - cargo test --all-features --release