# note dist: 'trusty' does not work here
dist: xenial

language: python

# cache miniconda installer and similar files
cache:
  directories:
  - /home/travis/download

# This matrix tests that the code works on Python 3.5, 3.6, and passes lint.
matrix:
  fast_finish: true
  include:
    - env: PYTHON_VERSION="3.7"
    - env: PYTHON_VERSION="3.6"
    # TODO add this back in when there is a pytorch 1.2 for python 3.5
    - env: PYTHON_VERSION="3.5" RUN_FLAKE8="true" SKIP_TESTS="true"
    - env: PYTHON_VERSION="2.7"

addons:
  apt:
    packages:
      sox
      libsox-dev
      libsox-fmt-all

notifications:
  email: false

install: source build_tools/travis/install.sh
script: bash build_tools/travis/test_script.sh
