fonttools/.appveyor.yml
Cosimo Lupo 8bf3fd18c0 appveyor: add script to set SDK vars for 64-bit py34 before running tox
Update appveyor.yml to follow the most recent recommendation from PyPA Packaging User Guide:
http://python-packaging-user-guide.readthedocs.org/en/latest/appveyor/

- set DISTUTILS_USE_SDK=1 only for Python34-x64. It seems like we no longer need to do that for Python2.7-x64;
  For more info check this: https://github.com/ogrisel/python-appveyor-demo/issues/39

- run tox using 'with-compiler.cmd' batch script so that Brotli extension can be built from git source with the correct MSVC and Windows SDK versions (btw, I wish brotli was on PyPI already so we could just `pip install brotli` and done!);

- define TOXPYTHON variable to make sure tox uses the correct python interpreter. Previously, in fact, the 'py34' toxenv was always picking up the 32-bit interpreter, even when we were testing the 64-bit Python 3.4 :(...

- add PowerShell command to enable 'rollout builds' feature, as done on 'python-appveyor-demo':
f54ec3593b/appveyor.yml (L81-L89)

- call pip via `python -m pip` to make sure we are running the just updated pip version, instead of Appveyor's pre-installed pip

- Remove unused stuff
2016-04-10 19:17:36 +01:00

74 lines
2.4 KiB
YAML

environment:
global:
WITH_COMPILER: "cmd /E:ON /V:ON /C .\\.appveyor\\with-compiler.cmd"
matrix:
- JOB: "2.7.11 32-bit"
PYTHON_HOME: "C:\\Python27"
TOXENV: "py27"
TOXPYTHON: "C:\\Python27\\python.exe"
- JOB: "3.4.3 32-bit"
PYTHON_HOME: "C:\\Python34"
TOXENV: "py34"
TOXPYTHON: "C:\\Python34\\python.exe"
- JOB: "3.5.1 32-bit"
PYTHON_HOME: "C:\\Python35"
TOXENV: "py35"
TOXPYTHON: "C:\\Python35\\python.exe"
- JOB: "2.7.11 64-bit"
PYTHON_HOME: "C:\\Python27-x64"
TOXENV: "py27"
TOXPYTHON: "C:\\Python27-x64\\python.exe"
- JOB: "3.4.3 64-bit"
PYTHON_HOME: "C:\\Python34-x64"
TOXENV: "py34"
TOXPYTHON: "C:\\Python34-x64\\python.exe"
DISTUTILS_USE_SDK: "1"
- JOB: "3.5.1 64-bit"
PYTHON_HOME: "C:\\Python35-x64"
TOXENV: "py35"
TOXPYTHON: "C:\\Python35-x64\\python.exe"
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 to avoid out-of-date warnings
- "python -m pip install --disable-pip-version-check --user --upgrade pip"
- "python -m pip --version"
# install the dependencies to run the tests
- "%WITH_COMPILER% python -m pip install -r dev-requirements.txt"
build: false
test_script:
- "%WITH_COMPILER% tox"
notifications:
- provider: Email
to:
- fonttools@googlegroups.com
on_build_success: false
on_build_failure: true
on_build_status_changed: true