-
Notifications
You must be signed in to change notification settings - Fork 46
/
appveyor.yml
152 lines (126 loc) · 5.19 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
clone_depth: 50
max_jobs: 8
shallow_clone: true
build:
parallel: true
verbosity: minimal
image: Visual Studio 2022
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 .\\.travis\\run_with_env.cmd"
# Use a fixed hash seed for reproducability
PYTHONHASHSEED: 8675309
MYSQL_PWD: "Password12!"
PGPASSWORD: "Password12!"
PGUSER: "postgres"
# 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: uXZ6Juhz2hElaTsaJ2Hnero9s3xuqTVBK5B3yQoBeAYqcAdgBG54Edzxpkootm/o44FqBVYm0kAXYkV71PCrtm6uB/K3LS4ZUHxBUYnjGGKfelf1igdYjeMOqk6QrHGSaq9T70YovVYWyz6FQebySxT+aV/lhgq/WMwT+1tF/DaEP9BKF0j500bDZDDYd7+1Hm+Rffa6q5sEQl6IvGF0M7G+pwo6f66DdmCD4NwYhGHLuj9kNFfsl7YNCE++/Ww3gnWFy73MXxOtOE0KHJb3WA==
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:\\Python313-x64"
PYTHON_VERSION: "3.13.0"
PYTHON_ARCH: "64"
PYTHON_EXE: python
- PYTHON: "C:\\Python312-x64"
PYTHON_VERSION: "3.12.0"
PYTHON_ARCH: "64"
PYTHON_EXE: python
- PYTHON: "C:\\Python311-x64"
PYTHON_VERSION: "3.11.0"
PYTHON_ARCH: "64"
PYTHON_EXE: python
- PYTHON: "C:\\Python310-x64"
PYTHON_VERSION: "3.10.0"
PYTHON_ARCH: "64"
PYTHON_EXE: python
- PYTHON: "C:\\Python39-x64"
PYTHON_VERSION: "3.9.x"
PYTHON_ARCH: "64"
PYTHON_EXE: python
# The images have moved to MySQL8 only, and that cannot
# currently (Dec 2023) be started with the services: syntax.
# See https://github.com/appveyor/ci/issues/3834
services:
- postgresql13
install:
- ECHO "Filesystem root:"
- ps: "ls \"C:/\""
- ps: "ls \"C:/Program Files/\""
- ps: "ls \"C:/Program Files/MySQL\""
- ps: "ls \"C:/Program Files/PostgreSQL\""
- ps: "ls \"C:/Program Files (x86)/\""
- 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;
}
# If commands start failing, like psql isn't found, tweak the PATH here.
- "SET PATH=C:\\Program Files\\PostgreSQL\\13\\bin;C:\\Program Files\\MySql\\MySQL Server 8.0\\bin;%PATH%"
- "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 sqlite3; print(sqlite3.sqlite_version)\""
- "%PYEXE% -c \"import struct; print(struct.calcsize('P') * 8)\""
- "%CMD_IN_ENV% %PYEXE% -m pip install --disable-pip-version-check -U pip"
# pycparser can't be built correctly in an isolated environment.
# See
# https://ci.appveyor.com/project/denik/gevent/builds/23810605/job/83aw4u67artt002b#L602
# So we violate DRY and repeate some requirements in order to use
# --no-build-isolation
- "%CMD_IN_ENV% %PYEXE% -m pip install -U pycparser wheel \"cython>=3.0\" setuptools cffi twine"
# Have to manually start MySQL8. See above.
- ECHO "Starting MySQL 8"
- ps: Start-Service MySQL80
build_script:
# Build the compiled extension
# pip 19.1 (exactly) won't work; but 19.1.1 should with
# --no-use-pep517
# Here, we only want to install one driver; we only support the best
# driver on Windows.
- if not "%GWHEEL_ONLY%"=="true" %CMD_IN_ENV% %PYEXE% -m pip install -U -e .[test,postgresql,mysql]
test_script:
- if not "%GWHEEL_ONLY%"=="true" cmd /c .travis\mysql.cmd
- if not "%GWHEEL_ONLY%"=="true" cmd /c .travis\postgres.cmd
- if not "%GWHEEL_ONLY%"=="true" %PYEXE% -m zope.testrunner --test-path=src -v --color --slow-test 3
after_test:
- "%CMD_IN_ENV% %PYEXE% setup.py bdist_wheel -d dist"
- ps: "ls dist"
artifacts:
- path: dist\RelStorage*
cache:
- "%TMP%\\py\\"
- '%LOCALAPPDATA%\pip\Cache'
deploy_script:
- ps: if ($env:APPVEYOR_REPO_TAG -eq $TRUE) { twine upload --skip-existing dist/RelStorage* }
deploy: on