smithay/.travis.yml

116 lines
3.0 KiB
YAML
Raw Normal View History

2017-02-22 13:08:53 +00:00
language: rust
2017-12-14 20:46:57 +00:00
# We need this for the matrix, install is quick although unused
2017-02-22 13:08:53 +00:00
rust:
- stable
- beta
- nightly
2017-12-14 20:46:57 +00:00
sudo: required
2017-02-22 13:08:53 +00:00
2018-04-17 16:48:46 +00:00
branches:
only:
- master
2017-02-22 13:23:20 +00:00
dist: trusty
2017-12-14 20:46:57 +00:00
# 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:
2017-12-14 20:46:57 +00:00
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
2017-02-22 13:08:53 +00:00
env:
matrix:
- FEATURES=""
# test individual features
- FEATURES="backend_winit"
- FEATURES="backend_drm"
- FEATURES="backend_libinput"
2017-12-21 16:57:19 +00:00
- FEATURES="backend_udev"
- FEATURES="backend_session"
2018-02-18 12:46:26 +00:00
- FEATURES="backend_session_logind"
- FEATURES="renderer_glium"
2018-05-04 08:57:18 +00:00
- FEATURES="xwayland"
# test default features
- FEATURES="default"
# test all features simultaneously
- FEATURES="all"
2018-05-07 18:03:14 +00:00
# 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
2017-02-22 13:08:53 +00:00
before_script:
2017-12-14 20:46:57 +00:00
- 'echo ubuntu-mirror: http://mirrors.us.kernel.org/ubuntu/ > ~/.vagga.yaml'
- 'echo alpine-mirror: http://mirrors.gigenet.com/alpinelinux/ >> ~/.vagga.yaml'
- |
2017-12-14 20:46:57 +00:00
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
2017-02-22 13:08:53 +00:00
script:
2017-09-28 17:35:22 +00:00
- |
case $FEATURES in
"all")
2017-12-14 20:46:57 +00:00
vagga cargo-$TRAVIS_RUST_VERSION test --all-features &&
vagga cargo-$TRAVIS_RUST_VERSION doc --no-deps --all-features
;;
"default")
2017-12-14 20:46:57 +00:00
vagga cargo-$TRAVIS_RUST_VERSION test &&
vagga cargo-$TRAVIS_RUST_VERSION doc --no-deps
;;
"cargo-fmt")
2018-09-30 10:14:22 +00:00
vagga cargo-$TRAVIS_RUST_VERSION fmt --all -- --check
;;
"cargo-clippy")
2017-12-14 20:46:57 +00:00
vagga cargo-$TRAVIS_RUST_VERSION clippy --all-features -- -D warnings
;;
2018-05-07 18:03:14 +00:00
"anvil")
vagga cargo-$TRAVIS_RUST_VERSION test -p anvil --all-features
;;
*)
vagga cargo-$TRAVIS_RUST_VERSION check --tests --no-default-features --features "$FEATURES" &&
2017-12-14 20:46:57 +00:00
vagga cargo-$TRAVIS_RUST_VERSION 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
2018-01-14 14:43:47 +00:00
local_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:
2017-12-14 20:46:57 +00:00
webhooks:
urls:
- "https://scalar.vector.im/api/neb/services/hooks/dHJhdmlzLWNpLyU0MGxldmFucyUzQXNhZmFyYWRlZy5uZXQvJTIxRkt4aGprSUNwakJWelZlQ2RGJTNBc2FmYXJhZGVnLm5ldA"
on_success: change
on_failure: always
on_start: never