language: python

python:
    - 2.7
    - 3.5

env:
    - NUMPY_VERSION=1.11 OMP_NUM_THREADS=2

deploy:
    - provider: pypi
      distributions: sdist
      server: https://pypi.python.org/pypi
      user: "rainwoodman"
      password:
          secure: "cvta3oslqLseiE4bQxSk2CLeL6ZjdNyOQ660k7Y8vKXMWyjJikkG0MWEyHpDiYNXfAqcJZBnqruJ3+7XNOxQxahDSxXkiHruFASliUaEZPiLSvXZ9RrTCoz4epU6bwqHhENn2+JSyBbO4kzzp/4fttj+1bjTF4+4KDZ5UdagaccXke6cuf7T6VkuEGLqn5gfOteweQ/G0iwrqixd+w7HGjkwWSiGi3FTYjVY2B14sx0OiDx6vzLSo9IrRD7yh0DL7BWdcq+UpvnhcO2mtjYpIlgjULa7H3BqSQj2EhTQ0IaOfmK010n3bwL9NWjc6wZElEcbOLeIGx58tK0SknQiJgKvI59rnKLgVNjpSwT1V2wqD+CzHjRavR08OherMIjPg3PVJx8Q6nj3EeNJU9T6l6JFZFgFZBi+hve9NCh6gOQkIR7F2b7riIhu3oPIV+0I8EJ27hiegg1IYASyvxu1ubhuHb+Fsd5iKHE7vtxj0lkOOI6cs9fSPdnw7clPVytotvIdN+IRz/arotYf2t33zEPgEQ1j/J+ZC5mLLPsuPO7WUivABEVYxqAzZMpkakTxEtTDcvXwv8ij+lkWjQiU65Zwn/d1tBC62AxMBOW9BHAqBC7xct4CyUIHrTvv9Xt85/tvysVhBFZppEnfsfyIBM4gNhAEVy0RqAlkjpFXh0o="
      on:
        tags   : true
        condition : $TRAVIS_PYTHON_VERSION = "2.7"
before_install:
    - wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
    - chmod +x miniconda.sh
    - ./miniconda.sh -b -p $HOME/miniconda/
    - export PATH=$HOME/miniconda/bin:$PATH
    - conda update --yes conda

install:
    - conda create --yes -n test python=$TRAVIS_PYTHON_VERSION
    - source activate test
    - conda install --yes numpy=$NUMPY_VERSION nose mpi4py=2.0.0 cython pytest
    - python setup.py install

script: 
    - pip install runtests
    - python runtests.py --mpirun="mpirun -n 4"
    - bash check_tag.sh mpsort/version.py
