-
Notifications
You must be signed in to change notification settings - Fork 156
/
.appveyor.yml
108 lines (84 loc) · 3.2 KB
/
.appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# https://ci.appveyor.com/project/orbingol/nurbs-python
# Partly inspired from
# http://tjelvarolsson.com/blog/how-to-continuously-test-your-python-code-on-windows-using-appveyor/
# https://packaging.python.org/guides/supporting-windows-using-appveyor
# https://github.com/ogrisel/python-appveyor-demo
# https://www.appveyor.com/docs/appveyor-yml/
# Build version
version: Build {build}
# Fetch repository as a zip archive
shallow_clone: true
# Branch configuration
branches:
only:
- master
- 5.x
- 4.x
- 3.x
- 2.x
- appveyor-testing
# Build environment
environment:
global:
MPLBACKEND: "Agg"
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
PYTHON: "C:\\Python27"
PYTHON_ARCH: "32"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PYTHON: "C:\\Python35"
PYTHON_ARCH: "32"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PYTHON: "C:\\Python36"
PYTHON_ARCH: "32"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PYTHON: "C:\\Python37"
PYTHON_ARCH: "32"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
PYTHON: "C:\\Python27-x64"
PYTHON_ARCH: "64"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PYTHON: "C:\\Python35-x64"
PYTHON_ARCH: "64"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PYTHON: "C:\\Python36-x64"
PYTHON_ARCH: "64"
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PYTHON: "C:\\Python37-x64"
PYTHON_ARCH: "64"
# PR settings
pull_requests:
do_not_increment_build_number: true
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." }
# Print Python version
- cmd: "%PYTHON%\\python -c \"import sys; print(sys.version)\""
# Upgrade to the latest version of pip to avoid it displaying warnings about it being out of date.
- cmd: "%PYTHON%\\python -m pip install --disable-pip-version-check --upgrade pip"
# Upgrade setuptools and wheel
- cmd: "%PYTHON%\\python -m pip install --upgrade setuptools wheel"
# Install pytest
- cmd: "%PYTHON%\\python -m pip install pytest"
# Install requirements before the build
before_build:
- cmd: "%PYTHON%\\python -m pip install -r requirements.txt"
# Build and install
build_script:
- cmd: "%PYTHON%\\python -m pip install . --install-option=\"--use-cython\""
# Test using pytest
test_script:
- cmd: "%PYTHON%\\python setup.py test"
# Build the wheel package
after_test:
- cmd: "%PYTHON%\\python setup.py bdist_wheel --use-cython"
# Push binary wheels as artifacts
artifacts:
- path: dist\*