# disable sudo for container build.
sudo: false

# Enabling test on Linux and OS X
os:
  - linux
  - osx

# Use Build Matrix to do lint and build seperately
env:
  matrix:
    # code lint
    - TASK=lint
    # r package test
    - TASK=r_test
    # python package test
    - TASK=python_test
    - TASK=python_lightweight_test
    # java package test
    - TASK=java_test

os:
  - linux
  - osx

matrix:
  exclude:
    - os: osx
      env: TASK=lint
    - os: linux
      env: TASK=r_test
    - os: osx
      env: TASK=java_test

# dependent apt packages
addons:
  apt:
    packages:
      - doxygen
      - wget
      - libcurl4-openssl-dev
      - unzip
      - graphviz

before_install:
  - source dmlc-core/scripts/travis/travis_setup_env.sh
  - export PYTHONPATH=${PYTHONPATH}:${PWD}/python-package

install:
  - source tests/travis/setup.sh

script:
  - tests/travis/run_test.sh

cache:
  directories:
    - ${HOME}/.cache/usr
    - ${HOME}/.cache/pip

before_cache:
  - dmlc-core/scripts/travis/travis_before_cache.sh

after_failure:
  - tests/travis/travis_after_failure.sh

notifications:
  email:
    on_success: change
    on_failure: always

# disable sudo for container build.
sudo: false

# Enabling test on Linux and OS X
os:
  - linux
  - osx

# Use Build Matrix to do lint and build seperately
env:
  matrix:
    # code lint
    - TASK=lint
    # r package test
    - TASK=r_test
    # python package test
    - TASK=python_test
    - TASK=python_lightweight_test
    # java package test
    - TASK=java_test

os:
  - linux
  - osx

matrix:
  exclude:
    - os: osx
      env: TASK=lint
    - os: linux
      env: TASK=r_test
    - os: osx
      env: TASK=java_test
    - os: osx
      env: TASK=python_lightweight_test

# dependent apt packages
addons:
  apt:
    packages:
      - doxygen
      - wget
      - libcurl4-openssl-dev
      - unzip
      - graphviz

before_install:
  - source dmlc-core/scripts/travis/travis_setup_env.sh
  - export PYTHONPATH=${PYTHONPATH}:${PWD}/python-package

install:
  - source tests/travis/setup.sh

script:
  - tests/travis/run_test.sh

cache:
  directories:
    - ${HOME}/.cache/usr
    - ${HOME}/.cache/pip

before_cache:
  - dmlc-core/scripts/travis/travis_before_cache.sh

after_failure:
  - tests/travis/travis_after_failure.sh

notifications:
  email:
    on_success: change
    on_failure: always

Exclude osx for lightweight python test
Exclude osx for lightweight python test
