language: python

matrix:
  include:
    - os: linux
      python: "3.6"

    - os: linux
      python: "3.5"

    - os: linux
      python: "2.7"

    - os: linux
      python: "pypy3"
      sudo: required

    - os: linux
      python: "pypy"
      sudo: required

    - os: osx
      language: generic
      env:
        - TRAVIS_PYTHON_VERSION=3.6
        - PYTHONVERSION=3.6.5

    - os: osx
      language: generic
      env:
        - TRAVIS_PYTHON_VERSION=3.5
        - PYTHONVERSION=3.5.5

    - os: osx
      language: generic
      env:
        - TRAVIS_PYTHON_VERSION=2.7
        - PYTHONVERSION=2.7.12

install:
    - ./ci/travis-install.sh
    - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then eval "$(pyenv init -)"; fi
    - pip install tox-travis cffi codecov
    - pip install cffi
    - pip install codecov

before_script:
    - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ulimit -c unlimited -S; fi

script:
    - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then eval "$(pyenv init -)"; fi
    - python setup.py install
    - tox

after_success:
    - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then eval "$(pyenv init -)"; fi
    - codecov -X gcov --required --file coverage.xml

language: python

matrix:
  include:
    - os: linux
      python: "3.6"

    - os: linux
      python: "3.5"

    - os: linux
      python: "2.7"

    - os: linux
      python: "pypy3"
      sudo: required

    - os: linux
      python: "pypy"
      sudo: required

    - os: osx
      language: generic
      env:
        - TRAVIS_PYTHON_VERSION=3.6
        - PYTHONVERSION=3.6.5

    - os: osx
      language: generic
      env:
        - TRAVIS_PYTHON_VERSION=3.5
        - PYTHONVERSION=3.5.5

    - os: osx
      language: generic
      env:
        - TRAVIS_PYTHON_VERSION=2.7
        - PYTHONVERSION=2.7.17

install:
    - ./ci/travis-install.sh
    - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then eval "$(pyenv init -)"; fi
    - pip install tox-travis cffi codecov
    - pip install cffi
    - pip install codecov

before_script:
    - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ulimit -c unlimited -S; fi

script:
    - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then eval "$(pyenv init -)"; fi
    - python setup.py install
    - tox

after_success:
    - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then eval "$(pyenv init -)"; fi
    - codecov -X gcov --required --file coverage.xml

Fix macOS Python 2.7 build in CI
Fix macOS Python 2.7 build in CI
