forked from opencv/opencv-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
201 lines (157 loc) · 4.69 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
environment:
USER:
secure: fXgF9uyy6sT0JoVOR7BoqA==
PASS:
secure: 0bXSOVjf9x8L7nErTivu92TF1FwNosTjFJQPmxp8Dys=
matrix:
- PYTHON: "C:\\Python36"
ENABLE_CONTRIB: 0
ENABLE_HEADLESS: 0
- PYTHON: "C:\\Python36-x64"
ENABLE_CONTRIB: 0
ENABLE_HEADLESS: 0
- PYTHON: "C:\\Python37"
ENABLE_CONTRIB: 0
ENABLE_HEADLESS: 0
- PYTHON: "C:\\Python37-x64"
ENABLE_CONTRIB: 0
ENABLE_HEADLESS: 0
- PYTHON: "C:\\Python38"
ENABLE_CONTRIB: 0
ENABLE_HEADLESS: 0
- PYTHON: "C:\\Python38-x64"
ENABLE_CONTRIB: 0
ENABLE_HEADLESS: 0
- PYTHON: "C:\\Python39"
ENABLE_CONTRIB: 0
ENABLE_HEADLESS: 0
- PYTHON: "C:\\Python39-x64"
ENABLE_CONTRIB: 0
ENABLE_HEADLESS: 0
- PYTHON: "C:\\Python36"
ENABLE_CONTRIB: 1
ENABLE_HEADLESS: 0
- PYTHON: "C:\\Python36-x64"
ENABLE_CONTRIB: 1
ENABLE_HEADLESS: 0
- PYTHON: "C:\\Python37"
ENABLE_CONTRIB: 1
ENABLE_HEADLESS: 0
- PYTHON: "C:\\Python37-x64"
ENABLE_CONTRIB: 1
ENABLE_HEADLESS: 0
- PYTHON: "C:\\Python38"
ENABLE_CONTRIB: 1
ENABLE_HEADLESS: 0
- PYTHON: "C:\\Python38-x64"
ENABLE_CONTRIB: 1
ENABLE_HEADLESS: 0
- PYTHON: "C:\\Python39"
ENABLE_CONTRIB: 1
ENABLE_HEADLESS: 0
- PYTHON: "C:\\Python39-x64"
ENABLE_CONTRIB: 1
ENABLE_HEADLESS: 0
- PYTHON: "C:\\Python36"
ENABLE_CONTRIB: 0
ENABLE_HEADLESS: 1
- PYTHON: "C:\\Python36-x64"
ENABLE_CONTRIB: 0
ENABLE_HEADLESS: 1
- PYTHON: "C:\\Python37"
ENABLE_CONTRIB: 0
ENABLE_HEADLESS: 1
- PYTHON: "C:\\Python37-x64"
ENABLE_CONTRIB: 0
ENABLE_HEADLESS: 1
- PYTHON: "C:\\Python38"
ENABLE_CONTRIB: 0
ENABLE_HEADLESS: 1
- PYTHON: "C:\\Python38-x64"
ENABLE_CONTRIB: 0
ENABLE_HEADLESS: 1
- PYTHON: "C:\\Python39"
ENABLE_CONTRIB: 0
ENABLE_HEADLESS: 1
- PYTHON: "C:\\Python39-x64"
ENABLE_CONTRIB: 0
ENABLE_HEADLESS: 1
- PYTHON: "C:\\Python36"
ENABLE_CONTRIB: 1
ENABLE_HEADLESS: 1
- PYTHON: "C:\\Python36-x64"
ENABLE_CONTRIB: 1
ENABLE_HEADLESS: 1
- PYTHON: "C:\\Python37"
ENABLE_CONTRIB: 1
ENABLE_HEADLESS: 1
- PYTHON: "C:\\Python37-x64"
ENABLE_CONTRIB: 1
ENABLE_HEADLESS: 1
- PYTHON: "C:\\Python38"
ENABLE_CONTRIB: 1
ENABLE_HEADLESS: 1
- PYTHON: "C:\\Python38-x64"
ENABLE_CONTRIB: 1
ENABLE_HEADLESS: 1
- PYTHON: "C:\\Python39"
ENABLE_CONTRIB: 1
ENABLE_HEADLESS: 1
- PYTHON: "C:\\Python39-x64"
ENABLE_CONTRIB: 1
ENABLE_HEADLESS: 1
matrix:
fast_finish: true
install:
- ps: |
if (-not (Test-Path $env:PYTHON)) {
curl -o install_python.ps1 https://raw.githubusercontent.com/matthew-brett/multibuild/devel/install_python.ps1
.\install_python.ps1
}
- ps: if (-not (Test-Path $env:PYTHON)) { throw "No $env:PYTHON" }
- "set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- python --version
build_script:
- cmd: |
"%PYTHON%\\python.exe" -m pip install --upgrade pip
"%PYTHON%\\python.exe" -m pip install --upgrade setuptools
set "CI_BUILD=1" && "%PYTHON%\\python.exe" -m pip wheel --wheel-dir=%cd%\dist . --verbose
before_test:
- ps: |
cd ${Env:APPVEYOR_BUILD_FOLDER}\tests
$env:PYTHONWARNINGS = "ignore:::pip._internal.cli.base_command"
&"${Env:PYTHON}\\python.exe" -m pip install --user --no-warn-script-location (ls "../dist/opencv_*.whl")
if ($LastExitCode -ne 0) {throw $LastExitCode}
test_script:
- cmd: |
cd %APPVEYOR_BUILD_FOLDER%\tests
"%PYTHON%\\python.exe" -m unittest test
artifacts:
- path: dist\opencv*.whl
name: wheels
deploy_script:
- ps: |
if (${Env:APPVEYOR_REPO_TAG} -eq "true") {
cd ${Env:APPVEYOR_BUILD_FOLDER}
if (${Env:ENABLE_CONTRIB} -eq 0) {
if (${Env:ENABLE_HEADLESS} -eq 0) {
echo "This is a default build. Deployment will be done to PyPI entry opencv-python."
}
else {
echo "This is a headless build. Deployment will be done to PyPI entry opencv-python-headless."
}
}
else {
if (${Env:ENABLE_HEADLESS} -eq 0) {
echo "This is a contrib build. Deployment will be done to PyPI entry opencv-contrib-python."
}
else {
echo "This is a headless contrib build. Deployment will be done to PyPI entry opencv-contrib-python-headless."
}
}
&"${Env:PYTHON}\\python.exe" -m pip install twine
&"${Env:PYTHON}\\python.exe" -m twine upload -u ${Env:USER} -p ${Env:PASS} --skip-existing dist/opencv*
}
else {
echo "Tag not set, deployment skipped."
}