sudo: false
language: rust
cache:
cargo: true
directories:
- $HOME/deps
matrix:
include:
- os: linux
rust: stable
compiler: gcc
- os: linux
rust: nightly
compiler: gcc
- env: MACOSX_DEPLOYMENT_TARGET=10.9
os: osx
rust: stable
osx_image: xcode9
compiler: clang
- env: MACOSX_DEPLOYMENT_TARGET=10.9
os: osx
rust: nightly
osx_image: xcode9
compiler: clang
- env: TARGET=aarch64-apple-ios
os: osx
osx_image: xcode9
rust: nightly
- os: windows
rust: stable
branches:
except:
- staging.tmp
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/7479b6691b7e5e40716a
on_success: always
on_failure: always
on_start: false
before_install:
- if [[ $TRAVIS_RUST_VERSION == "nightly" && $TRAVIS_BRANCH == "staging" ]]; then exit; fi
- "export DISPLAY=:99.0"
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then sh -e /etc/init.d/xvfb start; fi
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then scripts/travis-install-sdl2.sh ; fi
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then brew update; fi
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then brew install sdl2; fi
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then brew outdated cmake || brew upgrade cmake; fi
addons:
apt:
sources:
- george-edison55-precise-backports
- llvm-toolchain-precise-3.8
- ubuntu-toolchain-r-test
packages:
- xdotool
- cmake
- cmake-data
- libxxf86vm-dev
- libxinerama-dev
- libxinerama1
- libxcursor-dev
- libxcursor1
- libglfw-dev
- libosmesa6-dev
- libxi-dev
- libxrandr-dev
- g++-5
- gcc
script:
- if [[ $TRAVIS_RUST_VERSION == "nightly" && $TRAVIS_BRANCH == "staging" ]]; then exit; fi
- export PATH=$PATH:$HOME/deps/bin
- export RUST_BACKTRACE=1
- export CARGO_INCREMENTAL=0 - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PATH=$PATH:$HOME/deps/bin ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export LIBRARY_PATH=$HOME/deps/usr/lib/x86_64-linux-gnu ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export LD_LIBRARY_PATH=$LIBRARY_PATH ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cargo build --features vulkan; else cargo build; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cargo build --features metal; else cargo build; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then HEADLESS_FEATURE="--features headless"; fi
- cargo test --all
- cargo test -p gfx -p gfx_core --features "mint serialize"
- cargo test -p gfx_device_gl
- cargo test -p gfx_window_glutin $HEADLESS_FEATURE
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cargo test -p gfx_window_sdl --features "sdl"; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cargo test -p gfx_window_glfw --features "glfw"; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cargo test --all --features vulkan; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cargo test --all --features metal; fi