|
| 1 | +language: python |
| 2 | + |
| 3 | +python: |
| 4 | + - 2.6 |
| 5 | + - 2.7 |
| 6 | + - 3.2 |
| 7 | + - 3.3 |
| 8 | + - 3.4 |
| 9 | + # This is just for "egg_info". All other builds are explicitly given in the matrix |
| 10 | +env: |
| 11 | + global: |
| 12 | + # The following versions are the 'default' for tests, unless |
| 13 | + # overidden underneath. They are defined here in order to save having |
| 14 | + # to repeat them for all configurations. |
| 15 | + - NUMPY_VERSION=1.8 |
| 16 | + - ASTROPY_VERSION=stable |
| 17 | + - CONDA_INSTALL='conda install -c astropy-ci-extras --yes' |
| 18 | + - PIP_INSTALL='pip install' |
| 19 | + matrix: |
| 20 | + - SETUP_CMD='egg_info' |
| 21 | + |
| 22 | +matrix: |
| 23 | + include: |
| 24 | + |
| 25 | + # Do a coverage test in Python 2. |
| 26 | + - python: 2.7 |
| 27 | + env: SETUP_CMD='test --coverage' |
| 28 | + |
| 29 | + # Check for sphinx doc build warnings - we do this first because it |
| 30 | + # may run for a long time |
| 31 | + - python: 2.7 |
| 32 | + env: SETUP_CMD='build_sphinx -w' |
| 33 | + |
| 34 | + # Try Astropy development version |
| 35 | + - python: 2.7 |
| 36 | + env: ASTROPY_VERSION=development SETUP_CMD='test' |
| 37 | + - python: 3.3 |
| 38 | + env: ASTROPY_VERSION=development SETUP_CMD='test' |
| 39 | + |
| 40 | + # Try all python versions with the latest numpy |
| 41 | + - python: 2.6 |
| 42 | + env: SETUP_CMD='test' |
| 43 | + - python: 2.7 |
| 44 | + env: SETUP_CMD='test' |
| 45 | + - python: 3.2 |
| 46 | + env: SETUP_CMD='test' |
| 47 | + - python: 3.3 |
| 48 | + env: SETUP_CMD='test' |
| 49 | + - python: 3.4 |
| 50 | + env: SETUP_CMD='test' |
| 51 | + |
| 52 | + # Try older numpy versions |
| 53 | + - python: 3.2 |
| 54 | + env: NUMPY_VERSION=1.6 SETUP_CMD='test' |
| 55 | + - python: 2.7 |
| 56 | + env: NUMPY_VERSION=1.7 SETUP_CMD='test' |
| 57 | + - python: 2.7 |
| 58 | + env: NUMPY_VERSION=1.6 SETUP_CMD='test' |
| 59 | + - python: 2.7 |
| 60 | + env: NUMPY_VERSION=1.5 SETUP_CMD='test' |
| 61 | + |
| 62 | +before_install: |
| 63 | + |
| 64 | + # Use utf8 encoding. Should be default, but this is insurance against |
| 65 | + # future changes |
| 66 | + - export PYTHONIOENCODING=UTF8 |
| 67 | + - wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh |
| 68 | + - chmod +x miniconda.sh |
| 69 | + - ./miniconda.sh -b |
| 70 | + - export PATH=/home/travis/miniconda/bin:$PATH |
| 71 | + - conda update --yes conda |
| 72 | + |
| 73 | + # DOCUMENTATION DEPENDENCIES |
| 74 | + - if [[ $SETUP_CMD == build_sphinx* ]]; then sudo apt-get install graphviz texlive-latex-extra dvipng; fi |
| 75 | + |
| 76 | +install: |
| 77 | + |
| 78 | + # CONDA |
| 79 | + - conda create --yes -n test -c astropy-ci-extras python=$TRAVIS_PYTHON_VERSION |
| 80 | + - source activate test |
| 81 | + |
| 82 | + # CORE DEPENDENCIES |
| 83 | + - if [[ $SETUP_CMD != egg_info ]]; then $CONDA_INSTALL numpy=$NUMPY_VERSION pytest pip Cython; fi |
| 84 | + - if [[ $SETUP_CMD != egg_info ]]; then $PIP_INSTALL pytest-xdist; fi |
| 85 | + |
| 86 | + # ASTROPY |
| 87 | + - if [[ $SETUP_CMD != egg_info ]] && [[ $ASTROPY_VERSION == development ]]; then $PIP_INSTALL git+http://github.com/astropy/astropy.git#egg=astropy; fi |
| 88 | + - if [[ $SETUP_CMD != egg_info ]] && [[ $ASTROPY_VERSION == stable ]]; then $CONDA_INSTALL numpy=$NUMPY_VERSION astropy; fi |
| 89 | + |
| 90 | + # OPTIONAL DEPENDENCIES |
| 91 | + # Here you can add any dependencies your package may have. You can use |
| 92 | + # conda for packages available through conda, or pip for any other |
| 93 | + # packages. You should leave the `numpy=$NUMPY_VERSION` in the `conda` |
| 94 | + # install since this ensures Numpy does not get automatically upgraded. |
| 95 | + # - if [[ $SETUP_CMD != egg_info ]]; then $CONDA_INSTALL numpy=$NUMPY_VERSION ... ; fi |
| 96 | + # - if [[ $SETUP_CMD != egg_info ]]; then $PIP_INSTALL ...; fi |
| 97 | + |
| 98 | + # DOCUMENTATION DEPENDENCIES |
| 99 | + # build_sphinx needs sphinx and matplotlib (for plot_directive). Note that |
| 100 | + # this matplotlib will *not* work with py 3.x, but our sphinx build is |
| 101 | + # currently 2.7, so that's fine |
| 102 | + - if [[ $SETUP_CMD == build_sphinx* ]]; then $CONDA_INSTALL numpy=$NUMPY_VERSION Sphinx matplotlib; fi |
| 103 | + |
| 104 | + # COVERAGE DEPENDENCIES |
| 105 | + - if [[ $SETUP_CMD == 'test --coverage' ]]; then $PIP_INSTALL coverage coveralls; fi |
| 106 | + |
| 107 | +script: |
| 108 | + - python setup.py $SETUP_CMD |
| 109 | + |
| 110 | +after_success: |
| 111 | + # If coveralls.io is set up for this package, uncomment the line |
| 112 | + # below and replace "packagename" with the name of your package. |
| 113 | + # The coveragerc file may be customized as needed for your package. |
| 114 | + # - if [[ $SETUP_CMD == 'test --coverage' ]]; then coveralls --rcfile='packagename/tests/coveragerc'; fi |
0 commit comments