-
Notifications
You must be signed in to change notification settings - Fork 6
/
appveyor.yml
166 lines (140 loc) · 5.65 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
clone_depth: 50
max_jobs: 8
shallow_clone: true
build:
parallel: true
verbosity: minimal
# The VS 2019 image doesn't have
# the MSVC needed for Python 2.7.
# Note that this contains nothing newer than Python 3.8; there is no
# image that has all of our supported versions, so we have to
# customize per version.
image: Visual Studio 2015
environment:
global:
APPVEYOR_SAVE_CACHE_ON_ERROR: "true"
# 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 interpreter
# See: http://stackoverflow.com/a/13751649/163740
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\scripts\\run_with_env.cmd"
# Use a fixed hash seed for reproducability
PYTHONHASHSEED: 8675309
ZOPE_INTERFACE_STRICT_IRO: 1
# Don't get warnings about Python 2 support being deprecated. We
# know.
PIP_NO_PYTHON_VERSION_WARNING: 1
PIP_UPGRADE_STRATEGY: eager
# Enable this if debugging a resource leak. Otherwise
# it slows things down.
# PYTHONTRACEMALLOC: 10
##
# Upload settings for twine.
TWINE_USERNAME: __token__
TWINE_PASSWORD:
secure: uXZ6Juhz2hElaTsaJ2HnetZqz0mmNO3phE2IV3Am7hgfOAbaM4x3IeNSS7bMWL27TMGsOndOrKNgQTodirUt+vLZzZ+NYKjMImuM04P68BfIGDeZlA8ynYWG0vtjpqUTfrbhppyLuypHmzusV7+cnlSq4uaE3BtZ+bSwUZUYaeEQRAnCivzLki318kzOCLUUjDuyPSgyTdV+Z4GXOtUzGInvsbiU7k+9PbpE10915afTg82GUHHYn9BC5laBvxI1A07HX/JJZ6QjwS9+KjmEtw==
matrix:
# http://www.appveyor.com/docs/installed-software#python
# Fully supported 64-bit versions, with testing. This should be
# all the current (non EOL) versions.
- PYTHON: "C:\\Python312-x64"
PYTHON_VERSION: "3.12.0b3"
PYTHON_ARCH: "64"
PYTHON_EXE: python
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
- PYTHON: "C:\\Python311-x64"
PYTHON_VERSION: "3.11.0"
PYTHON_ARCH: "64"
PYTHON_EXE: python
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
- PYTHON: "C:\\Python310-x64"
PYTHON_VERSION: "3.10.0"
PYTHON_ARCH: "64"
PYTHON_EXE: python
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
- PYTHON: "C:\\Python39-x64"
PYTHON_VERSION: "3.9.x"
PYTHON_ARCH: "64"
PYTHON_EXE: python
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- PYTHON: "C:\\Python38-x64"
PYTHON_VERSION: "3.8.x"
PYTHON_ARCH: "64"
PYTHON_EXE: python
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- PYTHON: "C:\\Python37-x64"
PYTHON_VERSION: "3.7.x"
PYTHON_ARCH: "64"
PYTHON_EXE: python
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# 32-bit, wheel only (no testing)
- PYTHON: "C:\\Python39"
PYTHON_VERSION: "3.9.x"
PYTHON_ARCH: "32"
PYTHON_EXE: python
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- PYTHON: "C:\\Python38"
PYTHON_VERSION: "3.8.x"
PYTHON_ARCH: "32"
PYTHON_EXE: python
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- PYTHON: "C:\\Python37"
PYTHON_VERSION: "3.7.x"
PYTHON_ARCH: "32"
PYTHON_EXE: python
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
install:
- ECHO "Filesystem root:"
- ps: "ls \"C:/\""
- ECHO "Installed SDKs:"
- ps: "if(Test-Path(\"C:/Program Files/Microsoft SDKs/Windows\")) {ls \"C:/Program Files/Microsoft SDKs/Windows\";}"
# Install Python (from the official .msi of http://python.org) and pip when
# not already installed.
# PyPy portion based on https://github.com/wbond/asn1crypto/blob/master/appveyor.yml
- ps:
$env:PYTMP = "${env:TMP}\py";
if (!(Test-Path "$env:PYTMP")) {
New-Item -ItemType directory -Path "$env:PYTMP" | Out-Null;
}
if ("${env:PYTHON_ID}" -eq "pypy") {
if (!(Test-Path "${env:PYTMP}\pypy2-v7.3.1-win32.zip")) {
(New-Object Net.WebClient).DownloadFile('https://bitbucket.org/pypy/pypy/downloads/pypy2.7-v7.3.1-win32.zip', "${env:PYTMP}\pypy2-v7.3.1-win32.zip");
}
7z x -y "${env:PYTMP}\pypy2-v7.3.1-win32.zip" -oC:\ | Out-Null;
}
elseif (-not(Test-Path($env:PYTHON))) {
& scripts\install.ps1;
}
# Prepend newly installed Python to the PATH of this build (this cannot be
# done from inside the powershell script as it would require to restart
# the parent CMD process).
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PYTHON%\\bin;%PATH%"
- "SET PYEXE=%PYTHON%\\%PYTHON_EXE%.exe"
# Check that we have the expected version and architecture for Python
- "%PYEXE% --version"
- "%PYEXE% -c \"import struct; print(struct.calcsize('P') * 8)\""
# Upgrade to the latest version of pip to avoid it displaying warnings
# about it being out of date. Do this here instead of above in
# powershell because the annoying 'DEPRECATION:blahblahblah 2.7 blahblahblah'
# breaks powershell.
- "%CMD_IN_ENV% %PYEXE% -mensurepip -U --user"
- "%CMD_IN_ENV% %PYEXE% -mpip install -U --user pip"
- ps: "if(Test-Path(\"${env:PYTHON}\\bin\")) {ls ${env:PYTHON}\\bin;}"
- ps: "if(Test-Path(\"${env:PYTHON}\\Scripts\")) {ls ${env:PYTHON}\\Scripts;}"
build_script:
# Build the compiled extension
# Try to get some things that don't wind up in the pip cache as
# built wheels if they're built during an isolated build.
- "%CMD_IN_ENV% %PYEXE% -m pip install --pre -U wheel cython setuptools"
- "%PYEXE% -m pip install --pre -U -e .[test]"
- "%PYEXE% -W ignore setup.py -q bdist_wheel"
test_script:
- python -m zope.testrunner --test-path=src
artifacts:
- path: 'dist\*.whl'
name: wheel
deploy_script:
- ps: if ($env:APPVEYOR_REPO_TAG -eq $TRUE) { pip install twine; twine upload --skip-existing dist/* }
deploy: on
cache:
- "%TMP%\\py\\"
- '%LOCALAPPDATA%\pip\Cache -> appveyor.yml,setup.py'