-
-
Notifications
You must be signed in to change notification settings - Fork 573
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1270 from sunpy/conda_for_all_the_ci
Major CI improvements
- Loading branch information
Showing
11 changed files
with
156 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,78 @@ | ||
language: python | ||
# We use C because conda manages our Python vesion | ||
# and running on OS/X dosen't work with Python. | ||
language: c | ||
|
||
python: | ||
- 2.7 | ||
os: | ||
- linux | ||
- osx | ||
|
||
virtualenv: | ||
system_site_packages: false | ||
# These are currently not used, but we want to cache the packages dir | ||
# to reduce the number of packages to download. | ||
cache: | ||
directories: | ||
$HOME/miniconda/pkgs | ||
/Users/travis/miniconda3/pkgs | ||
|
||
# Configure the build environment. Global varibles are defined for all | ||
# configurations. Each configuration in the matrix is run for each python version | ||
# above. | ||
# Configure the build environment. Global varibles are defined for all configurations. | ||
env: | ||
global: | ||
- PIP_WHEEL_COMMAND="--find-links http://sunpy.cadair.com/wheelhouse/index.html --use-wheel --upgrade --trusted-host sunpy.cadair.com" | ||
- TEST_MODE='offline' | ||
# Modify these to represent the newest versions | ||
- LATEST_NUMPY=1.9.1 | ||
- LATEST_PANDAS=0.15.2 | ||
# Fixed global vars | ||
- PYTHON_VERSION=2.7 | ||
- TEST_MODE='offline' | ||
- NUMPY_VERSION=$LATEST_NUMPY | ||
- PANDAS_VERSION=$LATEST_PANDAS | ||
|
||
matrix: | ||
include: | ||
- python: 2.7 | ||
env: NUMPY_VERSION=1.8.1 | ||
- python: 2.7 | ||
env: PANDAS_VERSION=0.14.1 | ||
- python: 2.7 | ||
env: TEST_MODE='astropy-dev' | ||
- python: 2.7 | ||
env: TEST_MODE='sphinx' | ||
- python: 2.7 | ||
env: TEST_MODE='online' | ||
include: | ||
- os: linux | ||
env: NUMPY_VERSION=1.8.1 | ||
- os: linux | ||
env: PANDAS_VERSION=0.14.1 | ||
- os: linux | ||
env: TEST_MODE='astropy-dev' | ||
- os: linux | ||
env: TEST_MODE='sphinx' | ||
- os: linux | ||
env: TEST_MODE='online' | ||
|
||
# If the online build fails, we don't want it to report the whole build broken. | ||
allow_failures: | ||
- env: TEST_MODE='online' | ||
|
||
# Install miniconda | ||
before_install: | ||
# Make sure the system is upto date and install scipy requirements | ||
- sudo apt-get update -qq | ||
- sudo apt-get install -qq libatlas-dev liblapack-dev gfortran | ||
- if [[ $TEST_MODE == 'sphinx' ]]; then sudo apt-get install graphviz texlive-latex-extra dvipng; fi | ||
# Make sure pip is at the latest version (>1.4 for wheels) | ||
- pip install pip --upgrade | ||
# Wheels also need a recent version of setuptools | ||
- pip install setuptools>=0.8 --upgrade | ||
# Install more upto date openjpeg library. | ||
- wget http://openjpeg.googlecode.com/files/openjpeg-1.5.0-Linux-x86_64.tar.gz | ||
- sudo tar -xvf openjpeg-1.5.0-Linux-x86_64.tar.gz --strip-components=1 -C / | ||
# Install coveralls | ||
- pip install $PIP_WHEEL_COMMAND coveralls pytest-cov pytest-xdist | ||
- source continuous-integration/travis/install_$TRAVIS_OS_NAME.sh | ||
|
||
# Install all SunPy dependacies using wheels. | ||
install: | ||
# Install Numpy first so we force the version we are using | ||
- pip install $PIP_WHEEL_COMMAND numpy==$NUMPY_VERSION | ||
- pip install $PIP_WHEEL_COMMAND matplotlib | ||
- pip install $PIP_WHEEL_COMMAND -vvv scipy | ||
- pip install $PIP_WHEEL_COMMAND pandas==$PANDAS_VERSION | ||
- pip install $PIP_WHEEL_COMMAND suds-jurko beautifulsoup4 requests | ||
- pip install $PIP_WHEEL_COMMAND pytest pytest-xdist | ||
- pip install $PIP_WHEEL_COMMAND glymur | ||
- pip install $PIP_WHEEL_COMMAND cython jinja2 | ||
- pip install $PIP_WHEEL_COMMAND scikit-image | ||
- pip install $PIP_WHEEL_COMMAND sqlalchemy | ||
- if [[ $TEST_MODE != 'astropy-dev' ]]; then pip install $PIP_WHEEL_COMMAND astropy>=0.4.0; fi | ||
- if [[ $TEST_MODE == 'astropy-dev' ]]; then pip install git+git://github.com/astropy/astropy.git; fi | ||
# Install sphinx if needed | ||
- if [[ $TEST_MODE == 'sphinx' ]]; then pip install $PIP_WHEEL_COMMAND sphinx==1.2.2; fi | ||
# Add a conda env and set up extra binstar channels | ||
- conda create --yes -n test python=$PYTHON_VERSION | ||
- conda config --add channels sunpy --add channels astropy-ci-extras --add channels https://conda.binstar.org/sunpy/channel/citesting | ||
- source activate test | ||
# Install default dependancies | ||
- conda install --yes pip | ||
- conda install -q --yes numpy=$NUMPY_VERSION pandas=$PANDAS_VERSION | ||
- conda install -q --yes scipy matplotlib requests beautiful-soup sqlalchemy scikit-image pytest jinja2 cython | ||
- pip install pytest-cov coverage coveralls | ||
# Install sunpy conda packages | ||
- conda install -q --yes suds-jurko glymur | ||
# Install the correct version of astropy | ||
- if [[ $TEST_MODE != 'astropy-dev' ]]; then conda install -q --yes astropy>=0.4.0; fi | ||
- if [[ $TEST_MODE == 'astropy-dev' ]]; then pip install git+git://github.com/astropy/astropy.git; fi | ||
# Install sphinx if needed | ||
- if [[ $TEST_MODE == 'sphinx' ]]; then conda install -q --yes sphinx; fi | ||
|
||
# Install SunPy and run tests. | ||
script: | ||
- if [[ $TEST_MODE == 'sphinx' ]]; then python setup.py build_sphinx -w; fi | ||
- if [[ $TEST_MODE == 'offline' || $TEST_MODE == 'astropy-dev' ]]; then python setup.py test --coverage --cov-report=html --offline-only; fi | ||
- if [[ $TEST_MODE == 'online' ]]; then python setup.py test --coverage --cov-report=term-missing --parallel=8; fi | ||
|
||
after_success: | ||
- if [[ $TEST_MODE == 'online' ]]; then coveralls; fi | ||
- if [[ $TEST_MODE == 'sphinx' ]]; then python setup.py build_sphinx -w; fi | ||
- if [[ $TEST_MODE == 'offline' || $TEST_MODE == 'astropy-dev' ]]; then python setup.py test --offline-only; fi | ||
- if [[ $TEST_MODE == 'online' ]]; then python setup.py test --coverage --cov-report=html; fi | ||
- if [[ $TEST_MODE == 'online' ]]; then coveralls --rcfile='./sunpy/tests/coveragerc'; fi | ||
|
||
# Notify the IRC channel of build status | ||
notifications: | ||
irc: "chat.freenode.net#SunPy" | ||
webhooks: | ||
urls: | ||
- https://webhooks.gitter.im/e/d1bf84e1bc1293e4dbc5 | ||
on_success: always # options: [always|never|change] default: always | ||
on_failure: always # options: [always|never|change] default: always | ||
on_start: false # default: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
:: To build extensions for 64 bit Python 3, we need to configure environment | ||
:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of: | ||
:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1) | ||
:: | ||
:: To build extensions for 64 bit Python 2, we need to configure environment | ||
:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of: | ||
:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0) | ||
:: | ||
:: 32 bit builds do not require specific environment configurations. | ||
:: | ||
:: Note: this script needs to be run with the /E:ON and /V:ON flags for the | ||
:: cmd interpreter, at least for (SDK v7.0) | ||
:: | ||
:: More details at: | ||
:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows | ||
:: http://stackoverflow.com/a/13751649/163740 | ||
:: | ||
:: Author: Olivier Grisel | ||
:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/ | ||
@ECHO OFF | ||
|
||
SET COMMAND_TO_RUN=%* | ||
SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows | ||
|
||
SET MAJOR_PYTHON_VERSION="%PYTHON_VERSION:~0,1%" | ||
IF %MAJOR_PYTHON_VERSION% == "2" ( | ||
SET WINDOWS_SDK_VERSION="v7.0" | ||
) ELSE IF %MAJOR_PYTHON_VERSION% == "3" ( | ||
SET WINDOWS_SDK_VERSION="v7.1" | ||
) ELSE ( | ||
ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%" | ||
EXIT 1 | ||
) | ||
|
||
IF "%PYTHON_ARCH%"=="64" ( | ||
ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture | ||
SET DISTUTILS_USE_SDK=1 | ||
SET MSSdk=1 | ||
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION% | ||
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release | ||
ECHO Executing: %COMMAND_TO_RUN% | ||
call %COMMAND_TO_RUN% || EXIT 1 | ||
) ELSE ( | ||
ECHO Using default MSVC build environment for 32 bit architecture | ||
ECHO Executing: %COMMAND_TO_RUN% | ||
call %COMMAND_TO_RUN% || EXIT 1 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
############################################################################### | ||
# Install Linux Packages | ||
############################################################################### | ||
sudo apt-get upgrade | ||
sudo apt-get install -qq libatlas-dev liblapack-dev gfortran | ||
if [[ $TEST_MODE == 'sphinx' ]]; then sudo apt-get install graphviz texlive-latex-extra dvipng; fi | ||
|
||
# Install more upto date openjpeg library. | ||
wget http://openjpeg.googlecode.com/files/openjpeg-1.5.0-Linux-x86_64.tar.gz | ||
sudo tar -xvf openjpeg-1.5.0-Linux-x86_64.tar.gz --strip-components=1 -C / | ||
|
||
############################################################################### | ||
# Install miniconda | ||
############################################################################### | ||
MINICONDA_URL="http://repo.continuum.io/miniconda" | ||
MINICONDA_FILE="Miniconda-3.5.5-Linux-x86_64.sh" | ||
wget "${MINICONDA_URL}/${MINICONDA_FILE}" | ||
bash $MINICONDA_FILE -b | ||
|
||
export PATH=$HOME/miniconda/bin:$PATH | ||
|
||
conda update --yes conda | ||
conda install -q --yes binstar conda-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
MINICONDA_URL="http://repo.continuum.io/miniconda" | ||
MINICONDA_FILE="Miniconda3-3.7.3-MacOSX-x86_64.sh" | ||
wget "${MINICONDA_URL}/${MINICONDA_FILE}" | ||
bash $MINICONDA_FILE -b | ||
|
||
export PATH=/Users/travis/miniconda3/bin:$PATH | ||
|
||
conda update --yes conda | ||
conda install -q --yes binstar conda-build |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters