# http://travis-ci.org/mpi4py/mpi4py

language: python
python:
    - 2.6
    - 2.7
    - 3.2
    - 3.3
    - 3.4
    - 3.5
    - pypy
    - pypy3

env:
    - MPI=mpich3
    - MPI=mpich2
    - MPI=mpich1
    - MPI=openmpi

matrix:
  allow_failures:
    - python: pypy
    - python: pypy3
    - env: MPI=mpich1

branches:
  only:
    - master
    - maint

cache:
  apt: true

before_install:
    - sudo apt-get update -q
    - sh ./conf/travis/install-mpi.sh $MPI
    - pip install -q Cython
    - cython --version
install:
    - pip -vvv install .

before_script:
    - sudo hostname localhost
    - MPIEXEC='mpiexec'; PYTHON='python';
    - test $MPI == mpich1 && MPIEXEC='mpirun' || true
    - test $MPI == mpich1 && PYTHON=$(command -v $PYTHON) || true
script:
    - $MPIEXEC -n 1 $PYTHON $PWD/test/runtests.py -v -f --no-builddir --exclude=spawn
    - $MPIEXEC -n 3 $PYTHON $PWD/test/runtests.py -v -f --no-builddir --exclude=spawn
    - $MPIEXEC -n 5 $PYTHON $PWD/test/runtests.py -q -f --no-builddir --exclude=spawn

#notifications:
#  email: false

# http://travis-ci.org/mpi4py/mpi4py

language: python
python:
    - 2.6
    - 2.7
    - 3.2
    - 3.3
    - 3.4
    - 3.5
    - pypy
    - pypy3

env:
    - MPI=mpich3
    - MPI=mpich2
    - MPI=mpich1
    - MPI=openmpi

matrix:
  allow_failures:
    - python: pypy
    - python: pypy3
    - env: MPI=mpich1

branches:
  only:
    - master
    - maint

cache:
  apt: true

before_install:
    - sudo apt-get update -q
    - sh ./conf/travis/install-mpi.sh $MPI
    - pip install -q Cython
    - cython --version
install:
    - pip -vvv install .

before_script:
    - sudo hostname localhost
    - MPIEXEC='mpiexec'; PYTHON='python';
    - test $MPI == mpich1 && MPIEXEC='mpirun' || true
    - test $MPI == mpich1 && PYTHON=$(command -v $PYTHON) || true
script:
    - $MPIEXEC -n 1 $PYTHON $PWD/test/runtests.py -v -f --no-builddir --exclude=spawn
    - $MPIEXEC -n 3 $PYTHON $PWD/test/runtests.py -v -f --no-builddir --exclude=spawn

#notifications:
#  email: false

Remove test runs with 5 processes
Travis-CI: Remove test runs with 5 processes
