Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Commit

Permalink
Opting in ci-helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
bsipocz committed Jul 3, 2016
1 parent 344a548 commit 1c1b91e
Showing 1 changed file with 38 additions and 72 deletions.
110 changes: 38 additions & 72 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
language: python

python:
- 2.7
- 3.4
- 3.5

# Setting sudo to false opts in to Travis-CI container-based builds.
sudo: false

Expand All @@ -12,105 +17,66 @@ addons:
- texlive-latex-extra
- dvipng

python:
- 2.6
- 2.7
- 3.3
- 3.4
# This is just for "egg_info". All other builds are explicitly given in the matrix
env:
global:

# The following versions are the 'default' for tests, unless
# overidden underneath. They are defined here in order to save having
# overridden underneath. They are defined here in order to save having
# to repeat them for all configurations.
- NUMPY_VERSION=1.9
- NUMPY_VERSION=stable
- ASTROPY_VERSION=stable
- CONDA_INSTALL='conda install -c astropy-ci-extras --yes'
- PIP_INSTALL='pip install'
- SETUP_CMD='test'
- CONDA_DEPENDENCIES=''
- PIP_DEPENDENCIES=''

matrix:
- SETUP_CMD='egg_info'
- SETUP_CMD='test'

matrix:
include:

# Do a coverage test in Python 2.
- python: 2.7
env: SETUP_CMD='test --coverage'

# Check for sphinx doc build warnings - we do this first because it
# may run for a long time
- python: 2.7
env: SETUP_CMD='build_sphinx -w'

# Try Astropy development version
- python: 2.7
env: ASTROPY_VERSION=development SETUP_CMD='test'
- python: 3.3
env: ASTROPY_VERSION=development SETUP_CMD='test'

# Try all python versions with the latest numpy
- python: 2.6
env: SETUP_CMD='test'
env: ASTROPY_VERSION=development SETUP_CMD='test --coverage'
- python: 3.5
env: ASTROPY_VERSION=development
- python: 2.7
env: SETUP_CMD='test'
env: ASTROPY_VERSION=lts
- python: 3.5
env: ASTROPY_VERSION=lts

# Python 3.3 doesn't have numpy 1.10 in conda, they can be put
# back into the main matrix once the numpy build is available in the
# astropy-ci-extras channel (or in the one provided in the
# CONDA_CHANNELS environmental variable).
- python: 3.3
env: SETUP_CMD='egg_info'
- python: 3.3
env: SETUP_CMD='test'
- python: 3.4
env: SETUP_CMD='test'
env: SETUP_CMD='test' NUMPY_VERSION=1.9

# Try older numpy versions
- python: 2.7
env: NUMPY_VERSION=1.8 SETUP_CMD='test'
env: NUMPY_VERSION=1.10
- python: 2.7
env: NUMPY_VERSION=1.7 SETUP_CMD='test'
env: NUMPY_VERSION=1.9
- python: 2.7
env: NUMPY_VERSION=1.6 SETUP_CMD='test'

before_install:

# Use utf8 encoding. Should be default, but this is insurance against
# future changes
- export PYTHONIOENCODING=UTF8
env: NUMPY_VERSION=1.8
- python: 2.7
env: NUMPY_VERSION=1.7

# http://conda.pydata.org/docs/travis.html#the-travis-yml-file
- wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
- 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
# Try numpy pre-release
- python: 3.5
env: NUMPY_VERSION=prerelease

install:

# CONDA
- conda create --yes -n test -c astropy-ci-extras python=$TRAVIS_PYTHON_VERSION
- source activate test

# CORE DEPENDENCIES
- if [[ $SETUP_CMD != egg_info ]]; then $CONDA_INSTALL numpy=$NUMPY_VERSION pytest pip Cython jinja2; fi
- if [[ $SETUP_CMD != egg_info ]]; then $PIP_INSTALL pytest-xdist; fi

# ASTROPY
- if [[ $SETUP_CMD != egg_info ]] && [[ $ASTROPY_VERSION == development ]]; then $PIP_INSTALL git+http://github.com/astropy/astropy.git#egg=astropy; fi
- if [[ $SETUP_CMD != egg_info ]] && [[ $ASTROPY_VERSION == stable ]]; then $CONDA_INSTALL numpy=$NUMPY_VERSION astropy; fi

# OPTIONAL DEPENDENCIES
# Here you can add any dependencies your package may have. You can use
# conda for packages available through conda, or pip for any other
# packages. You should leave the `numpy=$NUMPY_VERSION` in the `conda`
# install since this ensures Numpy does not get automatically upgraded.
# - if [[ $SETUP_CMD != egg_info ]]; then $CONDA_INSTALL numpy=$NUMPY_VERSION ... ; fi
# - if [[ $SETUP_CMD != egg_info ]]; then $PIP_INSTALL ...; fi

# DOCUMENTATION DEPENDENCIES
# build_sphinx needs sphinx and matplotlib (for plot_directive). Note that
# this matplotlib will *not* work with py 3.x, but our sphinx build is
# currently 2.7, so that's fine
- if [[ $SETUP_CMD == build_sphinx* ]]; then $CONDA_INSTALL numpy=$NUMPY_VERSION Sphinx matplotlib; fi

# COVERAGE DEPENDENCIES
- if [[ $SETUP_CMD == 'test --coverage' ]]; then $PIP_INSTALL coverage coveralls; fi
# Installing python dependencies with conda
- git clone git://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda_$TRAVIS_OS_NAME.sh

# Build Montage from source
- wget http://montage.ipac.caltech.edu/download/Montage_v3.3.tar.gz
Expand Down

0 comments on commit 1c1b91e

Please sign in to comment.