2014-03-24 20:52:33 +00:00
|
|
|
language: python
|
|
|
|
|
|
|
|
# Credit: Original .travis.yml lifted from VisPy
|
|
|
|
|
|
|
|
# Here we use anaconda for 2.6 and 3.3, since it provides the simplest
|
|
|
|
# interface for running different versions of Python. We could also use
|
|
|
|
# it for 2.7, but the Ubuntu system has installable 2.7 Qt4-GL, which
|
|
|
|
# allows for more complete testing.
|
2014-03-24 21:12:06 +00:00
|
|
|
notifications:
|
|
|
|
email: false
|
2014-03-24 20:52:33 +00:00
|
|
|
|
|
|
|
virtualenv:
|
|
|
|
system_site_packages: true
|
|
|
|
|
|
|
|
|
|
|
|
env:
|
|
|
|
# Enable python 2 and python 3 builds
|
|
|
|
# Note that the 2.6 build doesn't get flake8, and runs old versions of
|
|
|
|
# Pyglet and GLFW to make sure we deal with those correctly
|
|
|
|
#- PYTHON=2.6 QT=pyqt TEST=standard
|
2014-03-24 21:23:03 +00:00
|
|
|
- PYTHON=2.7 QT=pyqt TEST=extra
|
|
|
|
- PYTHON=2.7 QT=pyside TEST=standard
|
2014-03-25 00:48:02 +00:00
|
|
|
- PYTHON=3.3 QT=pyqt TEST=standard
|
|
|
|
- PYTHON=3.3 QT=pyside TEST=standard
|
2014-03-24 20:52:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
before_install:
|
2014-03-25 01:17:15 +00:00
|
|
|
- travis_retry sudo apt-get update;
|
2014-03-25 00:48:02 +00:00
|
|
|
# - if [ "${PYTHON}" != "2.7" ]; then
|
|
|
|
# wget http://repo.continuum.io/miniconda/Miniconda-2.2.2-Linux-x86_64.sh -O miniconda.sh &&
|
|
|
|
# chmod +x miniconda.sh &&
|
|
|
|
# ./miniconda.sh -b &&
|
|
|
|
# export PATH=/home/$USER/anaconda/bin:$PATH &&
|
|
|
|
# conda update --yes conda &&
|
|
|
|
# travis_retry sudo apt-get -qq -y install libgl1-mesa-dri;
|
|
|
|
# fi;
|
2014-03-24 20:52:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
install:
|
2014-03-25 00:56:01 +00:00
|
|
|
- pip install pytest
|
|
|
|
- pip install flake8
|
|
|
|
|
2014-03-25 00:48:02 +00:00
|
|
|
- if [ "${PYTHON}" == "2.7" ]; then
|
2014-03-25 00:56:01 +00:00
|
|
|
travis_retry sudo apt-get -qq -y install python-numpy;
|
2014-03-24 21:12:06 +00:00
|
|
|
if [ ${QT} == 'pyqt' ]; then
|
2014-03-25 00:48:02 +00:00
|
|
|
travis_retry sudo apt-get -qq -y install python-qt4 python-qt4-gl;
|
2014-03-24 20:52:33 +00:00
|
|
|
else
|
2014-03-25 00:48:02 +00:00
|
|
|
travis_retry sudo apt-get -qq -y install python-pyside.qtcore python-pyside.qtgui python-pyside.qtsvg python-pyside.qtopengl;
|
|
|
|
fi;
|
|
|
|
elif [ "${PYTHON}" == "3.3" ]; then
|
2014-03-25 00:56:01 +00:00
|
|
|
travis_retry sudo apt-get -qq -y install python3-numpy;
|
2014-03-25 00:48:02 +00:00
|
|
|
if [ ${QT} == 'pyqt' ]; then
|
2014-03-25 00:56:01 +00:00
|
|
|
travis_retry sudo apt-get -qq -y install python3-pyqt4.qtcore python3-pyqt4.qtgui python3-pyqt4.qtsvg python3-pyqt4.qtopengl;
|
2014-03-25 00:48:02 +00:00
|
|
|
else
|
|
|
|
travis_retry sudo apt-get -qq -y install python3-pyside.qtcore python3-pyside.qtgui python3-pyside.qtsvg python3-pyside.qtopengl;
|
2014-03-24 20:52:33 +00:00
|
|
|
fi;
|
|
|
|
else
|
2014-03-25 00:48:02 +00:00
|
|
|
conda create -n testenv --yes --quiet pip python=$PYTHON &&
|
|
|
|
source activate testenv &&
|
2014-03-24 21:12:06 +00:00
|
|
|
if [ ${QT} == 'pyqt' ]; then
|
2014-03-25 00:48:02 +00:00
|
|
|
conda install --yes --quiet pyside;
|
2014-03-24 20:52:33 +00:00
|
|
|
else
|
2014-03-25 00:48:02 +00:00
|
|
|
conda install --yes --quiet pyside;
|
2014-03-24 20:52:33 +00:00
|
|
|
fi;
|
|
|
|
fi;
|
|
|
|
|
|
|
|
# Install PyOpenGL
|
|
|
|
- if [ "${DEPS}" == "full" ]; then
|
|
|
|
if [ "${PYTHON}" == "2.7" ]; then
|
|
|
|
echo "Using OpenGL stable version (repos)";
|
|
|
|
travis_retry sudo apt-get -qq -y install python-opengl;
|
|
|
|
else
|
|
|
|
echo "Using OpenGL stable version (pip)";
|
|
|
|
pip install -q PyOpenGL;
|
|
|
|
fi;
|
|
|
|
fi;
|
|
|
|
|
2014-03-25 01:31:33 +00:00
|
|
|
# Debugging helpers
|
|
|
|
- uname -a
|
|
|
|
- cat /etc/issue
|
|
|
|
- python${PYTHON} --version
|
|
|
|
- apt-cache search python3-pyqt
|
|
|
|
|
2014-03-24 20:52:33 +00:00
|
|
|
|
|
|
|
before_script:
|
|
|
|
# We need to create a (fake) display on Travis, let's use a funny resolution
|
|
|
|
- export DISPLAY=:99.0
|
|
|
|
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1400x900x24 -ac +extension GLX +render
|
|
|
|
|
|
|
|
|
|
|
|
script:
|
2014-03-25 00:48:02 +00:00
|
|
|
# Run unit tests
|
2014-03-25 01:17:15 +00:00
|
|
|
- python${PYTHON} setup.py test
|
2014-03-24 20:52:33 +00:00
|
|
|
|
|
|
|
# check line endings
|
|
|
|
- if [ "${TEST}" == "extra" ]; then
|
|
|
|
find ./ -name "*.py" | xargs file | grep CRLF; out=$?;
|
|
|
|
if [ ${out} == 0 ];
|
|
|
|
then false;
|
|
|
|
else true;
|
|
|
|
fi;
|
|
|
|
fi;
|
2014-03-25 00:48:02 +00:00
|
|
|
|
|
|
|
# Check for style issues
|
|
|
|
- if [ "${TEST}" == "extra" ]; then
|
2014-03-25 01:17:15 +00:00
|
|
|
python${PYTHON} setup.py style;
|
2014-03-25 00:48:02 +00:00
|
|
|
fi;
|
|
|
|
|
2014-03-24 20:52:33 +00:00
|
|
|
|