-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
175 lines (161 loc) · 5.49 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
language: python
dist: trusty
sudo: false
cache:
pip: true
directories:
- $HOME/.ccache # https://github.com/travis-ci/travis-ci/issues/5853
- $HOME/.cache/matplotlib
addons:
apt:
packages:
- inkscape
- libav-tools
- gdb
- mencoder
- dvipng
- pgf
- lmodern
- cm-super
- texlive-latex-base
- texlive-latex-extra
- texlive-fonts-recommended
- texlive-latex-recommended
- texlive-xetex
- graphviz
- libgeos-dev
- otf-freefont
env:
global:
- ARTIFACTS_AWS_REGION=us-east-1
- ARTIFACTS_S3_BUCKET=matplotlib-test-results
- secure: RgJI7BBL8aX5FTOQe7xiXqWHMxWokd6GNUWp1NUV2mRLXPb9dI0RXqZt3UJwKTAzf1z/OtlHDmEkBoTVK81E9iUxK5npwyyjhJ8yTJmwfQtQF2n51Q1Ww9p+XSLORrOzZc7kAo6Kw6FIXN1pfctgYq2bQkrwJPRx/oPR8f6hcbY=
- secure: E7OCdqhZ+PlwJcn+Hd6ns9TDJgEUXiUNEI0wu7xjxB2vBRRIKtZMbuaZjd+iKDqCKuVOJKu0ClBUYxmgmpLicTwi34CfTUYt6D4uhrU+8hBBOn1iiK51cl/aBvlUUrqaRLVhukNEBGZcyqAjXSA/Qsnp2iELEmAfOUa92ZYo1sk=
- secure: "dfjNqGKzQG5bu3FnDNwLG8H/C4QoieFo4PfFmZPdM2RY7WIzukwKFNT6kiDfOrpwt+2bR7FhzjOGlDECGtlGOtYPN8XuXGjhcP4a4IfakdbDfF+D3NPIpf5VlE6776k0VpvcZBTMYJKNFIMc7QPkOwjvNJ2aXyfe3hBuGlKJzQU="
- NUMPY=numpy
- OPENBLAS_NUM_THREADS=1
- PANDAS=
- NPROC=2
- INSTALL_PEP8=
- RUN_PEP8=
- NOSE=
- PYTEST_ARGS="-rawR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n $NPROC"
- PYTHON_ARGS=
- DELETE_FONT_CACHE=
matrix:
include:
- python: 2.7
env: MOCK=mock NUMPY=numpy==1.7.1 PANDAS=pandas NOSE=nose
- python: 3.4
env: PYTHON_ARGS=-OO
- python: 3.6
env: DELETE_FONT_CACHE=1 INSTALL_PEP8=pytest-pep8 RUN_PEP8=--pep8 PANDAS=pandas
- python: "nightly"
env: PRE=--pre
- os: osx
osx_image: xcode7.3
language: generic # https://github.com/travis-ci/travis-ci/issues/2312
env: MOCK=mock
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:
- |
if [[ $TRAVIS_OS_NAME != 'osx' ]]; then
# test with non-ascii in path
mkdir /tmp/λ
export PATH=$PATH:/tmp/λ
export PATH=/usr/lib/ccache:$PATH
else
brew update
brew tap homebrew/gui
brew install python libpng ffmpeg imagemagick mplayer ccache
# 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/ccache/libexec:$PATH
fi
install:
# Upgrade pip and setuptools. Mock has issues with the default version of
# setuptools
- |
# Setup environment
ccache -s
git describe
# Upgrade pip and setuptools and wheel to get as clean an install as possible
pip install --upgrade pip setuptools wheel
- |
# Install dependencies from pypi
pip install --upgrade $PRE \
$MOCK \
$NOSE \
$NUMPY \
$PANDAS \
codecov \
coverage \
cycler \
pillow \
pyparsing!=2.1.6 \
python-dateutil \
sphinx
# 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).
pip install pyqt5 &&
python -c 'import PyQt5.QtCore' &&
echo 'PyQt5 is available' ||
echo 'PyQt5 is not available'
pip install -U --pre \
-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'
# pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124
pip install $PRE \
pytest \
pytest-cov>=2.3.1 \
pytest-faulthandler \
pytest-rerunfailures \
pytest-timeout \
pytest-xdist \
$INSTALL_PEP8
# Use the special local version of freetype for testing
cp ci/travis/setup.cfg .
- |
# Install matplotlib
pip install -ve .
before_script:
- |
if [[ $TRAVIS_OS_NAME != 'osx' ]]; then
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
fi
script: ci/travis/test_script.sh
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
gem install travis-artifacts
cd $TRAVIS_BUILD_DIR/../tmp_test_dir
tar cjf result_images.tar.bz2 result_images
travis-artifacts upload --path result_images.tar.bz2
echo https://s3.amazonaws.com/matplotlib-test-results/artifacts/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}/result_images.tar.bz2
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