smithay/.travis.yml

115 lines
2.5 KiB
YAML
Raw Normal View History

2017-02-22 13:08:53 +00:00
language: rust
cache: cargo
2017-09-21 17:53:56 +00:00
sudo: required
2017-02-22 13:08:53 +00:00
rust:
- stable
- beta
- nightly
os:
- linux
2017-02-22 13:23:20 +00:00
dist: trusty
addons:
apt:
packages:
2017-09-21 17:53:56 +00:00
- libssl-dev
- libudev-dev
2017-09-21 17:53:56 +00:00
- libgbm-dev
- libxkbcommon-dev
- libegl1-mesa-dev
before_install:
- sudo add-apt-repository -y ppa:wayland.admin/daily-builds
- sudo apt-get update -qq || echo "Ignoring failed apt-get update..."
2017-09-21 17:53:56 +00:00
- sudo apt-get install -y libwayland-dev libinput-dev
2017-02-22 13:08:53 +00:00
branches:
only:
- master
env:
global:
- RUST_BACKTRACE=1
matrix:
- FEATURES=""
# test individual features
- FEATURES="backend_winit"
- FEATURES="backend_drm"
- FEATURES="backend_libinput"
- FEATURES="renderer_glium"
# test default features
- FEATURES="default"
# test all features simultaneously
- FEATURES="all"
matrix:
include:
# special features for lint & fmt
- rust: nightly
env: FEATURES="cargo-fmt"
- rust: nightly
env: FEATURES="cargo-clippy"
allow_failures:
- rust: nightly
2017-02-22 13:08:53 +00:00
before_script:
2017-03-13 17:12:14 +00:00
- export PATH=$HOME/.local/bin:$HOME/.cargo/bin:$PATH
2017-09-28 17:35:22 +00:00
- |
if [ "$FEATURES" = "cargo-fmt" ]; then
2017-09-28 17:35:22 +00:00
cargo install rustfmt-nightly --force;
fi
- |
if [ "$FEATURES" = "cargo-clippy" ]; then
cargo install clippy --force;
fi
2017-03-11 08:06:25 +00:00
- mkdir $(pwd)/socket
- export XDG_RUNTIME_DIR="$(pwd)/socket"
2017-02-22 13:08:53 +00:00
script:
2017-09-28 17:35:22 +00:00
- |
case $FEATURES in
"all")
cargo test --all-features &&
cargo doc --no-deps --all-features
;;
"default")
cargo test &&
cargo doc --no-deps
;;
"cargo-fmt")
cargo fmt -- --write-mode=diff
;;
"cargo-clippy")
cargo clippy --all-features -- -D warnings
;;
*)
cargo test --lib --doc --tests --no-default-features --features "$FEATURES" &&
cargo doc --no-deps --no-default-features --features "$FEATURES"
esac
2017-02-22 13:08:53 +00:00
after_success:
2017-10-04 09:29:50 +00:00
- cp ./doc_index.html ./target/doc/index.html
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: "${TRAVIS_BUILD_DIR}/target/doc"
on:
branch: master
rust: stable
2017-10-04 09:39:14 +00:00
condition: "$FEATURES = all"
2017-02-22 13:08:53 +00:00
notifications:
webhooks:
urls:
- "https://scalar.vector.im/api/neb/services/hooks/dHJhdmlzLWNpLyU0MGxldmFucyUzQXNhZmFyYWRlZy5uZXQvJTIxRkt4aGprSUNwakJWelZlQ2RGJTNBc2FmYXJhZGVnLm5ldA"
on_success: change
on_failure: always
on_start: never