10000 MNT: Make sure AppVeyor fails if tests fail by dopplershift · Pull Request #9773 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

MNT: Make sure AppVeyor fails if tests fail #9773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 15 additions & 59 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,41 +11,26 @@ branches:
environment:

global:
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
# /E:ON and /V:ON options are not enabled in the batch script intepreter
# See: http://stackoverflow.com/a/13751649/163740
CMD_IN_ENV: cmd /E:ON /V:ON /C obvci_appveyor_python_build_env.cmd
# Workaround for https://github.com/conda/conda-build/issues/636
PYTHONIOENCODING: UTF-8
PYTEST_ARGS: -rawR --numprocesses=auto --timeout=300 --durations=25
--cov-report= --cov=lib -m "not network"

matrix:
# for testing purpose: numpy 1.8 on py2.7, for the rest use 1.10/latest
# theoretically the CONDA_INSTALL_LOCN could be only two: one for 32bit,
# one for 64bit because we construct envs anyway. But using one for the
# right python version is hopefully making it fast due to package caching.
- TARGET_ARCH: "x64"
CONDA_PY: "27"
CONDA_NPY: "18"
PYTHON_VERSION: "2.7"
TEST_ALL: "no"
- PYTHON_VERSION: "2.7"
CONDA_INSTALL_LOCN: "C:\\Miniconda-x64"
- TARGET_ARCH: "x64"
CONDA_PY: "35"
CONDA_NPY: "110"
PYTHON_VERSION: "3.5"
TEST_ALL: "no"
- PYTHON_VERSION: "3.5"
CONDA_INSTALL_LOCN: "C:\\Miniconda35-x64"
TEST_ALL: "no"
- TARGET_ARCH: "x64"
CONDA_PY: "36"
PYTHON_VERSION: "3.6"
CONDA_NPY: "111"
- PYTHON_VERSION: "3.6"
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64"
TEST_ALL: "no"

# We always use a 64-bit machine, but can build x86 distributions
# with the PYTHON_ARCH variable (which is used by CMD_IN_ENV).
# with the PYTHON_ARCH variable
platform:
- x64

Expand All @@ -62,23 +47,14 @@ init:
install:
- set PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%;
- set PYTHONUNBUFFERED=1
# for obvci_appveyor_python_build_env.cmd
- conda update --all --yes
- conda install anaconda-client=1.6.3 --yes
- conda install -c conda-forge --yes obvious-ci
# for msinttypes and newer stuff
- conda config --prepend channels conda-forge
- conda config --set show_channel_urls yes
- conda config --set always_yes true
# For building conda packages
- conda install --yes conda-build jinja2 anaconda-client
- conda update --all
- conda config --set show_channel_urls yes
- conda config --prepend channels conda-forge
# this is now the downloaded conda...
- conda info -a

# Fix the appveyor build environment to work with conda build
# workaround for missing vcvars64.bat in py34 64bit
- copy ci\appveyor\vcvars64.bat "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64"

# For building, use a new environment which only includes the requirements for mpl
# same things as the requirements in ci/conda_recipe/meta.yaml
# if conda-forge gets a new pyqt, it might be nice to install it as well to have more backends
Expand All @@ -96,7 +72,7 @@ install:
# 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% ) || ( set errorlevel= )
patch -fsup 1 -d %CONDA_PREFIX% ) || cmd /c "exit /b 0"

# Let the install prefer the static builds of the libs
- set LIBRARY_LIB=%CONDA_PREFIX%\Library\lib
Expand All @@ -116,7 +92,7 @@ install:

test_script:
# Now build the thing..
- '%CMD_IN_ENV% pip install -ve .'
- pip install -ve .
# these should show no z, png, or freetype dll...
- set "DUMPBIN=%VS140COMNTOOLS%\..\..\VC\bin\dumpbin.exe"
- '"%DUMPBIN%" /DEPENDENTS lib\matplotlib\ft2font*.pyd | findstr freetype.*.dll && exit /b 1 || exit /b 0'
Expand All @@ -134,34 +110,11 @@ test_script:
# tests
- echo The following args are passed to pytest %PYTEST_ARGS%
- python tests.py %PYTEST_ARGS%
# Generate a html for visual tests
- python tools/visualize_tests.py --no-browser
- pip install codecov
- codecov -e PYTHON_VERSION PLATFORM

after_test:
# After the tests were a success, build packages (wheels and conda)

# Build the wheel with the static libs
# After the tests were a success, build wheels with the static libs
# Hide the output, the copied files really clutter the build log...
- '%CMD_IN_ENV% python setup.py bdist_wheel > NUL:'

# And now the conda build after a cleanup...
# cleanup build files so that they don't pollute the conda build but keep the wheel in dist...
- git clean -xdfq -e dist/
# cleanup the environment so that the test-environment does not leak into the conda build...
- set MPLBASEDIRLIST=
- set LIBRARY_LIB=
- deactivate
- path
- where python
- '%CMD_IN_ENV% conda config --get channels'
- '%CMD_IN_ENV% conda build -q .\ci\conda_recipe'

# Move the conda package into the dist directory, to register it
# as an "artifact" for Appveyor.
- copy /y %CONDA_INSTALL_LOCN%\conda-bld\win-32\*.bz2 dist || cmd /c "exit /b 0"
- copy /y %CONDA_INSTALL_LOCN%\conda-bld\win-64\*.bz2 dist || cmd /c "exit /b 0"
- 'python setup.py bdist_wheel > NUL:'
- dir dist\
- echo finished...

Expand All @@ -174,8 +127,11 @@ artifacts:
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"
Expand Down
1 change: 0 additions & 1 deletion ci/appveyor/vcvars64.bat

This file was deleted.

3 changes: 0 additions & 3 deletions ci/conda_recipe/README.md

This file was deleted.

16 changes: 0 additions & 16 deletions ci/conda_recipe/bld.bat

This file was deleted.

37 changes: 0 additions & 37 deletions ci/conda_recipe/build.sh

This file was deleted.

13 changes: 0 additions & 13 deletions ci/conda_recipe/cfg_qt4agg.patch

This file was deleted.

15 changes: 0 additions & 15 deletions ci/conda_recipe/condaversion.patch

This file was deleted.

75 changes: 0 additions & 75 deletions ci/conda_recipe/meta.yaml

This file was deleted.

60 changes: 0 additions & 60 deletions ci/conda_recipe/osx-tk.patch

This file was deleted.

19 changes: 0 additions & 19 deletions ci/conda_recipe/rctmp_pyside.patch

This file was deleted.

Loading
0