Use variables to control Travis build matrix

This commit is contained in:
Stefan van der Walt
2016-02-12 11:10:43 -08:00
parent 1134864317
commit f8e03d475e
3 changed files with 17 additions and 14 deletions
+3 -1
View File
@@ -38,11 +38,13 @@ notifications:
matrix:
include:
- python: 2.6
env: WITH_PYAMG=1 NO_SPHINX=1
- python: 2.7
env: PIP_FLAGS="--pre"
- python: 2.7
env: MINIMUM_REQUIREMENTS=1
env: WITH_PYAMG=1 MINIMUM_REQUIREMENTS=1 WITH_QT=1
- python: 3.4
env: OPTIONAL_DEPS=1 WITH_PYSIDE=1
- python: 3.5
env: PIP_FLAGS="--pre"
+1 -2
View File
@@ -39,8 +39,7 @@ if [[ $TRAVIS_PYTHON_VERSION == 2.6* ]]; then
sed -i 's/matplotlib.*/matplotlib==1.4.3/g' requirements.txt
fi
# test minimum requirements on 2.7
if [[ $TRAVIS_PYTHON_VERSION == 2.7* ]]; then
if [[ $MINIMUM_REQUIREMENTS == 1 ]]; then
sed -i 's/>=/==/g' requirements.txt
fi
+13 -11
View File
@@ -8,7 +8,7 @@ nosetests $TEST_ARGS skimage
section_end "Test.with.min.requirements"
section "Build.docs"
if [[ ($PY != 2.6) && ($PY != 3.2) ]]; then
if [[ $NO_SPHINX != 1 ]]; then
export SPHINXCACHE=$HOME/.cache/sphinx; make html
fi
section_end "Build.docs"
@@ -21,12 +21,12 @@ section_end "Flake8.test"
section "Install.optional.dependencies"
# Install most of the optional packages
if [[ $PY != 3.2* ]]; then
if [[ $OPTIONAL_DEPS == 1 ]]; then
pip install --retries 3 -q -r ./optional_requirements.txt $WHEELHOUSE
fi
# Install Qt and then update the Matplotlib settings
if [[ $PY == 2.7* ]]; then
if [[ $WITH_QT == 1 ]]; then
# http://stackoverflow.com/a/9716100
LIBS=( PyQt4 sip.so )
@@ -41,11 +41,11 @@ if [[ $PY == 2.7* ]]; then
ln -sf $LIB_SYSTEM_PATH/$LIB $LIB_VIRTUALENV_PATH/$LIB
done
elif [[ $PY != 3.2* ]]; then
elif [[ $WITH_PYSIDE == 1 ]]; then
python ~/venv/bin/pyside_postinstall.py -install
fi
if [[ $PY == 2.* ]]; then
if [[ $WITH_PYAMG == 1 ]]; then
pip install --retries 3 -q pyamg
fi
@@ -58,7 +58,7 @@ section_end "Install.optional.dependencies"
section "Run.doc.examples"
# Matplotlib settings - do not show figures during doc examples
if [[ $PY == 2.7* ]]; then
if [[ $MINIMUM_REQUIREMENTS == 1 ]]; then
MPL_DIR=$HOME/.matplotlib
else
MPL_DIR=$HOME/.config/matplotlib
@@ -89,15 +89,17 @@ for f in doc/examples/xx_applications/*.py; do
done
# Now configure Matplotlib to use Qt4
if [[ $PY == 2.7* ]]; then
if [[ $WITH_QT == 1 ]]; then
MPL_QT_API=PyQt4
export QT_API=pyqt
else
elif [[ $WITH_PYSIDE == 1 ]]; then
MPL_QT_API=PySide
export QT_API=pyside
fi
echo 'backend: Qt4Agg' > $MPL_DIR/matplotlibrc
echo 'backend.qt4 : '$MPL_QT_API >> $MPL_DIR/matplotlibrc
if [ "$WITH_QT" = "1" -o "$WITH_PYSIDE" = "1" ]; then
echo 'backend: Qt4Agg' > $MPL_DIR/matplotlibrc
echo 'backend.qt4 : '$MPL_QT_API >> $MPL_DIR/matplotlibrc
fi
section_end "Run.doc.applications"
@@ -105,7 +107,7 @@ section_end "Run.doc.applications"
section "Test.with.optional.dependencies"
# run tests again with optional dependencies to get more coverage
if [[ $PY == 3.3 ]]; then
if [ $OPTIONAL_DEPS == 1 ]; then
TEST_ARGS="$TEST_ARGS --with-cov --cover-package skimage"
fi
nosetests $TEST_ARGS