-
Notifications
You must be signed in to change notification settings - Fork 154
/
appveyor.yml
387 lines (219 loc) · 10.6 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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
image:
- Visual Studio 2019
- Ubuntu
- macos-monterey
init:
# Uncomment the line below to enable RDP access on AppVeyor
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
branches:
only:
- main
- /^rel\-*/
pull_requests:
do_not_increment_build_number: true
artifacts:
- path: dist/*.whl
environment:
APPVEYOR_YML_DISABLE_PS_LINUX: true
matrix:
fast_finish: true
build_script:
# Linux and macOS builds.
- sh: >-
# =======================================================================
# Set up environment variables
# =======================================================================
DT_HARNESS="AppVeyor"
MAIN_BUILD_ID=`git rev-list --count main`
# Do not take into account the AppVeyor's additional merge commit
BRANCH_BUILD_ID=`expr $MAIN_BUILD_ID - 1`
if [ ! -z $APPVEYOR_PULL_REQUEST_NUMBER ]; then
if [ APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH == "rel\-"* ]; then
export DT_RELEASE="True"
else
export DT_BUILD_SUFFIX="PR$APPVEYOR_PULL_REQUEST_NUMBER.$BRANCH_BUILD_ID"
fi
elif [ APPVEYOR_REPO_BRANCH == "main" ]; then
export DT_BUILD_NUMBER=$MAIN_BUILD_ID
elif [ APPVEYOR_REPO_BRANCH == "rel\-"* ]; then
export DT_RELEASE="True"
else
export DT_BUILD_SUFFIX="$APPVEYOR_REPO_BRANCH.$BRANCH_BUILD_ID"
fi
# =======================================================================
# Print debug information
# =======================================================================
echo "APPVEYOR_REPO_BRANCH = $APPVEYOR_REPO_BRANCH"
echo "APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH = $APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH"
echo "APPVEYOR_PULL_REQUEST_NUMBER = $APPVEYOR_PULL_REQUEST_NUMBER"
echo "MAIN_BUILD_ID = $MAIN_BUILD_ID"
echo "BRANCH_BUILD_ID = $BRANCH_BUILD_ID"
echo "DT_RELEASE = $DT_RELEASE"
echo "DT_BUILD_NUMBER = $DT_BUILD_NUMBER"
echo "DT_BUILD_SUFFIX = $DT_BUILD_SUFFIX"
# =======================================================================
# Build and test wheel for Python 3.11
# =======================================================================
source $HOME/venv3.11/bin/activate
python -V
python ci/ext.py wheel
DT_WHEEL=`ls dist/*-cp311-*.whl`
echo "----- _build_info.py for Python 3.11 ------------------------------"
cat src/datatable/_build_info.py
echo "------------------------------------------------------------------"
python -m pip install --upgrade pip
python -m pip install $DT_WHEEL
python -m pip install pytest docutils pandas pyarrow
python -m pytest -ra --maxfail=10 -Werror -vv --showlocals ./tests/
# Windows builds.
#
# We use PowerShell that has more powerful syntax
# than the standard command prompt. Unfortunately, PowerShell only takes
# into account exit code of the last command and, if other commands fail,
# the build can still be marked as green. Partially this problem is solved
# by setting `$ErrorActionPreference` to `"Stop"`, that works well with
# cmdlets. However, ultimately every PowerShell command should be followed
# by the check `if(!$?) { Exit $LASTEXITCODE }`, that will stop the build
# on the first failed command. Since we don't want to make the code too
# cumbersome, here we only check the exit status of `pytest` that is still
# a pretty good indicator.
- ps: >-
# =======================================================================
# Set up environment variables
# =======================================================================
$ErrorActionPreference = "Stop"
$env:DT_HARNESS = "AppVeyor"
$DEFAULT_PATH = $env:PATH
$MAIN_BUILD_ID = git rev-list --count main
# Do not take into account the AppVeyor's additional merge commit
$BRANCH_BUILD_ID = (git rev-list --count main) - 1
if ($env:APPVEYOR_PULL_REQUEST_NUMBER -ne $null) {
if ($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH -match "^rel\-") {
$env:DT_RELEASE = "True"
} else {
$env:DT_BUILD_SUFFIX = "PR$env:APPVEYOR_PULL_REQUEST_NUMBER.$BRANCH_BUILD_ID"
}
}
elseif ($env:APPVEYOR_REPO_BRANCH -eq "main") {
$env:DT_BUILD_NUMBER = $MAIN_BUILD_ID
}
elseif ($env:APPVEYOR_REPO_BRANCH -match "^rel\-") {
$env:DT_RELEASE = "True"
}
else {
$env:DT_BUILD_SUFFIX = "$env:APPVEYOR_REPO_BRANCH.$BRANCH_BUILD_ID"
}
# =======================================================================
# Print debug information
# =======================================================================
echo "DEFAULT_PATH = $DEFAULT_PATH"
echo "APPVEYOR_REPO_BRANCH = $env:APPVEYOR_REPO_BRANCH"
echo "APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH = $env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH"
echo "APPVEYOR_PULL_REQUEST_NUMBER = $env:APPVEYOR_PULL_REQUEST_NUMBER"
echo "MAIN_BUILD_ID = $MAIN_BUILD_ID"
echo "BRANCH_BUILD_ID = $BRANCH_BUILD_ID"
echo "DT_RELEASE = $env:DT_RELEASE"
echo "DT_BUILD_NUMBER = $env:DT_BUILD_NUMBER"
echo "DT_BUILD_SUFFIX = $env:DT_BUILD_SUFFIX"
# =======================================================================
# Build and test wheel for Python 3.7
# =======================================================================
$env:PATH = "C:/Python37-x64;C:/Python37-x64/Scripts;$DEFAULT_PATH"
python -V
python ci/ext.py wheel
$DT_WHEEL = ls dist/*-cp37-*.whl
echo "DT_WHEEL = $DT_WHEEL"
echo "----- _build_info.py for Python 3.7 ------------------------------"
cat src/datatable/_build_info.py
echo "------------------------------------------------------------------"
python -m pip install --upgrade pip
python -m pip install $DT_WHEEL
python -m pip install pytest docutils pandas pyarrow
python -m pytest -ra --maxfail=10 -Werror -vv --showlocals ./tests/
if(!$?) { Exit $LASTEXITCODE }
python -m pip uninstall -y $DT_WHEEL
# =======================================================================
# Build and test wheel for Python 3.8
# =======================================================================
$env:PATH = "C:/Python38-x64;C:/Python38-x64/Scripts;$DEFAULT_PATH"
python -V
python ci/ext.py wheel
$DT_WHEEL = ls dist/*-cp38-*.whl
echo "DT_WHEEL = $DT_WHEEL"
echo "----- _build_info.py for Python 3.8 ------------------------------"
cat src/datatable/_build_info.py
echo "------------------------------------------------------------------"
python -m pip install --upgrade pip
python -m pip install $DT_WHEEL
python -m pip install pytest docutils pandas pyarrow
python -m pytest -ra --maxfail=10 -Werror -vv --showlocals ./tests/
if(!$?) { Exit $LASTEXITCODE }
python -m pip uninstall -y $DT_WHEEL
# =======================================================================
# Build and test debug wheel for Python 3.8
# =======================================================================
$env:PATH = "C:/Python38-x64;C:/Python38-x64/Scripts;$DEFAULT_PATH"
python -V
python ci/ext.py debugwheel
$DT_WHEEL = ls dist/*debug-cp38-*.whl
echo "DT_WHEEL = $DT_WHEEL"
echo "----- _build_info.py for Python 3.8 debug wheel ------------------"
cat src/datatable/_build_info.py
echo "------------------------------------------------------------------"
python -m pip install --upgrade pip
python -m pip install $DT_WHEEL
python -m pip install pytest docutils pandas pyarrow
python -m pytest -ra --maxfail=10 -Werror -vv --showlocals ./tests/
if(!$?) { Exit $LASTEXITCODE }
python -m pip uninstall -y $DT_WHEEL
# =======================================================================
# Build and test wheel for Python 3.9
# =======================================================================
$env:PATH = "C:/Python39-x64;C:/Python39-x64/Scripts;$DEFAULT_PATH"
python -V
python ci/ext.py wheel
$DT_WHEEL = ls dist/*-cp39-*.whl
echo "DT_WHEEL = $DT_WHEEL"
echo "----- _build_info.py for Python 3.9 ------------------------------"
cat src/datatable/_build_info.py
echo "------------------------------------------------------------------"
python -m pip install --upgrade pip
python -m pip install $DT_WHEEL
python -m pip install pytest docutils pandas pyarrow
python -m pytest -ra --maxfail=10 -Werror -vv --showlocals ./tests/
if(!$?) { Exit $LASTEXITCODE }
python -m pip uninstall -y $DT_WHEEL
# =======================================================================
# Build and test wheel for Python 3.10
# =======================================================================
$env:PATH = "C:/Python310-x64;C:/Python310-x64/Scripts;$DEFAULT_PATH"
python -V
python ci/ext.py wheel
$DT_WHEEL = ls dist/*-cp310-*.whl
echo "DT_WHEEL = $DT_WHEEL"
echo "----- _build_info.py for Python 3.10 ------------------------------"
cat src/datatable/_build_info.py
echo "------------------------------------------------------------------"
python -m pip install --upgrade pip
python -m pip install $DT_WHEEL
python -m pip install pytest docutils pandas pyarrow
python -m pytest -ra --maxfail=10 -Werror -vv --showlocals ./tests/
if(!$?) { Exit $LASTEXITCODE }
python -m pip uninstall -y $DT_WHEEL
# =======================================================================
# Build and test wheel for Python 3.11
# =======================================================================
$env:PATH = "C:/Python311-x64;C:/Python311-x64/Scripts;$DEFAULT_PATH"
python -V
python ci/ext.py wheel
$DT_WHEEL = ls dist/*-cp311-*.whl
echo "DT_WHEEL = $DT_WHEEL"
echo "----- _build_info.py for Python 3.11 ------------------------------"
cat src/datatable/_build_info.py
echo "------------------------------------------------------------------"
python -m pip install --upgrade pip
python -m pip install $DT_WHEEL
python -m pip install pytest docutils pandas pyarrow
python -m pytest -ra --maxfail=10 -Werror -vv --showlocals ./tests/
if(!$?) { Exit $LASTEXITCODE }
python -m pip uninstall -y $DT_WHEEL