language: rust # We need this for the matrix, install is quick although unused rust: - stable 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="wayland_frontend" - FEATURES="xwayland" # test default features - FEATURES="default" # test all features simultaneously - FEATURES="all" # test our examples - FEATURES="examples" # test our house compositor - 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" matrix: fast_finish: true include: # continue testing the full crate on beta&nightly to spot rustc regressions - rust: beta env: FEATURES="all" - rust: beta env: FEATURES="anvil" ANVIL_FEATURES="all" - rust: nightly env: FEATURES="all" - rust: nightly env: FEATURES="anvil" ANVIL_FEATURES="all" # 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 ;; "examples") vagga cargo-$TRAVIS_RUST_VERSION check --examples ;; "cargo-fmt") vagga cargo-$TRAVIS_RUST_VERSION fmt --all -- --check ;; "cargo-clippy") vagga cargo-$TRAVIS_RUST_VERSION clippy --all-features -- -D warnings ;; "anvil") 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 ;; *) 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: nightly condition: "$FEATURES = all" notifications: webhooks: urls: - "https://scalar.vector.im/api/neb/services/hooks/dHJhdmlzLWNpLyU0MGxldmFucyUzQXNhZmFyYWRlZy5uZXQvJTIxRkt4aGprSUNwakJWelZlQ2RGJTNBc2FmYXJhZGVnLm5ldA" on_success: change on_failure: always on_start: never