61 lines
2.2 KiB
YAML
61 lines
2.2 KiB
YAML
environment:
|
|
matrix:
|
|
- JOB: "2.7 32-bit"
|
|
PYTHON_HOME: "C:\\Python27"
|
|
TOXENV: "py27-cov"
|
|
|
|
- JOB: "3.6 64-bit"
|
|
PYTHON_HOME: "C:\\Python36-x64"
|
|
TOXENV: "py36-cov"
|
|
|
|
- JOB: "3.7 64-bit"
|
|
PYTHON_HOME: "C:\\Python37-x64"
|
|
TOXENV: "py37-cov"
|
|
|
|
install:
|
|
# If there is a newer build queued for the same PR, cancel this one.
|
|
# The AppVeyor 'rollout builds' option is supposed to serve the same
|
|
# purpose but it is problematic because it tends to cancel builds pushed
|
|
# directly to master instead of just PR builds (or the converse).
|
|
# credits: JuliaLang developers.
|
|
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
|
|
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
|
|
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
|
|
throw "There are newer queued builds for this pull request, failing early." }
|
|
|
|
# Prepend Python to the PATH of this build
|
|
- "SET PATH=%PYTHON_HOME%;%PYTHON_HOME%\\Scripts;%PATH%"
|
|
|
|
# check that we have the expected version and architecture for Python
|
|
- "python --version"
|
|
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
|
|
|
|
# upgrade pip and setuptools to avoid out-of-date warnings
|
|
- "python -m pip install --disable-pip-version-check --user --upgrade pip setuptools"
|
|
|
|
# install the dependencies to run the tests
|
|
- "python -m pip install tox"
|
|
|
|
# Make a 'pythonX.X.bat' file in the current directory so that tox will find
|
|
# it and 'pythonX.X' will mean what we want it to. E.g. for 'TOXENV=py37',
|
|
# this will save a 'python3.7.bat' file containing "@C:\Python27\python %*"
|
|
# Credit: https://nedbatchelder.com/blog/201509/appveyor.html
|
|
- "python -c \"import os; open('python{0}.{1}.bat'.format(*os.environ['TOXENV'][2:4]), 'w').write('@{0}\\\\python \\x25*\\n'.format(os.environ['PYTHON']))\""
|
|
|
|
|
|
build: false
|
|
|
|
test_script:
|
|
- "tox"
|
|
|
|
after_test:
|
|
- "tox -e codecov"
|
|
|
|
notifications:
|
|
- provider: Email
|
|
to:
|
|
- fonttools-dev@googlegroups.com
|
|
on_build_success: false
|
|
on_build_failure: true
|
|
on_build_status_changed: true
|