language: ruby

os:
  - linux
  #- osx

env:
  # Currently successful release
  - IMAGEMAGICK_VERSION=6.6.9-10
  # Ubuntu's current stable release
  - IMAGEMAGICK_VERSION=6.7.7-10
  # Latest 6.7 release
  - IMAGEMAGICK_VERSION=6.7.9-10
  # Latest 6.8 release
  - IMAGEMAGICK_VERSION=6.8.9-6
  # Try with HDRI support, we don't mind if this fails currently.
  - IMAGEMAGICK_VERSION=6.8.9-6 CONFIGURE_OPTIONS=--enable-hdri

before_install:
  - source before_install_$TRAVIS_OS_NAME.sh

rvm:
  - 1.9
  - 2.0
  - 2.1

matrix:
  exclude:
#    - rvm: 1.9
#      env: IMAGEMAGICK_VERSION=6.7.7-10
    - rvm: 1.9
      env: IMAGEMAGICK_VERSION=6.7.9-10
#    - rvm: 1.9
#      env: IMAGEMAGICK_VERSION=6.8.9-6
    - rvm: 1.9
      env: IMAGEMAGICK_VERSION=6.8.9-6 CONFIGURE_OPTIONS=--enable-hdri
    - rvm: 2.0
      env: IMAGEMAGICK_VERSION=6.7.7-10
    - rvm: 2.0
      env: IMAGEMAGICK_VERSION=6.7.9-10
    - rvm: 2.0
      env: IMAGEMAGICK_VERSION=6.8.9-6
    - rvm: 2.0
      env: IMAGEMAGICK_VERSION=6.8.9-6 CONFIGURE_OPTIONS=--enable-hdri
  allow_failures:
    - env: IMAGEMAGICK_VERSION=6.7.7-10
    - env: IMAGEMAGICK_VERSION=6.7.9-10
    #- env: IMAGEMAGICK_VERSION=6.8.9-6
    - env: IMAGEMAGICK_VERSION=6.8.9-6 CONFIGURE_OPTIONS=--enable-hdri

notifications:
  webhooks:
    urls:
      - https://webhooks.gitter.im/e/a98c1112f5d60f97a532
    on_success: change  # options: [always|never|change] default: always
    on_failure: always  # options: [always|never|change] default: always
    on_start: false     # default: false
