language: rust
sudo: false
os:
- linux
- osx
addons:
apt:
packages:
- gcc-multilib
env:
matrix:
- FEATURES="protobuf push process"
- FEATURES=""
global:
- RUSTFLAGS=--deny=warnings
- ARCH=i686
rust:
matrix:
fast_finish: true
include:
- rust: nightly
- rust: nightly
env: FEATURES="nightly protobuf push process"
- rust: beta
- rust: stable
install:
- rustup component add clippy-preview
- rustup component add rustfmt-preview
before_script:
- cargo fmt --all -- --check
- cargo clippy --all -- -D clippy
allow_failures:
- rust: nightly
script:
- cargo test --no-default-features --features="$FEATURES"
- |
if [ $TRAVIS_RUST_VERSION = 'nightly' ]; then
cargo build -p prometheus-static-metric --examples --no-default-features --features="$FEATURES"
cargo test -p prometheus-static-metric --no-default-features --features="$FEATURES"
fi