|
| 1 | +# Based on |
| 2 | +# http://conda.pydata.org/docs/travis.html |
| 3 | +# https://github.com/xray/xray/blob/master/.travis.yml |
| 4 | +# https://github.com/scipy/scipy/blob/master/.travis.yml |
| 5 | + |
1 | 6 | language: python |
2 | | -python: |
3 | | - - 2.7 |
4 | | - - 3.3 |
5 | | - - 3.4 |
6 | | - - 3.5 |
7 | | -env: |
8 | | - - PD_VERSION=0.13.1 |
9 | | - - PD_VERSION="0.14.*" |
10 | | - - PD_VERSION="0.15.*" |
11 | | - - PD_VERSION="0.16.*" |
12 | | - - PD_VERSION="0.17.*" |
| 7 | +sudo: false # if false, use TravisCI's container based build |
| 8 | + |
| 9 | +matrix: |
| 10 | + include: |
| 11 | + - python: 2.7 |
| 12 | + env: CONDA_ENV=py27-min |
| 13 | + - python: 2.7 |
| 14 | + env: CONDA_ENV=py27 |
| 15 | + - python: 3.4 |
| 16 | + env: CONDA_ENV=py34 |
| 17 | + addons: |
| 18 | + apt: |
| 19 | + packages: |
| 20 | + - libatlas-dev |
| 21 | + - libatlas-base-dev |
| 22 | + - liblapack-dev |
| 23 | + - gfortran |
| 24 | + - libgmp-dev |
| 25 | + - libmpfr-dev |
| 26 | + - python: 3.5 |
| 27 | + env: CONDA_ENV=py35 |
| 28 | + addons: |
| 29 | + apt: |
| 30 | + packages: |
| 31 | + - libatlas-dev |
| 32 | + - libatlas-base-dev |
| 33 | + - liblapack-dev |
| 34 | + - gfortran |
| 35 | + - libgmp-dev |
| 36 | + - libmpfr-dev |
| 37 | + |
| 38 | + |
| 39 | +# - ccache |
| 40 | +#cache: |
| 41 | +# directories: |
| 42 | +# - $HOME/.ccache |
13 | 43 |
|
14 | 44 | # setup miniconda for numpy, scipy, pandas |
15 | 45 | before_install: |
16 | 46 | - echo "before install" |
17 | | - - wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh |
18 | | - - chmod +x miniconda.sh |
19 | | - - ./miniconda.sh -b |
20 | | - - export PATH=/home/travis/miniconda/bin:$PATH |
21 | | - - conda update --yes conda |
22 | | - - sudo rm -rf /dev/shm |
23 | | - - sudo ln -s /run/shm /dev/shm |
24 | | - - date |
25 | | - - uname -a |
26 | | - - python -V |
| 47 | + - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then |
| 48 | + wget http://repo.continuum.io/miniconda/Miniconda-3.16.0-Linux-x86_64.sh -O miniconda.sh; |
| 49 | + else |
| 50 | + wget http://repo.continuum.io/miniconda/Miniconda3-3.16.0-Linux-x86_64.sh -O miniconda.sh; |
| 51 | + fi |
| 52 | + - bash miniconda.sh -b -p $HOME/miniconda |
| 53 | + - export PATH="$HOME/miniconda/bin:$PATH" |
| 54 | + - hash -r |
| 55 | + - conda config --set always_yes yes --set changeps1 no |
| 56 | + - conda update -q conda |
| 57 | + - conda info -a |
27 | 58 |
|
28 | 59 | install: |
29 | 60 | - echo "install" |
30 | | - - if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then conda install --yes python=$TRAVIS_PYTHON_VERSION numpy scipy pandas=$PD_VERSION nose pytz ephem; fi |
31 | | - - if [[ $TRAVIS_PYTHON_VERSION == '3.3' || $TRAVIS_PYTHON_VERSION == '3.4' ]]; then conda install --yes python=$TRAVIS_PYTHON_VERSION numpy=1.8 scipy=0.14 pandas nose pytz ephem; conda install --yes pandas=$PD_VERSION --no-deps; fi |
32 | | - - test $PD_VERSION != 0.13.1 && conda install --yes "numba>=0.17" || echo "Not installing numba" |
33 | | - - conda install --yes coverage |
34 | | - - pip install coveralls |
| 61 | + - conda env create --file ci/requirements-$CONDA_ENV.yml |
| 62 | + - source activate test_env # all envs are named test_env in the yml files |
| 63 | + - conda list |
| 64 | + - echo $PATH |
| 65 | + - ls -l /home/travis/miniconda/envs/test_env/lib |
| 66 | + #- pip install . # use pip to automatically install anything not in the yml files (i.e. numpy/scipy/pandas for py3*) |
| 67 | + - pip install scipy # won't do anything if already installed |
35 | 68 | - python setup.py install |
36 | | - # for nosetests to actually work since it alters the path |
37 | | - - python setup.py build_ext --inplace |
38 | 69 |
|
39 | 70 | script: |
40 | 71 | - nosetests -v --with-coverage --cover-package=pvlib pvlib |
|
0 commit comments