Run tests on Travis with both Python 2.7 and 3.4, using miniconda to get

packages.
This commit is contained in:
Paul Romano 2015-04-30 10:50:19 +07:00
parent 1cefad6a45
commit 8cc0b91d24

View file

@ -1,16 +1,35 @@
language: python
python:
- "2.7"
- "3.4"
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq -y python-numpy
- sudo apt-get install -qq -y python-scipy
- sudo apt-get install -qq -y python-h5py
- sudo apt-get install -qq -y gfortran
- sudo apt-get install -qq -y g++
# ============== Handle Python third-party packages ==============
- sudo apt-get update
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION numpy scipy h5py
- source activate test-environment
# ============== Install GCC, MPICH, HDF5, PHDF5 ==============
- sudo apt-get install -qq -y gfortran g++
- ./tests/travis_install.sh
- export FC=gfortran
- export MPI_DIR=$PWD/mpich_install
- export PHDF5_DIR=$PWD/phdf5_install
- export HDF5_DIR=$PWD/hdf5_install
install: true
before_script:
- cd data
- git clone --branch=master git://github.com/bhermanmit/nndc_xs nndc_xs