sudo: false
language: rust
cache:
directories:
- /home/travis/.cargo
before_cache:
- rm -rf /home/travis/.cargo/registry
matrix:
include:
- rust: stable
env: RUST_VERSION=stable COMMAND=test
- rust: beta
env: RUST_VERSION=beta COMMAND=test
- rust: nightly
env: RUST_VERSION=nightly COMMAND=test
- rust: stable
env: COMMAND=lint
script:
- make $COMMAND
- cargo check --benches --all-features
- |
([ "$RUST_VERSION" = "nightly" ] || [ "$RUST_VERSION" = "beta" ]) && exit 0 # Don't cargo-fmt on nightly or beta
make style-check
- |
# Remove dev-dependencies so they do not enable features accidentally
# https://github.com/rust-lang/cargo/issues/4664
sed -i '/dev-dependencies/,/dev-dependencies/d' Cargo.toml
cargo build --all-features
notifications:
email: false
irc:
channels:
- "chat.freenode.net#pocoo"
on_success: change
on_failure: always
use_notice: true
skip_join: true