gfx_app 0.8.0

GFX example application framework
Documentation
sudo: false
language: rust
cache:
  cargo: true
  directories:
   - $HOME/deps
rust:
  - stable
  - nightly
os:
  - linux
  - osx
branches:
  except:
    - staging.tmp

notifications:
  webhooks:
    urls:
      - https://webhooks.gitter.im/e/7479b6691b7e5e40716a
    on_success: always
    on_failure: always
    on_start: false
before_install:
  - "export DISPLAY=:99.0"
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sh -e /etc/init.d/xvfb start; fi
  # Extract SDL2 .deb into a cached directory (see cache section above and LIBRARY_PATH exports below)
  # Will no longer be needed when Trusty build environment goes out of beta at Travis CI
  # (assuming it will have libsdl2-dev and Rust by then)
  # see https://docs.travis-ci.com/user/trusty-ci-environment/
  - 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:
      # install a newer cmake since at this time Travis only has version 2.8.7
      - george-edison55-precise-backports
    packages:
      - xdotool
      - cmake
      - cmake-data
      - libxxf86vm-dev
      - libxinerama-dev
      - libxinerama1
      - libxcursor-dev
      - libxcursor1
      - libglfw-dev
      - libosmesa6-dev
      - libxi-dev
      - libxrandr-dev
script:
  - export RUST_BACKTRACE=1
  - export CARGO_INCREMENTAL=0 # We are running out of storage with incremental builds
  - 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_window_sdl --features "sdl"
  - cargo test -p gfx_window_glfw --features "glfw"
  - cargo test -p gfx_device_gl
  - cargo test -p gfx_window_glutin $HEADLESS_FEATURE
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cargo test --all --features vulkan; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cargo test --all --features metal; fi