@@ -11,15 +11,13 @@ environment:
11
11
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
12
12
# /E:ON and /V:ON options are not enabled in the batch script intepreter
13
13
# See: http://stackoverflow.com/a/13751649/163740
14
- CMD_IN_ENV : " cmd /E:ON /V:ON /C obvci_appveyor_python_build_env.cmd"
14
+ CMD_IN_ENV : cmd /E:ON /V:ON /C obvci_appveyor_python_build_env.cmd
15
15
# Workaround for https://github.com/conda/conda-build/issues/636
16
- PYTHONIOENCODING : " UTF-8"
17
- TEST_ARGS : --no-pep8
18
- PYTEST_ARGS : -ra --timeout=300 --durations=25 # --cov-report= --cov=lib #-n %NUMBER_OF_PROCESSORS%
19
- USE_PYTEST : no
20
- # PYTHONHASHSEED: 0 # Workaround for pytest-xdist flaky colletion order
21
- # # https://github.com/pytest-dev/pytest/issues/920
22
- # # https://github.com/pytest-dev/pytest/issues/1075
16
+ PYTHONIOENCODING : UTF-8
17
+ PYTEST_ARGS : -ra --timeout=300 --durations=25 -n %NUMBER_OF_PROCESSORS% --cov-report= --cov=lib -m "not network"
18
+ PYTHONHASHSEED : 0 # Workaround for pytest-xdist flaky collection order
19
+ # https://github.com/pytest-dev/pytest/issues/920
20
+ # https://github.com/pytest-dev/pytest/issues/1075
23
21
24
22
matrix :
25
23
# for testing purpose: numpy 1.8 on py2.7, for the rest use 1.10/latest
@@ -32,25 +30,12 @@ environment:
32
30
PYTHON_VERSION : " 2.7"
33
31
TEST_ALL : " no"
34
32
CONDA_INSTALL_LOCN : " C:\\ Miniconda-x64"
35
- - TARGET_ARCH : " x64"
36
- CONDA_PY : " 34"
37
- CONDA_NPY : " 110"
38
- PYTHON_VERSION : " 3.4"
39
- TEST_ALL : " no"
40
- CONDA_INSTALL_LOCN : " C:\\ Miniconda3-x64"
41
33
- TARGET_ARCH : " x64"
42
34
CONDA_PY : " 35"
43
35
CONDA_NPY : " 110"
44
36
PYTHON_VERSION : " 3.5"
45
37
TEST_ALL : " no"
46
38
CONDA_INSTALL_LOCN : " C:\\ Miniconda35-x64"
47
- - TARGET_ARCH : " x64"
48
- CONDA_PY : " 35"
49
- CONDA_NPY : " 110"
50
- PYTHON_VERSION : " 3.5"
51
- TEST_ALL : " no"
52
- CONDA_INSTALL_LOCN : " C:\\ Miniconda35-x64"
53
- USE_PYTEST : yes
54
39
- TARGET_ARCH : " x86"
55
40
CONDA_PY : " 27"
56
41
CONDA_NPY : " 18"
@@ -70,26 +55,32 @@ platform:
70
55
# all our python builds have to happen in tests_script...
71
56
build : false
72
57
58
+ cache :
59
+ - ' %LOCALAPPDATA%\pip\Cache'
60
+ - ' %USERPROFILE%\.cache\matplotlib'
61
+
73
62
init :
74
- - cmd : " ECHO %PYTHON_VERSION% PYTEST=%USE_PYTEST% % CONDA_INSTALL_LOCN%"
63
+ - echo %PYTHON_VERSION% % CONDA_INSTALL_LOCN%
75
64
76
65
install :
77
- - cmd : set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%;
78
- - cmd : set PYTHONUNBUFFERED=1
66
+ - set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%;
67
+ - set PYTHONUNBUFFERED=1
79
68
# for obvci_appveyor_python_build_env.cmd
80
- - cmd : conda install -c pelson/channel/development --yes --quiet obvious-ci
69
+ - conda install -c pelson/channel/development --yes --quiet obvious-ci
81
70
# for msinttypes and newer stuff
82
- - cmd : conda config --add channels conda-forge
83
- - cmd : conda config --set show_channel_urls yes
84
- - cmd : conda config --set always_yes true
71
+ # conda-forge may serve outdated versions of certain packages (e.g. conda
72
+ # itself), so append it to the end of the list.
73
+ - conda config --append channels conda-forge
74
+ - conda config --set show_channel_urls yes
75
+ - conda config --set always_yes true
85
76
# For building conda packages
86
- - cmd : conda install --yes conda-build jinja2 anaconda-client
77
+ - conda install --yes conda-build jinja2 anaconda-client
87
78
# this is now the downloaded conda...
88
79
- conda info -a
89
80
90
81
# Fix the appveyor build environment to work with conda build
91
82
# workaround for missing vcvars64.bat in py34 64bit
92
- - cmd : copy ci\appveyor\vcvars64.bat "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64"
83
+ - copy ci\appveyor\vcvars64.bat "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64"
93
84
94
85
# For building, use a new environment which only includes the requirements for mpl
95
86
# same things as the requirements in ci/conda_recipe/meta.yaml
@@ -98,18 +89,18 @@ install:
98
89
- conda create -q -n test-environment python=%PYTHON_VERSION%
99
90
pip setuptools numpy python-dateutil freetype=2.6 msinttypes "tk=8.5"
100
91
pyparsing pytz tornado "libpng>=1.6.21,<1.7" "zlib=1.2" "cycler>=0.10"
101
- nose mock sphinx
92
+ mock sphinx
102
93
- activate test-environment
103
- - cmd : echo %PYTHON_VERSION% %TARGET_ARCH%
104
- - cmd : IF %PYTHON_VERSION% == 2.7 conda install -q functools32
94
+ - echo %PYTHON_VERSION% %TARGET_ARCH%
95
+ - if %PYTHON_VERSION% == 2.7 conda install -q backports.functools_lru_cache
105
96
# pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124
106
- - if x%USE_PYTEST% == xyes conda install -q pytest "pytest-cov>=2.3.1" pytest-timeout # pytest-xdist
97
+ - conda install -q pytest "pytest-cov>=2.3.1" pytest-timeout pytest-xdist
107
98
108
99
# Let the install prefer the static builds of the libs
109
100
- set LIBRARY_LIB=%CONDA_PREFIX%\Library\lib
110
- - cmd : ' mkdir lib || cmd /c "exit /b 0"'
111
- - copy /Y %LIBRARY_LIB%\zlibstatic.lib lib\z.lib
112
- - copy /Y %LIBRARY_LIB%\libpng_static.lib lib\png.lib
101
+ - mkdir lib || cmd /c "exit /b 0"
102
+ - copy /y %LIBRARY_LIB%\zlibstatic.lib lib\z.lib
103
+ - copy /y %LIBRARY_LIB%\libpng_static.lib lib\png.lib
113
104
# These z.lib / png.lib are not static versions but files which end up as
114
105
# dependencies to the dll file. This is fine for the conda build, but not here
115
106
# and for the wheels
@@ -123,56 +114,54 @@ install:
123
114
124
115
test_script :
125
116
# Now build the thing..
126
- - ' %CMD_IN_ENV% python setup.py develop '
117
+ - ' %CMD_IN_ENV% pip install --no-deps -ve . '
127
118
# these should show no z, png, or freetype dll...
128
119
- set "DUMPBIN=%VS140COMNTOOLS%\..\..\VC\bin\dumpbin.exe"
129
- # - cmd: '"%DUMPBIN%" /DEPENDENTS lib\matplotlib\_png*.pyd'
130
- # - cmd: '"%DUMPBIN%" /DEPENDENTS lib\matplotlib\ft2font*.pyd'
131
- - cmd : ' "%DUMPBIN%" /DEPENDENTS lib\matplotlib\ft2font*.pyd | findstr freetype.*.dll && exit /b 1 || exit /b 0'
132
- - cmd : ' "%DUMPBIN%" /DEPENDENTS lib\\matplotlib\\_png*.pyd | findstr z.*.dll && exit /b 1 || exit /b 0'
133
- - cmd : ' "%DUMPBIN%" /DEPENDENTS lib\\matplotlib\\_png*.pyd | findstr png.*.dll && exit /b 1 || exit /b 0'
120
+ - ' "%DUMPBIN%" /DEPENDENTS lib\matplotlib\ft2font*.pyd | findstr freetype.*.dll && exit /b 1 || exit /b 0'
121
+ - ' "%DUMPBIN%" /DEPENDENTS lib\matplotlib\_png*.pyd | findstr z.*.dll && exit /b 1 || exit /b 0'
122
+ - ' "%DUMPBIN%" /DEPENDENTS lib\matplotlib\_png*.pyd | findstr png.*.dll && exit /b 1 || exit /b 0'
134
123
135
124
# this are optional dependencies so that we don't skip so many tests...
136
- - cmd : if x%TEST_ALL% == xyes; conda install -q pillow miktex inkscape
137
- # missing packages on conda-forge for ffmpeg avconv mencoder imagemagick
138
- - cmd : if x%TEST_ALL% == xyes; conda install -q -c menpo ffmpeg # a repackaged version
125
+ - if x%TEST_ALL% == xyes conda install -q ffmpeg inkscape miktex pillow
126
+ # missing packages on conda-forge for avconv mencoder imagemagick
139
127
# This install sometimes failed randomly :-(
140
- # - cmd: choco install imagemagick
128
+ # - choco install imagemagick
141
129
142
130
# Test import of tkagg backend
143
131
- python -c "import matplotlib as m; m.use('tkagg'); import matplotlib.pyplot as plt; print(plt.get_backend())"
144
132
# tests
145
- - if x%USE_PYTEST% == xyes echo The following args are passed to pytest %PYTEST_ARGS%
146
- - if x%USE_PYTEST% == xyes py.test %PYTEST_ARGS% %TEST_ARGS%
147
- - if x%USE_PYTEST% == xno python tests.py %TEST_ARGS%
133
+ - echo The following args are passed to pytest %PYTEST_ARGS%
134
+ - python tests.py %PYTEST_ARGS%
148
135
# Generate a html for visual tests
149
- - python visual_tests.py
136
+ - python tools/visualize_tests.py --no-browser
137
+ - pip install codecov
138
+ - codecov -e PYTHON_VERSION PLATFORM
150
139
151
140
after_test :
152
141
# After the tests were a success, build packages (wheels and conda)
153
142
154
143
# Build the wheel with the static libs
155
144
# Hide the output, the copied files really clutter the build log...
156
- - cmd : ' %CMD_IN_ENV% python setup.py bdist_wheel > NUL:'
145
+ - ' %CMD_IN_ENV% python setup.py bdist_wheel > NUL:'
157
146
158
147
# And now the conda build after a cleanup...
159
148
# cleanup build files so that they don't pollute the conda build but keep the wheel in dist...
160
- - cmd : git clean -d -x -f -e dist/
149
+ - git clean -xdfq -e dist/
161
150
# cleanup the environment so that the test-environment does not leak into the conda build...
162
- - cmd : set MPLBASEDIRLIST=
163
- - cmd : set LIBRARY_LIB=
164
- - cmd : deactivate
165
- - cmd : path
166
- - cmd : where python
167
- - cmd : ' %CMD_IN_ENV% conda config --get channels'
168
- - cmd : ' %CMD_IN_ENV% conda build -q .\ci\conda_recipe'
151
+ - set MPLBASEDIRLIST=
152
+ - set LIBRARY_LIB=
153
+ - deactivate
154
+ - path
155
+ - where python
156
+ - ' %CMD_IN_ENV% conda config --get channels'
157
+ - ' %CMD_IN_ENV% conda build -q .\ci\conda_recipe'
169
158
170
159
# Move the conda package into the dist directory, to register it
171
160
# as an "artifact" for Appveyor.
172
- - cmd : ' copy /Y %CONDA_INSTALL_LOCN%\conda-bld\win-32\*.bz2 dist || cmd /c "exit /b 0"'
173
- - cmd : ' copy /Y %CONDA_INSTALL_LOCN%\conda-bld\win-64\*.bz2 dist || cmd /c "exit /b 0"'
174
- - cmd : dir dist\
175
- - cmd : echo finished...
161
+ - copy /y %CONDA_INSTALL_LOCN%\conda-bld\win-32\*.bz2 dist || cmd /c "exit /b 0"
162
+ - copy /y %CONDA_INSTALL_LOCN%\conda-bld\win-64\*.bz2 dist || cmd /c "exit /b 0"
163
+ - dir dist\
164
+ - echo finished...
176
165
177
166
artifacts :
178
167
- path : dist\*
@@ -182,10 +171,12 @@ artifacts:
182
171
name : result_images
183
172
type : zip
184
173
174
+ on_finish :
175
+
185
176
on_failure :
186
- - python visual_tests .py
177
+ - python tools/visualize_tests .py --no-browser
187
178
- echo zipping images after a failure...
188
- - 7z a result_images.zip result_images\ |grep -v "Compressing"
179
+ - 7z a result_images.zip result_images\ | grep -v "Compressing"
189
180
- appveyor PushArtifact result_images.zip
190
181
191
182
matrix :
0 commit comments