language: rust
os:
    - linux
    - osx

matrix:
  allow_failures:
    - os: osx

install:
    - sudo add-apt-repository ppa:team-xbmc/ppa -y
    - sudo apt-get update -q
    - sudo apt-get install libsdl2-dev
script:
    - cargo build --verbose
    - cargo build --verbose --features sdl
    - cargo test --verbose
    - cargo test --verbose --features sdl
after_success: |
  [ $TRAVIS_BRANCH = master ] &&
  [ $TRAVIS_PULL_REQUEST = false ] &&
  cargo doc &&
  echo "<meta http-equiv=refresh content=0;url=`echo $TRAVIS_REPO_SLUG | cut -d '/' -f 2`/index.html>" > target/doc/index.html &&
  sudo pip install ghp-import &&
  ghp-import -n target/doc &&
  git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
language: rust
os:
    - linux
    - osx

matrix:
  allow_failures:
    - os: osx

install: |
  if [ "$TRAVIS_OS_NAME" = "linux" ]
  then
    sudo add-apt-repository ppa:team-xbmc/ppa -y &&
    sudo apt-get update -q &&
    sudo apt-get install libsdl2-dev
  elif [ "TRAVIS_OS_NAME" = "osx"]
  then
    sudo brew install rust
    sudo brew install sdl2
  fi
script:
    - cargo build --verbose
    - cargo build --verbose --features sdl
    - cargo test --verbose
    - cargo test --verbose --features sdl
after_success: |
  [ $TRAVIS_BRANCH = master ] &&
  [ $TRAVIS_PULL_REQUEST = false ] &&
  cargo doc &&
  echo "<meta http-equiv=refresh content=0;url=`echo $TRAVIS_REPO_SLUG | cut -d '/' -f 2`/index.html>" > target/doc/index.html &&
  sudo pip install ghp-import &&
  ghp-import -n target/doc &&
  git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
Use Homebrew to install Rust on OS X on Travis
Use Homebrew to install Rust on OS X on Travis
