forked from mcepl/M2Crypto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
148 lines (116 loc) · 4.94 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
environment:
global:
# PyPI login environment:
USER:
secure: oqWqarxnd4H23FMywnlQeg==
PASS:
secure: j/VSxdYJ7mdR44u8OdywLg==
matrix:
# Pre-installed Python versions, which Appveyor may upgrade to
# a later point release.
- PYTHON: "C:\\Python36"
PYTHON_VERSION: "3.6.x" # currently 3.6.4
PYTHON_ARCH: "32"
OPENSSL_PATH: "C:\\OpenSSL-1-1-Win32"
PYWIN32: "pywin32-222.win32-py3.6.exe"
PYWIN32_RELEASE: b222
- PYTHON: "C:\\Python36-x64"
PYTHON_VERSION: "3.6.x" # currently 3.6.4
PYTHON_ARCH: "64"
OPENSSL_PATH: "C:\\OpenSSL-1-1-Win64"
PYWIN32: "pywin32-222.win-amd64-py3.6.exe"
PYWIN32_RELEASE: b222
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- PYTHON: "C:\\Python27"
PYTHON_VERSION: "2.7.x" # currently 2.7.9
PYTHON_ARCH: "32"
OPENSSL_PATH: "C:\\OpenSSL-Win32"
PYWIN32: "pywin32-222.win32-py2.7.exe"
PYWIN32_RELEASE: b222
- PYTHON: "C:\\Python27"
PYTHON_VERSION: "2.7.x" # currently 2.7.9
PYTHON_ARCH: "32"
OPENSSL_PATH: "C:\\OpenSSL-1-1-Win32"
PYWIN32: "pywin32-222.win32-py2.7.exe"
PYWIN32_RELEASE: b222
- PYTHON: "C:\\Python27-x64"
PYTHON_VERSION: "2.7.x" # currently 2.7.9
PYTHON_ARCH: "64"
OPENSSL_PATH: "C:\\OpenSSL-1-1-Win64"
PYWIN32: "pywin32-222.win-amd64-py2.7.exe"
PYWIN32_RELEASE: b222
- PYTHON: "C:\\Python27-x64"
PYTHON_VERSION: "2.7.x" # currently 2.7.9
PYTHON_ARCH: "64"
OPENSSL_PATH: "C:\\OpenSSL-1-1-Win64"
PYWIN32: "pywin32-222.win-amd64-py2.7.exe"
PYWIN32_RELEASE: b222
# Also test a Python version not pre-installed
# See: https://github.com/ogrisel/python-appveyor-demo/issues/10
- PYTHON: "C:\\Python26"
PYTHON_VERSION: "2.6.6"
PYTHON_ARCH: "32"
OPENSSL_PATH: "C:\\OpenSSL-Win32"
PYWIN32: "pywin32-221.win32-py2.6.exe"
PYWIN32_RELEASE: b221
nuget:
account_feed: true
install:
# Install non-python dependencies using chocolatey package manager
- choco install -r -y swig
# Install Python (from the official .msi of http://python.org) and pip when
# not already installed.
- ps: if (-not(Test-Path($env:PYTHON))) { & appveyor\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;%PATH%;%OPENSSL_PATH%\\bin"
# Check that we have the expected version and architecture for Python
- "python --version"
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
# Install the build dependencies of the project. If some dependencies contain
# compiled extensions and are not provided as pre-built wheel packages,
# pip will build them from source using the MSVC compiler matching the
# target Python version and architecture
- "%PYTHON%\\Scripts\\pip.exe install -r dev-requirements.txt"
- ECHO "Install OpenSSL 1.1.0 32bit"
- curl -o Win32OpenSSL-1_1_0g.exe -sSL https://slproweb.com/download/Win32OpenSSL-1_1_0g.exe
- "Win32OpenSSL-1_1_0g.exe /silent /verysilent /DIR=C:\\OpenSSL-1-1-Win32"
- ECHO "Install OpenSSL 1.1.0 64bit"
- curl -o Win64OpenSSL-1_1_0g.exe -sSL https://slproweb.com/download/Win64OpenSSL-1_1_0g.exe
- "Win64OpenSSL-1_1_0g.exe /silent /verysilent /DIR=C:\\OpenSSL-1-1-Win64"
# The pypi version will not install on 2.6
# - "%CMD_IN_ENV% pip install pypiwin32"
- ECHO "Install pywin32"
- curl -o "%PYWIN32%" -sSL "https://github.com/mhammond/pywin32/releases/download/%PYWIN32_RELEASE%/%PYWIN32%"
- "%PYTHON%\\Scripts\\easy_install.exe %PYWIN32%"
#- mkdir pywin32
#- 7z x "%PYWIN32%" -opywin32
#- xcopy /e "pywin32\\PLATLIB" "%PYTHON%\\Lib\\site-packages"
- ECHO "Filesystem root:"
- ps: "ls \"C:/\""
- ps: "ls \"C:/OpenSSL-Win32\""
- ECHO "Installed SDKs:"
- ps: if (Test-Path "C:/Program Files/Microsoft SDKs/Windows") { ls "C:/Program Files/Microsoft SDKs/Windows" }
- ECHO "Appveyor OpenSSL Version (%OPENSSL_VERSION%)"
- "%OPENSSL_PATH%/bin/openssl.exe version"
- ECHO "Python OpenSSL Version (%PYTHON%)"
- "%PYTHON%\\python.exe -c \"import ssl; print(getattr(ssl, 'OPENSSL_VERSION', None))\""
build_script:
- "%PYTHON%\\python.exe setup.py build --openssl=\"%OPENSSL_PATH%\" --bundledlls"
test_script:
- "%PYTHON%\\python.exe setup.py test"
after_test:
# If tests are successful, create a whl package for the project.
- "%PYTHON%\\python.exe setup.py bdist_wheel bdist_wininst bdist_msi"
- ps: "ls dist"
artifacts:
# Archive the generated wheel package in the ci.appveyor.com build report.
- path: dist\*
- path: SWIG/_m2crypto_wrap.c
name: _m2crypto_wrap.zip
type: zip
after_build:
- ps: Get-ChildItem SWIG\_m2crypto_wrap.c | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
on_failure:
- ps: Get-ChildItem SWIG\_m2crypto_wrap.c | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }