language: java

os:
  - linux

jdk:
  - oraclejdk8

addons:
  apt:
    packages:
      - autoconf
      - javahelp2
      - tidy
      - liblcms2-dev
      - libtiff4-dev

before_install:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget --no-check-certificate https://www.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.tar.gz; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tar xf apache-ant-1.10.5-bin.tar.gz; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PATH=`pwd`/apache-ant-1.10.5/bin:$PATH; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install autoconf clang-omp libtiff little-cms2 pkg-config; fi
  - echo $(ant -version)

script:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ant -f linux/build.xml; fi


language: java

matrix:
  allow_failures:
    - os: osx

os:
  - linux
  - osx

jdk:
  - oraclejdk8

addons:
  apt:
    packages:
      - autoconf
      - javahelp2
      - tidy
      - liblcms2-dev
      - libtiff4-dev

before_install:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget --no-check-certificate https://www.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.tar.gz; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tar xf apache-ant-1.10.5-bin.tar.gz; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PATH=`pwd`/apache-ant-1.10.5/bin:$PATH; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ant little-cms2 llvm; fi
  - echo $(ant -version)

script:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ant -f linux/build.xml; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ant -f macosx/build.xml; fi


Enable osx build on Travis-CI
Enable osx build on Travis-CI

