dist: xenial
language: rust
matrix:
include:
- os: linux
rust: nightly
env: GTK=3.14 FEATURES=
- os: linux
rust: nightly
env: GTK=3.24 FEATURES=v2_48
- os: linux
rust: beta
env: GTK=3.14 FEATURES=
- os: linux
rust: beta
env: GTK=3.24 FEATURES=v2_48
- os: linux
rust: 1.40.0
env: GTK=3.14 FEATURES=
- os: linux
rust: 1.40.0
env: GTK=3.24 FEATURES=v2_48
- os: linux
rust: stable
env: GTK=3.14 FEATURES=
- os: linux
rust: stable
env: GTK=3.24 FEATURES=v2_48
- os: osx
rust: nightly
env: GTK=3.14 FEATURES=
- os: osx
rust: beta
env: GTK=3.14 FEATURES=
- os: osx
rust: 1.40.0
env: GTK=3.14 FEATURES=
- os: osx
rust: stable
env: GTK=3.14 FEATURES=
- os: linux
rust: nightly
env: GTK=3.14 FEATURES= ARM=1 OTHER_TARGET="--target armv7-unknown-linux-gnueabihf"
- os: linux
rust: nightly
env: GTK=3.24 FEATURES=v2_48 ARM=1 OTHER_TARGET="--target armv7-unknown-linux-gnueabihf"
addons:
apt:
packages:
- libgtk-3-dev
- libmount-dev
- python3
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
- if [[ "$ARM" == "1" ]]; then rustup target add armv7-unknown-linux-gnueabihf; fi
script:
- if [ "$TRAVIS_RUST_VERSION" == "beta" ]; then
rustup component add clippy;
cargo clippy --release;
fi
- if [ "$TRAVIS_RUST_VERSION" == "stable" ] && ! [ "$ARM" == "1" ]; then
rustup component add rustfmt;
make regen_check;
fi
- if ! [ "$ARM" == "1" ]; then
cargo doc --features "dox";
fi
- if ! [ "$ARM" == "1" ]; then
cargo test --features "$FEATURES";
fi
- if [ "$ARM" == "1" ]; then
PKG_CONFIG_ALLOW_CROSS=1 cargo build --features "$FEATURES" $OTHER_TARGET;
fi
- rustc --version
- python3 clone_tests/clone_compilation_errors.py
- 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 --tests -- -D warnings;
fi