language: python
cache:
  directories:
  - "$HOME/.cache/pip"
  - "$HOME/.pyenv"
matrix:
  include:
  - name: 'Ubuntu: 3.8'
    os: linux
    python: 3.8
  - name: 'Ubuntu: 3.7'
    os: linux
    python: 3.7
  - name: 'Ubuntu: 3.6'
    os: linux
    python: 3.6
  - name: 'Ubuntu: 3.5'
    os: linux
    python: 3.5
  - name: 'Ubuntu: 2.7'
    os: linux
    python: 2.7
  - name: 'Ubuntu: PyPy 3.5'
    os: linux
    env: PYPY_URL=https://bitbucket.org/pypy/pypy/downloads/pypy3-v6.0.0-linux64.tar.bz2
  - name: 'Ubuntu: PyPy 2.7'
    os: linux
    env: PYPY_URL=https://bitbucket.org/pypy/pypy/downloads/pypy2-v6.0.0-linux64.tar.bz2
  - name: 'OSX: 3.7'
    os: osx
    language: generic
    env: PYENV_VERSION=3.7.4 BUILD_SDIST=true
    osx_image: xcode_9.4
  - name: 'OSX: 3.6'
    os: osx
    language: generic
    env: PYENV_VERSION=3.6.5
    osx_image: xcode_9.4
  - name: 'OSX: 2.7'
    os: osx
    language: generic
    env: PYENV_VERSION=2.7.15
    osx_image: xcode_9.4
install:
- "./.travis/install.sh"
script:
- "./.travis/run.sh"
deploy:
  provider: releases
  api_key:
    secure: ik/Btxv+NMOGjKuNnilYSeATYwL7sHy8nildzQcF+GMCFL8mDcerXRoC1jOF+ETsmSOAZ95NOEUGNiyvCApy4VgYvBvz7mJzdaob034+GXOStEIdBBvV8v9XB9XwQpJUUGvRMSF9WMUGmhyQ9PQEPOHfERgLkdlcY24djCJm/6A=
  file:
  - dist/*.whl
  - dist/*.tar.gz
  file_glob: true
  on:
    repo: xattr/xattr
    tags: true
  skip_cleanup: true
