smithay/.travis.yml

121 lines
3.1 KiB
YAML

language: rust
# We need this for the matrix, install is quick although unused
rust:
- stable
- beta
- nightly
sudo: required
branches:
only:
- master
dist: trusty
# We cannot cache .vagga, because we actually do not have read permissions
# without sudo and travis cache script runs not as sudo...
cache:
directories:
- .vagga/stable-home
- .vagga/beta-home
- .vagga/nightly-home
- .vagga/.cache
addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
env:
matrix:
- FEATURES=""
# test individual features
- FEATURES="backend_winit"
- FEATURES="backend_drm"
- FEATURES="backend_drm_legacy"
- FEATURES="backend_drm_gbm"
- FEATURES="backend_drm_egl"
- FEATURES="backend_egl"
- FEATURES="backend_libinput"
- FEATURES="backend_udev"
- FEATURES="backend_session"
- FEATURES="backend_session_logind"
- FEATURES="renderer_gl"
- FEATURES="renderer_glium"
- FEATURES="xwayland"
# test default features
- FEATURES="default"
# test all features simultaneously
- FEATURES="all"
# test our house compositor
- FEATURES="anvil"
matrix:
include:
# special features for lint & fmt
- rust: stable
env: FEATURES="cargo-fmt"
- rust: nightly
env: FEATURES="cargo-clippy"
allow_failures:
- rust: nightly
before_script:
- 'echo ubuntu-mirror: http://mirrors.us.kernel.org/ubuntu/ > ~/.vagga.yaml'
- 'echo alpine-mirror: http://mirrors.gigenet.com/alpinelinux/ >> ~/.vagga.yaml'
- |
echo "$(id -un):100000:65536" | sudo tee /etc/subuid | sudo tee /etc/subgid
sudo apt-get install uidmap -y
curl http://files.zerogw.com/vagga/vagga-install.sh | sh
- vagga update-$TRAVIS_RUST_VERSION
script:
- |
case $FEATURES in
"all")
vagga cargo-$TRAVIS_RUST_VERSION test --all-features &&
vagga cargo-$TRAVIS_RUST_VERSION doc --no-deps --all-features
;;
"default")
vagga cargo-$TRAVIS_RUST_VERSION test &&
vagga cargo-$TRAVIS_RUST_VERSION doc --no-deps
;;
"cargo-fmt")
vagga cargo-$TRAVIS_RUST_VERSION fmt --all -- --check
;;
"cargo-clippy")
vagga cargo-$TRAVIS_RUST_VERSION clippy --all-features -- -D warnings
;;
"anvil")
vagga cargo-$TRAVIS_RUST_VERSION test -p anvil --all-features
;;
*)
vagga cargo-$TRAVIS_RUST_VERSION check --tests --no-default-features --features "$FEATURES" &&
vagga cargo-$TRAVIS_RUST_VERSION doc --no-deps --no-default-features --features "$FEATURES"
esac
after_success:
- cp ./doc_index.html ./target/doc/index.html
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: "./target/doc"
on:
branch: master
rust: stable
condition: "$FEATURES = all"
notifications:
webhooks:
urls:
- "https://scalar.vector.im/api/neb/services/hooks/dHJhdmlzLWNpLyU0MGxldmFucyUzQXNhZmFyYWRlZy5uZXQvJTIxRkt4aGprSUNwakJWelZlQ2RGJTNBc2FmYXJhZGVnLm5ldA"
on_success: change
on_failure: always
on_start: never