language: python dist: trusty sudo: false branches: except: - /^auto-backport-of-pr-\d*/ cache: pip: true directories: - $HOME/.ccache # https://github.com/travis-ci/travis-ci/issues/5853 - $HOME/.cache/matplotlib addons: artifacts: paths: - result_images.tar.bz2 apt: sources: - sourceline: ppa:jonathonf/ffmpeg-3 packages: - cm-super - dvipng - ffmpeg - gdb - gir1.2-gtk-3.0 - graphviz - inkscape - libcairo2 - libgeos-dev - libgirepository-1.0.1 - lmodern - otf-freefont - pgf - texlive-fonts-recommended - texlive-latex-base - texlive-latex-extra - texlive-latex-recommended - texlive-xetex - texlive-luatex env: global: - ARTIFACTS_AWS_REGION=us-east-1 - ARTIFACTS_BUCKET=matplotlib-test-results - secure: RgJI7BBL8aX5FTOQe7xiXqWHMxWokd6GNUWp1NUV2mRLXPb9dI0RXqZt3UJwKTAzf1z/OtlHDmEkBoTVK81E9iUxK5npwyyjhJ8yTJmwfQtQF2n51Q1Ww9p+XSLORrOzZc7kAo6Kw6FIXN1pfctgYq2bQkrwJPRx/oPR8f6hcbY= - secure: E7OCdqhZ+PlwJcn+Hd6ns9TDJgEUXiUNEI0wu7xjxB2vBRRIKtZMbuaZjd+iKDqCKuVOJKu0ClBUYxmgmpLicTwi34CfTUYt6D4uhrU+8hBBOn1iiK51cl/aBvlUUrqaRLVhukNEBGZcyqAjXSA/Qsnp2iELEmAfOUa92ZYo1sk= - secure: dfjNqGKzQG5bu3FnDNwLG8H/C4QoieFo4PfFmZPdM2RY7WIzukwKFNT6kiDfOrpwt+2bR7FhzjOGlDECGtlGOtYPN8XuXGjhcP4a4IfakdbDfF+D3NPIpf5VlE6776k0VpvcZBTMYJKNFIMc7QPkOwjvNJ2aXyfe3hBuGlKJzQU= # Variables controlling Python dependencies. - CYCLER=cycler - DATEUTIL=python-dateutil - NOSE= - NUMPY=numpy - PANDAS= - JUPYTER= - PYPARSING=pyparsing - PYTEST='pytest>=3.4' - PYTEST_COV=pytest-cov - PYTEST_PEP8= - SPHINX=sphinx # Variables controlling the build. - MPLLOCALFREETYPE=1 # Variables controlling the test run. - DELETE_FONT_CACHE= - NO_AT_BRIDGE=1 # Necessary for GTK3 interactive test. # The number of processes is hardcoded, because using too many causes the # Travis VM to run out of memory (since so many copies of inkscape and # ghostscript are running at the same time). - NPROC=2 - OPENBLAS_NUM_THREADS=1 - PYTHONFAULTHANDLER=1 - PYTEST_ADDOPTS="-rawR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n $NPROC" - RUN_PEP8= matrix: include: - python: 3.5 # pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124. env: - CYCLER=cycler==0.10 - DATEUTIL=python-dateutil==2.1 - NOSE=nose - NUMPY=numpy==1.10.0 - PANDAS='pandas<0.21.0' - PYPARSING=pyparsing==2.0.1 - PYTEST=pytest==3.4 - PYTEST_COV=pytest-cov==2.3.1 - SPHINX=sphinx==1.3 - python: 3.5 env: # - PYTHONOPTIMIZE=2 # This currently doesn't work. - python: 3.6 env: - DELETE_FONT_CACHE=1 - PANDAS='pandas<0.21.0' - JUPYTER='jupyter' - PYTEST_PEP8=pytest-pep8 - PYTEST_ADDOPTS="$PYTEST_ADDOPTS --pep8" - python: "nightly" env: PRE=--pre - os: osx language: generic # https://github.com/travis-ci/travis-ci/issues/2312 only: master cache: # As for now travis caches only "$HOME/.cache/pip" # https://docs.travis-ci.com/user/caching/#pip-cache pip: false directories: - $HOME/Library/Caches/pip # `cache` does not support `env`-like `global` so copy-paste from top - $HOME/.ccache # https://github.com/travis-ci/travis-ci/issues/5853 - $HOME/.cache/matplotlib allow_failures: - python: "nightly" before_install: | # test with non-ascii in path if [[ $TRAVIS_OS_NAME != 'osx' ]]; then export PATH=/usr/lib/ccache:$PATH else ci/silence brew update brew upgrade python brew install ffmpeg imagemagick mplayer ccache hash -r which python python --version # We could install ghostscript and inkscape here to test svg and pdf # but this makes the test time really long. # brew install ghostscript inkscape export PATH=/usr/local/opt/python/libexec/bin:/usr/local/opt/ccache/libexec:$PATH fi install: - | # Setup environment. ccache -s git describe # Upgrade pip and setuptools and wheel to get as clean an install as possible. python -mpip install --upgrade pip setuptools wheel - | # Install dependencies from PyPI. python -mpip install --upgrade $PRE \ codecov \ coverage \ $CYCLER \ $DATEUTIL \ $NOSE \ $NUMPY \ $PANDAS \ $JUPYTER \ pillow \ $PYPARSING \ $SPHINX \ tornado # GUI toolkits are pip-installable only for some versions of Python so # don't fail if we can't install them. Make it easier to check whether the # install was successful by trying to import the toolkit (sometimes, the # install appears to be successful but shared libraries cannot be loaded at # runtime, so an actual import is a better check). python -mpip install cairocffi pgi && python -c 'import pgi as gi; gi.require_version("Gtk", "3.0"); from pgi.repository import Gtk' && echo 'pgi is available' || echo 'pgi is not available' python -mpip install pyqt5 && python -c 'import PyQt5.QtCore' && echo 'PyQt5 is available' || echo 'PyQt5 is not available' python -mpip install -U \ --no-index -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-14.04 \ wxPython && python -c 'import wx' && echo 'wxPython is available' || echo 'wxPython is not available' python -mpip install $PRE \ $PYTEST \ $PYTEST_COV \ pytest-faulthandler \ $PYTEST_PEP8 \ pytest-rerunfailures \ pytest-timeout \ pytest-xdist - | # Install matplotlib python -mpip install -ve . before_script: | if [[ $TRAVIS_OS_NAME != 'osx' ]]; then export DISPLAY=:99.0 sh -e /etc/init.d/xvfb start fi if [[ $DELETE_FONT_CACHE == 1 ]]; then rm -rf ~/.cache/matplotlib fi script: | echo "Calling pytest with the following arguments: $PYTEST_ADDOPTS" python -mpytest before_cache: | rm -rf $HOME/.cache/matplotlib/tex.cache rm -rf $HOME/.cache/matplotlib/test_cache after_failure: | if [[ $TRAVIS_PULL_REQUEST == false && $TRAVIS_REPO_SLUG == 'matplotlib/matplotlib' ]]; then tar cjf result_images.tar.bz2 result_images echo 'See "Uploading Artifacts" near the end of the log for the download URL' else echo "The result images will only be uploaded if they are on the matplotlib/matplotlib repo - this is for security reasons to prevent arbitrary PRs echoing security details." fi after_success: | codecov -e TRAVIS_PYTHON_VERSION