language: ruby

os:
  - linux

sudo: required

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-10
  # Try with HDRI support, we don't mind if this fails currently.
  - IMAGEMAGICK_VERSION=6.8.9-10 CONFIGURE_OPTIONS=--enable-hdri
  # Latest release
  - IMAGEMAGICK_VERSION=latest

before_install:
  - source before_install_$TRAVIS_OS_NAME.sh

rvm:
  - 1.8
  - 1.9
  - 2.0
  - 2.1
  - 2.2

matrix:
  exclude:
    - rvm: 1.8
      env: IMAGEMAGICK_VERSION=6.7.9-10
    - rvm: 1.8
      env: IMAGEMAGICK_VERSION=6.7.7-10
    - rvm: 1.8
      env: IMAGEMAGICK_VERSION=6.8.9-10 CONFIGURE_OPTIONS=--enable-hdri
    - rvm: 1.8
      env: IMAGEMAGICK_VERSION=6.8.9-10
    - rvm: 1.9
      env: IMAGEMAGICK_VERSION=6.7.9-10
    - rvm: 1.9
      env: IMAGEMAGICK_VERSION=6.8.9-10 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-10
    - rvm: 2.0
      env: IMAGEMAGICK_VERSION=6.8.9-10 CONFIGURE_OPTIONS=--enable-hdri
  allow_failures:
    - env: IMAGEMAGICK_VERSION=6.7.7-10
    - env: IMAGEMAGICK_VERSION=6.7.9-10
      rvm: 2.1
    - env: IMAGEMAGICK_VERSION=6.7.9-10
      rvm: 2.2
    - env: IMAGEMAGICK_VERSION=6.8.9-10
      rvm: 2.1
    - env: IMAGEMAGICK_VERSION=6.8.9-10 CONFIGURE_OPTIONS=--enable-hdri
      rvm: 2.1
    - env: IMAGEMAGICK_VERSION=latest

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
