sudo: false
language: ruby

rvm:
  - ruby-head
  - 2.4.0
  - 2.3.1
  - 2.2.5
  - 2.1.10

env:
  global:
  - PYCALL_DEBUG_FIND_LIBPYTHON=1
  matrix:
  - PYTHON=python PYENV_VERSION=system
  - PYTHON=python3 PYENV_VERSION=3.5.3 LIBPYTHON=wrong_value
  - PYENV_VERSION=3.5.3 LIBPYTHON=/opt/python/3.5.3/lib/libpython3.5m.so

addons:
  apt:
    packages:
      - python3
      - python3-dev
      - python3-all
      - python3-all-dev

before_install:
  - gem update --system
  - gem update bundler

before_script:
  - bundle exec rake clobber compile
  - echo === python investigator.py ===
  - python lib/pycall/python/investigator.py
  - python3 lib/pycall/python/investigator.py
  - travis_retry pip install --user numpy
  - PYENV_VERSION=3.5.3 travis_retry pip3 install --user numpy

matrix:
  allow_failures:
  - env: PYTHON=python  # Ignore failed on python 2.7

sudo: false
language: ruby

rvm:
  - ruby-head
  - 2.4.2
  - 2.3.5
  - 2.2.8
  - 2.1.10

env:
  global:
  - PYCALL_DEBUG_FIND_LIBPYTHON=1
  matrix:
  - PYTHON=python PYENV_VERSION=system
  - PYTHON=python3 PYENV_VERSION=3.5.3 LIBPYTHON=wrong_value
  - PYENV_VERSION=3.5.3 LIBPYTHON=/opt/python/3.5.3/lib/libpython3.5m.so

addons:
  apt:
    packages:
      - python3
      - python3-dev
      - python3-all
      - python3-all-dev

before_install:
  - gem update --system
  - gem update bundler

before_script:
  - bundle exec rake clobber compile
  - echo === python investigator.py ===
  - python lib/pycall/python/investigator.py
  - python3 lib/pycall/python/investigator.py
  - travis_retry pip install --user numpy
  - PYENV_VERSION=3.5.3 travis_retry pip3 install --user numpy

matrix:
  allow_failures:
  - env: PYTHON=python  # Ignore failed on python 2.7

Test with latest 2.2, 2.3, 2.4 releases
Test with latest 2.2, 2.3, 2.4 releases