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