dist: xenial
language: rust
os:
- linux
- osx
rust:
- stable
- 1.40.0
- beta
- nightly
env:
- GTK=3.14 FEATURES=
- GTK=3.24 FEATURES=v2_48
jobs:
exclude:
- os: osx
env: GTK=3.24 FEATURES=v2_48
addons:
apt:
packages:
- libgtk-3-dev
- libmount-dev
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew unlink python@2; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install gtk+3 cairo atk; fi
script:
- rustc --version
- if [ "$TRAVIS_RUST_VERSION" == "stable" ] && [ "$GTK" == "3.14" ]; then
rustup component add rustfmt;
make regen_check;
fi
- cargo doc --features "dox,embed-lgpl-docs"
- cargo test --features "$FEATURES,embed-lgpl-docs"
- cargo build --features "$FEATURES,purge-lgpl-docs" --jobs 1
- git diff -R --exit-code
- rustc --version
- mkdir .cargo
- echo 'paths = ["."]' > .cargo/config
- git clone -q --depth 50 -b master https://github.com/gtk-rs/examples _examples
- cd _examples
- ./build_travis.sh
- if [ "$TRAVIS_RUST_VERSION" == "stable" ] && [ "$GTK" == "3.14" ]; then
cd ..;
git clone https://github.com/gtk-rs/checker;
cd checker && cargo build --release;
cd .. && ./checker/target/release/checker .;
fi
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$TRAVIS_RUST_VERSION" == "stable"] && [ "$GTK" == "3.24" ]; then
rustup component add clippy;
cargo clippy --features "$FEATURES,embed-lgpl-docs" --tests -- -D warnings;
fi