language: rust
sudo: false
dist: xenial
rust:
- stable
- beta
- nightly
env:
- TARGET=x86_64-unknown-linux-gnu
- TARGET=x86_64-unknown-linux-musl
matrix:
allow_failures:
- rust: nightly
fast_finish: true
before_install:
- rustup target add $TARGET || true
- if [[ $TARGET == 'x86_64-unknown-linux-musl' ]]; then sudo apt update && sudo apt install -y musl-tools; fi
- rustup component add rustfmt clippy
script:
- cargo fmt -- --check
- cargo clippy -- -D warnings
- cargo build --target $TARGET
- cargo build --target $TARGET --release
- cargo test --target $TARGET
- cargo test --target $TARGET --release
branches:
except:
- staging.tmp
- trying.tmp
notifications:
email:
on_success: never