language: rust
rust:
- stable
- beta
- nightly
env:
- FEATURES=""
- FEATURES="native_lib dlopen"
matrix:
allow_failures:
- rust: nightly
cache:
directories:
- "$HOME/install"
- "$HOME/.cargo"
before_cache:
- rm -rf "$HOME/.cargo/registry"
install:
- if [ -n "$FEATURES" ]; then
.travis/install_wayland_libs.sh "1.15.0";
export LD_LIBRARY_PATH="$HOME/install/lib:$LD_LIBRARY_PATH";
fi
script:
- cargo build --features "$FEATURES" --verbose
- cargo test --features "$FEATURES" --verbose
- if [ -z "$FEATURES" ]; then
cargo doc --verbose;
cp .travis/index.html target/doc;
fi
deploy:
provider: pages
skip_cleanup: true
github_token: "$GITHUB_TOKEN"
local_dir: target/doc
on:
branch: master
rust: stable
condition: "-z $FEATURES"