2012-06-06 08:51:56 +04:00
|
|
|
language: python
|
|
|
|
|
2014-04-02 14:53:34 +04:00
|
|
|
notifications:
|
|
|
|
irc: "chat.freenode.net#pil"
|
2014-03-26 23:04:54 +04:00
|
|
|
|
2014-09-24 10:15:58 +04:00
|
|
|
# Run slow PyPy* first, to give them a headstart and reduce waiting time.
|
2014-09-23 11:59:03 +04:00
|
|
|
# Run latest 3.x and 2.x next, to get quick compatibility results.
|
|
|
|
# Then run the remainder.
|
2012-06-06 08:51:56 +04:00
|
|
|
python:
|
2014-05-14 09:47:13 +04:00
|
|
|
- "pypy"
|
2014-08-18 00:34:12 +04:00
|
|
|
- "pypy3"
|
2015-09-14 17:06:13 +03:00
|
|
|
- 3.5
|
2012-06-06 08:51:56 +04:00
|
|
|
- 2.7
|
2014-09-23 11:59:03 +04:00
|
|
|
- 2.6
|
2014-07-21 13:15:23 +04:00
|
|
|
- "2.7_with_system_site_packages" # For PyQt4
|
2014-03-26 23:04:54 +04:00
|
|
|
- 3.2
|
|
|
|
- 3.3
|
2015-09-14 17:06:13 +03:00
|
|
|
- 3.4
|
2015-07-29 22:55:01 +03:00
|
|
|
- nightly
|
2012-06-06 08:51:56 +04:00
|
|
|
|
2014-04-02 12:00:43 +04:00
|
|
|
install:
|
2015-12-06 18:31:53 +03:00
|
|
|
- "travis_retry sudo apt-get update"
|
2014-09-10 11:25:17 +04:00
|
|
|
- "travis_retry sudo apt-get -qq install libfreetype6-dev liblcms2-dev python-qt4 ghostscript libffi-dev libjpeg-turbo-progs cmake imagemagick"
|
|
|
|
- "travis_retry pip install cffi"
|
2015-09-22 15:23:20 +03:00
|
|
|
- "travis_retry pip install nose"
|
2015-06-29 16:58:53 +03:00
|
|
|
- "travis_retry pip install check-manifest"
|
2015-09-30 16:37:54 +03:00
|
|
|
- "travis_retry pip install Sphinx"
|
2015-09-22 16:39:26 +03:00
|
|
|
# Pyroma tests sometimes hang on PyPy and Python 2.6; skip for those
|
2015-09-22 16:43:00 +03:00
|
|
|
- if [ $TRAVIS_PYTHON_VERSION != "pypy" && $TRAVIS_PYTHON_VERSION != "2.6" ]; then travis_retry pip install pyroma; fi
|
2014-08-16 19:12:31 +04:00
|
|
|
|
2014-09-10 11:25:17 +04:00
|
|
|
- if [ "$TRAVIS_PYTHON_VERSION" == "2.6" ]; then travis_retry pip install unittest2; fi
|
2013-03-19 21:18:25 +04:00
|
|
|
|
2015-09-22 15:23:20 +03:00
|
|
|
# Coveralls 4.0 doesn't support Python 3.2
|
|
|
|
- if [ "$TRAVIS_PYTHON_VERSION" == "3.2" ]; then travis_retry pip install coverage==3.7.1; fi
|
|
|
|
- if [ "$TRAVIS_PYTHON_VERSION" != "3.2" ]; then travis_retry pip install coverage; fi
|
|
|
|
|
2016-01-31 19:23:58 +03:00
|
|
|
# clean checkout for manifest
|
|
|
|
- mkdir /tmp/check-manifest && cp -a . /tmp/check-manifest
|
|
|
|
|
2014-04-02 12:00:43 +04:00
|
|
|
# webp
|
2014-03-27 01:11:41 +04:00
|
|
|
- pushd depends && ./install_webp.sh && popd
|
2014-03-26 20:29:47 +04:00
|
|
|
|
2014-03-26 23:04:54 +04:00
|
|
|
# openjpeg
|
2014-03-27 00:22:37 +04:00
|
|
|
- pushd depends && ./install_openjpeg.sh && popd
|
2013-03-19 21:18:25 +04:00
|
|
|
|
2012-06-06 08:51:56 +04:00
|
|
|
script:
|
2015-08-11 16:37:41 +03:00
|
|
|
- if [ "$TRAVIS_PYTHON_VERSION" != "nightly" ]; then coverage erase; fi
|
2012-06-06 08:51:56 +04:00
|
|
|
- python setup.py clean
|
2014-07-31 23:18:09 +04:00
|
|
|
- CFLAGS="-coverage" python setup.py build_ext --inplace
|
2014-05-14 09:17:49 +04:00
|
|
|
|
2015-08-11 16:37:41 +03:00
|
|
|
- if [ "$TRAVIS_PYTHON_VERSION" != "nightly" ]; then coverage run --append --include=PIL/* selftest.py; fi
|
|
|
|
- if [ "$TRAVIS_PYTHON_VERSION" != "nightly" ]; then coverage run --append --include=PIL/* -m nose -vx Tests/test_*.py; fi
|
2016-01-31 19:23:58 +03:00
|
|
|
- pushd /tmp/check-manifest && check-manifest --ignore ".coveragerc,.editorconfig,*.yml,*.yaml,tox.ini" && popd
|
2015-09-30 16:10:28 +03:00
|
|
|
# Sphinx
|
2016-01-08 21:07:24 +03:00
|
|
|
- make install
|
2015-09-30 16:37:54 +03:00
|
|
|
- pushd docs; make html; make linkcheck; popd
|
2014-04-02 12:00:43 +04:00
|
|
|
|
|
|
|
after_success:
|
2014-07-31 23:18:09 +04:00
|
|
|
# gather the coverage data
|
2014-09-10 11:25:17 +04:00
|
|
|
- travis_retry sudo apt-get -qq install lcov
|
2014-07-31 23:18:09 +04:00
|
|
|
- lcov --capture --directory . -b . --output-file coverage.info
|
|
|
|
# filter to remove system headers
|
2014-08-29 17:03:58 +04:00
|
|
|
- lcov --remove coverage.info '/usr/*' -o coverage.filtered.info
|
2014-07-31 23:18:09 +04:00
|
|
|
# convert to json
|
2014-09-10 11:25:17 +04:00
|
|
|
- travis_retry gem install coveralls-lcov
|
2014-07-31 23:18:09 +04:00
|
|
|
- coveralls-lcov -v -n coverage.filtered.info > coverage.c.json
|
|
|
|
|
2014-04-02 12:40:40 +04:00
|
|
|
- coverage report
|
2014-09-10 11:25:17 +04:00
|
|
|
- travis_retry pip install coveralls-merge
|
2014-07-31 23:18:09 +04:00
|
|
|
- coveralls-merge coverage.c.json
|
|
|
|
|
2014-09-10 11:25:17 +04:00
|
|
|
- travis_retry pip install pep8 pyflakes
|
2014-06-02 16:57:50 +04:00
|
|
|
- pep8 --statistics --count PIL/*.py
|
2016-01-31 18:03:40 +03:00
|
|
|
- pep8 --statistics --count Tests/*.py
|
2014-08-28 18:23:39 +04:00
|
|
|
- pyflakes *.py | tee >(wc -l)
|
2014-06-02 16:57:50 +04:00
|
|
|
- pyflakes PIL/*.py | tee >(wc -l)
|
|
|
|
- pyflakes Tests/*.py | tee >(wc -l)
|
2014-06-28 12:18:33 +04:00
|
|
|
|
2015-01-04 12:12:36 +03:00
|
|
|
# Coverage and quality reports on just the latest diff.
|
|
|
|
# (Installation is very slow on Py3, so just do it for Py2.)
|
2016-01-31 17:58:48 +03:00
|
|
|
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then depends/diffcover-install.sh; fi
|
|
|
|
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then depends/diffcover-run.sh; fi
|
2015-01-04 12:12:36 +03:00
|
|
|
|
2015-01-04 11:47:35 +03:00
|
|
|
# after_all
|
|
|
|
- |
|
2015-01-04 19:47:03 +03:00
|
|
|
if [ "$TRAVIS_REPO_SLUG" = "python-pillow/Pillow" ] && [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
|
2015-01-04 12:29:02 +03:00
|
|
|
curl -Lo travis_after_all.py https://raw.github.com/dmakhno/travis_after_all/master/travis_after_all.py
|
|
|
|
python travis_after_all.py
|
|
|
|
export $(cat .to_export_back)
|
|
|
|
if [ "$BUILD_LEADER" = "YES" ]; then
|
|
|
|
if [ "$BUILD_AGGREGATE_STATUS" = "others_succeeded" ]; then
|
|
|
|
echo "All jobs succeded! Triggering OS X build..."
|
|
|
|
# Trigger an OS X build at the pillow-wheels repo
|
|
|
|
./build_children.sh
|
|
|
|
else
|
|
|
|
echo "Some jobs failed"
|
|
|
|
fi
|
2015-01-04 11:47:35 +03:00
|
|
|
fi
|
|
|
|
fi
|
2014-07-01 00:57:16 +04:00
|
|
|
|
2015-01-04 11:47:35 +03:00
|
|
|
after_failure:
|
|
|
|
- |
|
2015-01-04 19:47:03 +03:00
|
|
|
if [ "$TRAVIS_REPO_SLUG" = "python-pillow/Pillow" ] && [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
|
2015-01-04 12:29:02 +03:00
|
|
|
curl -Lo travis_after_all.py https://raw.github.com/dmakhno/travis_after_all/master/travis_after_all.py
|
|
|
|
python travis_after_all.py
|
|
|
|
export $(cat .to_export_back)
|
|
|
|
if [ "$BUILD_LEADER" = "YES" ]; then
|
|
|
|
if [ "$BUILD_AGGREGATE_STATUS" = "others_failed" ]; then
|
|
|
|
echo "All jobs failed"
|
|
|
|
else
|
|
|
|
echo "Some jobs failed"
|
|
|
|
fi
|
2015-01-04 11:47:35 +03:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
after_script:
|
2015-01-04 12:29:02 +03:00
|
|
|
- |
|
2015-01-04 21:19:56 +03:00
|
|
|
if [ "$TRAVIS_REPO_SLUG" = "python-pillow/Pillow" ] && [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
|
2015-01-04 12:29:02 +03:00
|
|
|
echo leader=$BUILD_LEADER status=$BUILD_AGGREGATE_STATUS
|
|
|
|
fi
|
2015-01-04 11:47:35 +03:00
|
|
|
|
2014-09-10 11:25:17 +04:00
|
|
|
matrix:
|
2014-10-13 11:58:57 +04:00
|
|
|
fast_finish: true
|
2015-07-29 22:55:01 +03:00
|
|
|
allow_failures:
|
|
|
|
- python: nightly
|
2015-01-04 11:16:20 +03:00
|
|
|
|
|
|
|
env:
|
|
|
|
global:
|
|
|
|
# travis encrypt AUTH_TOKEN=
|
2015-01-04 23:01:32 +03:00
|
|
|
secure: "Vzm7aG1Qv0SDQcqiPzZMedNLn5ZmpL7IzF0DYnqcD+/l+zmKU22SnJBcX0uVXumo+r7eZfpsShpqfcdsZvMlvmQnwz+Y6AGKQru9tCKZbTMnuRjWKKXekC+tr8Xt9CKvRVtte5PyXW31paxUI3/e+fQGBwoFjEEC+6EpEOjeRfE="
|