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
|
|
|
|
|
2017-02-22 15:42:56 +00:00
|
|
|
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
|
|
|
|
2017-10-03 14:18:49 +00:00
|
|
|
env:
|
|
|
|
matrix:
|
|
|
|
- FEATURES=""
|
|
|
|
# test individual features
|
|
|
|
- FEATURES="backend_winit"
|
|
|
|
- FEATURES="backend_drm"
|
2018-11-21 09:44:52 +00:00
|
|
|
- FEATURES="backend_drm_legacy"
|
|
|
|
- FEATURES="backend_drm_gbm"
|
|
|
|
- FEATURES="backend_drm_egl"
|
|
|
|
- FEATURES="backend_egl"
|
2017-10-03 14:18:49 +00:00
|
|
|
- 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"
|
2018-11-21 09:44:52 +00:00
|
|
|
- FEATURES="renderer_gl"
|
2017-10-03 14:18:49 +00:00
|
|
|
- FEATURES="renderer_glium"
|
2018-05-04 08:57:18 +00:00
|
|
|
- FEATURES="xwayland"
|
2017-10-03 14:18:49 +00:00
|
|
|
# test default features
|
|
|
|
- FEATURES="default"
|
|
|
|
# test all features simultaneously
|
|
|
|
- FEATURES="all"
|
2018-12-15 21:08:23 +00:00
|
|
|
# test our examples
|
|
|
|
- FEATURES="examples"
|
2018-05-07 18:03:14 +00:00
|
|
|
# test our house compositor
|
2018-12-15 19:27:37 +00:00
|
|
|
- FEATURES="anvil" ANVIL_FEATURES=""
|
|
|
|
- FEATURES="anvil" ANVIL_FEATURES="egl"
|
|
|
|
- FEATURES="anvil" ANVIL_FEATURES="winit"
|
|
|
|
- FEATURES="anvil" ANVIL_FEATURES="udev"
|
|
|
|
- FEATURES="anvil" ANVIL_FEATURES="logind"
|
|
|
|
- FEATURES="anvil" ANVIL_FEATURES="default"
|
|
|
|
- FEATURES="anvil" ANVIL_FEATURES="all"
|
2017-10-03 14:18:49 +00:00
|
|
|
|
|
|
|
matrix:
|
2018-12-15 19:33:36 +00:00
|
|
|
fast_finish: true
|
2017-10-03 14:18:49 +00:00
|
|
|
include:
|
|
|
|
# special features for lint & fmt
|
2018-09-27 10:18:54 +00:00
|
|
|
- rust: stable
|
2017-10-03 14:18:49 +00:00
|
|
|
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-09-29 15:38:47 +00:00
|
|
|
- |
|
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
|
|
|
- |
|
2017-09-29 15:38:47 +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
|
2017-09-29 15:38:47 +00:00
|
|
|
;;
|
|
|
|
"default")
|
2017-12-14 20:46:57 +00:00
|
|
|
vagga cargo-$TRAVIS_RUST_VERSION test &&
|
|
|
|
vagga cargo-$TRAVIS_RUST_VERSION doc --no-deps
|
2017-09-29 15:38:47 +00:00
|
|
|
;;
|
2018-12-15 21:08:23 +00:00
|
|
|
"examples")
|
|
|
|
vagga cargo-$TRAVIS_RUST_VERSION check --examples
|
|
|
|
;;
|
2017-09-29 15:38:47 +00:00
|
|
|
"cargo-fmt")
|
2018-09-30 10:14:22 +00:00
|
|
|
vagga cargo-$TRAVIS_RUST_VERSION fmt --all -- --check
|
2017-09-29 15:38:47 +00:00
|
|
|
;;
|
|
|
|
"cargo-clippy")
|
2017-12-14 20:46:57 +00:00
|
|
|
vagga cargo-$TRAVIS_RUST_VERSION clippy --all-features -- -D warnings
|
2017-09-29 15:38:47 +00:00
|
|
|
;;
|
2018-05-07 18:03:14 +00:00
|
|
|
"anvil")
|
2018-12-15 19:27:37 +00:00
|
|
|
cd anvil
|
|
|
|
case $ANVIL_FEATURES in
|
|
|
|
"all")
|
|
|
|
vagga cargo-$TRAVIS_RUST_VERSION test --all-features
|
|
|
|
;;
|
|
|
|
"default")
|
|
|
|
vagga cargo-$TRAVIS_RUST_VERSION test
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
vagga cargo-$TRAVIS_RUST_VERSION check --no-default-features --features "$ANVIL_FEATURES"
|
|
|
|
esac
|
2018-05-07 18:03:14 +00:00
|
|
|
;;
|
2017-09-29 15:38:47 +00:00
|
|
|
*)
|
2018-09-30 19:12:38 +00:00
|
|
|
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"
|
2017-09-29 15:38:47 +00:00
|
|
|
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
|
2017-09-29 15:38:47 +00:00
|
|
|
|
2017-10-03 14:18:49 +00:00
|
|
|
deploy:
|
|
|
|
provider: pages
|
|
|
|
skip_cleanup: true
|
|
|
|
github_token: $GITHUB_TOKEN
|
2018-01-14 14:43:47 +00:00
|
|
|
local_dir: "./target/doc"
|
2017-10-03 14:18:49 +00:00
|
|
|
on:
|
|
|
|
branch: master
|
2018-12-08 12:40:07 +00:00
|
|
|
rust: nightly
|
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
|