language: rust
cache: cargo
os:
- linux
- osx
- windows
addons:
apt:
packages:
- libasound2-dev
- libudev-dev
- libssl-dev
env:
global:
- RUST_BACKTRACE=1
matrix:
- WASM=0
rust:
- stable
- beta
- nightly
matrix:
include:
- rust: stable
env: WASM=0
script:
- cargo check --examples --no-default-features
- rust: stable
env: WASM=1
install:
- rustup target add wasm32-unknown-unknown
- cargo install -f cargo-web
script:
- cargo web check --no-default-features
- bash check-web-examples.sh
allow_failures:
- rust: nightly
fast_finish: true
before_cache: |
if [[ "$TRAVIS_RUST_VERSION" == "nightly" && "$TRAVIS_OS_NAME" == "linux" ]]; then
RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin
fi
after_success: |
if [[ "$TRAVIS_RUST_VERSION" == "nightly" && "$TRAVIS_OS_NAME" == "linux" ]] ; then
cargo tarpaulin --out Xml
bash <(curl -s https://codecov.io/bash)
fi