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

language: python
python:
    - 2.6
    - 2.7
    - 3.2
    - 3.3
#   - pypy

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

branches:
  only:
    - master

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

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

#notifications:
#  email: false

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

language: python
python:
    - 2.6
    - 2.7
    - 3.2
    - 3.3
#   - pypy

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

matrix:
  allow_failures:
    - env: MPI=mpich1

branches:
  only:
    - master

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

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

#notifications:
#  email: false

Allow failures with legacy MPICH1
Travis-C: Allow failures with legacy MPICH1
