代码拉取完成,页面将自动刷新
# With infos from
# http://tjelvarolsson.com/blog/how-to-continuously-test-your-python-code-on-windows-using-appveyor/
# https://packaging.python.org/en/latest/appveyor/
# https://github.com/rmcgibbo/python-appveyor-conda-example
# Backslashes in quotes need to be escaped: \ -> "\\"
branches:
except:
- /auto-backport-.*/
- /^v\d+\.\d+\.[\dx]+-doc$/
clone_depth: 50
environment:
global:
PYTHONFAULTHANDLER: 1
PYTHONIOENCODING: UTF-8
PYTEST_ARGS: -raR --numprocesses=auto --timeout=300 --durations=25
--cov-report= --cov=lib --log-level=DEBUG
matrix:
# In theory we could use a single CONDA_INSTALL_LOCN because we construct
# the envs anyway. But using one for the right python version hopefully
# making things faster due to package caching.
- PYTHON_VERSION: "3.6"
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64"
TEST_ALL: "no"
- PYTHON_VERSION: "3.7"
CONDA_INSTALL_LOCN: "C:\\Miniconda37-x64"
TEST_ALL: "no"
# We always use a 64-bit machine, but can build x86 distributions
# with the PYTHON_ARCH variable
platform:
- x64
# all our python builds have to happen in tests_script...
build: false
cache:
- '%LOCALAPPDATA%\pip\Cache'
- '%USERPROFILE%\.cache\matplotlib'
init:
- echo %PYTHON_VERSION% %CONDA_INSTALL_LOCN%
install:
- set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%;
- set PYTHONUNBUFFERED=1
- conda config --set always_yes true
- conda update --all
- conda config --set show_channel_urls yes
- conda config --prepend channels conda-forge
# this is now the downloaded conda...
- activate
- conda info -a
# For building, use a new environment which only includes the requirements for mpl
# if conda-forge gets a new pyqt, it might be nice to install it as well to have more backends
# https://github.com/conda-forge/conda-forge.github.io/issues/157#issuecomment-223536381
- conda create -q -n test-environment python=%PYTHON_VERSION%
freetype=2.6 zlib=1.2 tk=8.5
pip setuptools numpy sphinx tornado
- activate test-environment
- echo %PYTHON_VERSION% %TARGET_ARCH%
- pip install -r requirements/testing/travis_all.txt -r requirements/testing/travis36.txt
# Apply patch to `subprocess` on Python versions > 2 and < 3.6.3
# https://github.com/matplotlib/matplotlib/issues/9176
- python -c "import sys; sys.exit(not (3,) < sys.version_info < (3,6,3))" && (
curl -sL https://github.com/python/cpython/pull/1224.patch |
patch -fsup 1 -d %CONDA_PREFIX% ) || cmd /c "exit /b 0"
# enables the local freetype build
- set MPLLOCALFREETYPE=1
# Show the installed packages + versions
- conda list
test_script:
# Now build the thing..
- set LINK=/LIBPATH:%cd%\lib
- pip install -ve .
# these should show no z or freetype dll...
- set "DUMPBIN=%VS140COMNTOOLS%\..\..\VC\bin\dumpbin.exe"
- 'if x%MPLSTATICBUILD% == xTrue "%DUMPBIN%" /DEPENDENTS lib\matplotlib\ft2font*.pyd | findstr freetype.*.dll && exit /b 1 || exit /b 0'
# this are optional dependencies so that we don't skip so many tests...
- if x%TEST_ALL% == xyes conda install -q ffmpeg inkscape miktex pillow
# missing packages on conda-forge for avconv imagemagick
# This install sometimes failed randomly :-(
#- choco install imagemagick
# Test import of tkagg backend
- python -c "import matplotlib as m; m.use('tkagg'); import matplotlib.pyplot as plt; print(plt.get_backend())"
# tests
- echo The following args are passed to pytest %PYTEST_ARGS%
- pytest %PYTEST_ARGS%
after_test:
# After the tests were a success, build wheels with the static libs
# Hide the output, the copied files really clutter the build log...
- set MPLSTATICBUILD=True
- 'python setup.py bdist_wheel > NUL:'
- dir dist\
- echo finished...
artifacts:
- path: dist\*
name: packages
- path: result_images\*
name: result_images
type: zip
on_finish:
- pip install codecov
- codecov -e PYTHON_VERSION PLATFORM
on_failure:
# Generate a html for visual tests
- python tools/visualize_tests.py --no-browser
- echo zipping images after a failure...
- 7z a result_images.zip result_images\ | grep -v "Compressing"
- appveyor PushArtifact result_images.zip
matrix:
fast_finish: true
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。