Use right exception.
[jelmer/subvertpy.git] / appveyor.yml
1 environment:
2
3   matrix:
4
5     - PYTHON: "C:\\Python27"
6       PYTHON_VERSION: "2.7.x"
7       PYTHON_ARCH: "32"
8
9     - PYTHON: "C:\\Python27-x64"
10       PYTHON_VERSION: "2.7.x"
11       PYTHON_ARCH: "64"
12
13     - PYTHON: "C:\\Python33"
14       PYTHON_VERSION: "3.3.x"
15       PYTHON_ARCH: "32"
16
17     - PYTHON: "C:\\Python33-x64"
18       PYTHON_VERSION: "3.3.x"
19       PYTHON_ARCH: "64"
20       DISTUTILS_USE_SDK: "1"
21
22     - PYTHON: "C:\\Python34"
23       PYTHON_VERSION: "3.4.x"
24       PYTHON_ARCH: "32"
25
26     - PYTHON: "C:\\Python34-x64"
27       PYTHON_VERSION: "3.4.x"
28       PYTHON_ARCH: "64"
29       DISTUTILS_USE_SDK: "1"
30
31     - PYTHON: "C:\\Python35"
32       PYTHON_VERSION: "3.5.x"
33       PYTHON_ARCH: "32"
34
35     - PYTHON: "C:\\Python35-x64"
36       PYTHON_VERSION: "3.5.x"
37       PYTHON_ARCH: "64"
38
39     - PYTHON: "C:\\Python36"
40       PYTHON_VERSION: "3.6.x"
41       PYTHON_ARCH: "32"
42
43     - PYTHON: "C:\\Python36-x64"
44       PYTHON_VERSION: "3.6.x"
45       PYTHON_ARCH: "64"
46
47 install:
48   # If there is a newer build queued for the same PR, cancel this one.
49   # The AppVeyor 'rollout builds' option is supposed to serve the same
50   # purpose but it is problematic because it tends to cancel builds pushed
51   # directly to master instead of just PR builds (or the converse).
52   # credits: JuliaLang developers.
53   - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
54         https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
55         Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
56           throw "There are newer queued builds for this pull request, failing early." }
57   - ECHO "Filesystem root:"
58   - ps: "ls \"C:/\""
59
60   - ECHO "Installed SDKs:"
61   - ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\""
62
63   # Install Python (from the official .msi of http://python.org) and pip when
64   # not already installed.
65   - ps: if (-not(Test-Path($env:PYTHON))) { & appveyor\install.ps1 }
66
67   # Prepend newly installed Python to the PATH of this build (this cannot be
68   # done from inside the powershell script as it would require to restart
69   # the parent CMD process).
70   - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
71
72   # Check that we have the expected version and architecture for Python
73   - "build.cmd %PYTHON%\\python.exe --version"
74   - "build.cmd %PYTHON%\\python.exe -c \"import struct; print(struct.calcsize('P') * 8)\""
75
76   # Install setuptools/wheel so that we can e.g. use bdist_wheel
77   - "pip install setuptools wheel"
78
79   - "build.cmd %PYTHON%\\python.exe setup.py develop"
80
81 build_script:
82   # Build the compiled extension
83   - "build.cmd %PYTHON%\\python.exe setup.py build"
84
85 test_script:
86   - "build.cmd %PYTHON%\\python.exe setup.py test"
87
88 after_test:
89   - "build.cmd %PYTHON%\\python.exe setup.py bdist_wheel"
90   # http://stackoverflow.com/questions/43255455/unicode-character-causing-error-with-bdist-wininst-on-python-3-but-not-python-2
91   # - "python setup.py bdist_wininst"
92   - "build.cmd %PYTHON%\\python.exe setup.py bdist_msi"
93   - ps: "ls dist"
94
95 artifacts:
96   - path: dist\*