dist: trusty
sudo: required
language: python

before_install:
  - sudo add-apt-repository -y ppa:mc3man/trusty-media
  - sudo apt-get update
  - sudo apt-get install -y ffmpeg

install:
  - pip install opencv-python pyyaml codecov flake8

cache:
  pip: true

env:
  global:
    - COLUMNS=80

python:
  - "2.7"
  - "3.4"
  - "3.5"
  - "3.6"

before_script: flake8

script: coverage run --source=mmcv setup.py test

after_success: codecov

deploy:
  provider: pypi
  user: kchen
  password:
    secure: "roexTpCf6tzmOY52XjXiFu31IEa+WPT/ETmDoOJgurN0fw2Dzh5YZfeh80gMF7CfaZdWNJB7vJhPO242wnkYkbOkEM/MITnnDVM3dBav9LpOslqP8UhmIMTk9huK7uI/DYAOmoDuZ7b2xoe7EolpGY4Ea+OO1absM2x7imKY1F2FPfLYOIlJcqfWYtmuxNJjSCUkJaLUDllED6n6DS2+/hBWZUz9WYlmgmQDff2lQjN9vy442zlY8W83kqtzNom7FvsP2aksHz2DRSwulxzRmQpVcvIk6R/D1Kdtt018J+RCadIg7DEztcmVewYuIe4I/4mqh/CzDu636jrxN6KaYnbsxTuT7wPAh4hy12wr9e4J5sowCIgw/DawYooJQ+8XndUn8MOxIq5ZGWrVeinbYeW6xbhxIPf9PVYTfQ3P4cQDrPvotCYJrzKxZUVexyO9CSaqNam9gU8IrR+yrJUdfdyzf/AHeHKLtHufSfVfnVUbB27590jpYgUT9YdoVU6A6tN66RhNOjD0UFEJxzSOgsMaFSNbmDlZZa0SsJizRqUJ4K7XXAlomTxeUkp9HTXdIu5DGwNl0oS/QdrWJvWN4I/6BhFX3gd1f4XupgHHwvhLP1PMeUz+ahlClUVlUqGvQcfxLI7+Pcj+hmETWq5tpZOqPATg8ZwYt4CwwOnzW5c="
  on:
    branch: master
    tags: true
    python: "3.6"
    distributions: sdist bdist_wheel
    skip_cleanup: true
    skip_upload_docs: true