forked from mymarilyn/clickhouse-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
381 lines (341 loc) · 12.9 KB
/
.travis.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
env:
- VERSION=20.3.7.46
- VERSION=19.16.17.80
- VERSION=19.15.3.6
- VERSION=19.9.2.4 # allow_suspicious_low_cardinality_types
- VERSION=19.8.3.8 # SimpleAggregateFunction
- VERSION=19.3.3
- VERSION=18.12.17
- VERSION=18.12.13
- VERSION=18.10.3
- VERSION=18.6.0
- VERSION=18.5.1
- VERSION=18.4.0
- VERSION=18.1.0
- VERSION=1.1.54394
- VERSION=1.1.54390
- VERSION=1.1.54388
- VERSION=1.1.54385
- VERSION=1.1.54383
# - VERSION=1.1.54381
# - VERSION=1.1.54380
# - VERSION=1.1.54378 client's image miss tzdata package: https://github.com/yandex/ClickHouse/commit/1bf49fe8446c7dea95beaef2b131e6c6708b0b62#diff-cc737435a5ba74620a889b7718f39a80
# - VERSION=1.1.54343
# - VERSION=1.1.54342
## - VERSION=1.1.54337 Broken network
# - VERSION=1.1.54327
# - VERSION=1.1.54310
# - VERSION=1.1.54304
# - VERSION=1.1.54292
# - VERSION=1.1.54289
# - VERSION=1.1.54284
# - VERSION=1.1.54282
language: python
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
- "3.7"
- "3.8"
- "3.9-dev"
- "pypy2.7-5.10.0"
- "pypy3.5"
cache: pip
services:
- docker
install:
- docker run -e "TZ=Europe/Moscow" -d -p 127.0.0.1:9000:9000 --name test-clickhouse-server --ulimit nofile=262144:262144 yandex/clickhouse-server:$VERSION
- docker run -d --entrypoint "/bin/sh" --name test-clickhouse-client --link test-clickhouse-server:clickhouse-server yandex/clickhouse-client:$VERSION -c 'while :; do sleep 1; done'
- docker ps -a
# Faking clickhouse-client real communication with container via docker exec.
- echo -e '#!/bin/bash\n\ndocker exec -e "`env | grep ^TZ=`" test-clickhouse-client clickhouse-client "$@"' | sudo tee /usr/local/bin/clickhouse-client > /dev/null
- sudo chmod +x /usr/local/bin/clickhouse-client
# Overriding setup.cfg. Set host=clickhouse-server
- sed -i 's/^host=localhost$/host=clickhouse-server/' setup.cfg
# Make host think that clickhouse-server is localhost
- echo '127.0.0.1 clickhouse-server' | sudo tee /etc/hosts > /dev/null
- pip install --upgrade pip setuptools
- pip install flake8 flake8-print coveralls cython
script:
- flake8 && coverage run --source=clickhouse_driver setup.py test
after_success:
coveralls
jobs:
include:
- stage: valgrind
name: Valgrind check
os: linux
language: python
python:
- "3.6"
addons:
apt:
packages:
- valgrind
install:
- docker run -e "TZ=Europe/Moscow" -d -p 127.0.0.1:9000:9000 --name test-clickhouse-server --ulimit nofile=262144:262144 yandex/clickhouse-server:$VERSION
- docker run -d --entrypoint "/bin/sh" --name test-clickhouse-client --link test-clickhouse-server:clickhouse-server yandex/clickhouse-client:$VERSION -c 'while :; do sleep 1; done'
- docker ps -a
# Faking clickhouse-client real communication with container via docker exec.
- echo -e '#!/bin/bash\n\ndocker exec -e "`env | grep ^TZ=`" test-clickhouse-client clickhouse-client "$@"' | sudo tee /usr/local/bin/clickhouse-client > /dev/null
- sudo chmod +x /usr/local/bin/clickhouse-client
# Overriding setup.cfg. Set host=clickhouse-server
- sed -i 's/^host=localhost$/host=clickhouse-server/' setup.cfg
# Make host think that clickhouse-server is localhost
- echo '127.0.0.1 clickhouse-server' | sudo tee /etc/hosts > /dev/null
- pip install --upgrade pip setuptools
- pip install cython
script:
- valgrind --error-exitcode=1 python setup.py test
env:
- VERSION=20.3.7.46
- PYTHONMALLOC=malloc
- stage: wheels
name: Wheels for Linux
os: linux
language: python
python:
- "3.6"
install:
- pip install --upgrade pip setuptools
- pip install cython cibuildwheel==1.0.0
script:
- cibuildwheel --output-dir wheelhouse
env:
- CIBW_BEFORE_BUILD='pip install cython'
deploy:
name: Linux
provider: releases
api_key: $GITHUB_TOKEN
file_glob: true
file: wheelhouse/*
skip_cleanup: true
draft: true
prerelease: true
overwrite: true
on:
tags: true
- stage: wheels
name: Wheels for OS X
os: osx
language: generic
install:
- pip install --upgrade pip setuptools
- pip install cython cibuildwheel==1.0.0
script:
- cibuildwheel --output-dir wheelhouse
env:
- CIBW_BEFORE_BUILD='pip install cython'
deploy:
name: Mac OS X
provider: releases
api_key: $GITHUB_TOKEN
file_glob: true
file: wheelhouse/*
skip_cleanup: true
draft: true
prerelease: true
overwrite: true
on:
tags: true
- stage: wheels
name: Wheels for Windows Python 2.7
os: windows
language: shell
install:
- choco install python2 --version 2.7.16 --sidebyside -y --forcex86 --force --params "/InstallDir:C:\Python27"
- choco install --ignore-dependencies vcpython27
script:
- C:/Python27/python -m pip install cibuildwheel==1.0.0
- C:/Python27/python -m cibuildwheel --platform windows --output-dir wheelhouse
env:
- CIBW_BUILD='cp27-win32'
- CIBW_BEFORE_BUILD='python -m pip install cython'
deploy:
name: Windows Python 2.7
provider: releases
api_key: $GITHUB_TOKEN
file_glob: true
file: wheelhouse/*
skip_cleanup: true
draft: true
prerelease: true
overwrite: true
on:
tags: true
- stage: wheels
name: Wheels for Windows Python 2.7 x64
os: windows
language: shell
install:
- choco install python2 --version 2.7.16 --sidebyside -y --force --params "/InstallDir:C:\Python27-x64"
- choco install --ignore-dependencies vcpython27
- export PATH="C:\\Program Files (x86)\\common files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\bin\\amd64;$PATH"
- export INCLUDE="C:\\Program Files (x86)\\common files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Include;C:\\Program Files (x86)\\common files\\Microsoft\\Visual C++ for Python\\9.0\\WinSDK\\Include"
- export LIB="C:\\Program Files (x86)\\common files\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Lib\\amd64;C:\\Program Files (x86)\\common files\\Microsoft\\Visual C++ for Python\\9.0\\WinSDK\\Lib\\x64"
script:
- C:/Python27-x64/python -m pip install cibuildwheel==1.0.0
- C:/Python27-x64/python -m cibuildwheel --platform windows --output-dir wheelhouse
env:
- CIBW_BUILD='cp27-win_amd64'
- CIBW_BEFORE_BUILD='python -m pip install cython'
deploy:
name: Windows Python 2.7 x64
provider: releases
api_key: $GITHUB_TOKEN
file_glob: true
file: wheelhouse/*
skip_cleanup: true
draft: true
prerelease: true
overwrite: true
on:
tags: true
# - stage: wheels
# name: Wheels for Windows Python 3.4
# os: windows
# language: shell
#
# install:
# - choco install python3 --version 3.4.4.20180111 --sidebyside -y --forcex86 --force --params "/InstallDir:C:\Python34"
# - export VS100COMNTOOLS="$VS140COMNTOOLS"
#
# script:
# - C:/Python34/python -m pip install cibuildwheel==1.0.0
# - C:/Python34/python -m cibuildwheel --platform windows --output-dir wheelhouse
#
# env:
# - CIBW_BUILD='cp34-win32'
# - CIBW_BEFORE_BUILD='python -m pip install cython'
# deploy:
# name: Windows Python 3.4
# provider: releases
# api_key: $GITHUB_TOKEN
# file_glob: true
# file: wheelhouse/*
# skip_cleanup: true
# draft: true
# prerelease: true
# overwrite: true
# on:
# tags: true
#
# - stage: wheels
# name: Wheels for Windows Python 3.4 x64
# os: windows
# language: shell
#
# install:
# - choco install python3 --version 3.4.4.20180111 --sidebyside -y --force --params "/InstallDir:C:\Python34-x64"
# - export VS100COMNTOOLS="$VS140COMNTOOLS"
# - export PATH="C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\amd64;$PATH"
# - export INCLUDE="C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\Include;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\ucrt;C:\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\shared"
# - export LIB="C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\LIB\\amd64;C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.17134.0\\ucrt\\x64;C:\\Program Files (x86)\\Windows Kits\\10\\lib\\10.0.17134.0\\um\\x64"
#
# script:
# - C:/Python34-x64/python -m pip install cibuildwheel==1.0.0
# - C:/Python34-x64/python -m cibuildwheel --platform windows --output-dir wheelhouse
#
# env:
# - CIBW_BUILD='cp34-win_amd64'
# - CIBW_BEFORE_BUILD='python -m pip install cython'
# deploy:
# name: Windows Python 3.4 x64
# provider: releases
# api_key: $GITHUB_TOKEN
# file_glob: true
# file: wheelhouse/*
# skip_cleanup: true
# draft: true
# prerelease: true
# overwrite: true
# on:
# tags: true
- stage: wheels
name: Wheels for Windows Python 3.5
os: windows
language: shell
install:
- choco install python3 --version 3.5.2.20161029 -y --forcex86 --force --params "/InstallDir:C:\Python35"
script:
- C:/Python35/python -m pip install cibuildwheel==1.0.0
- C:/Python35/python -m cibuildwheel --platform windows --output-dir wheelhouse
env:
- CIBW_BUILD='cp35-win32'
- CIBW_BEFORE_BUILD='python -m pip install cython'
deploy:
name: Windows Python 3.5
provider: releases
api_key: $GITHUB_TOKEN
file_glob: true
file: wheelhouse/*
skip_cleanup: true
draft: true
prerelease: true
overwrite: true
on:
tags: true
- stage: wheels
name: Wheels for Windows Python 3.5 x64
os: windows
language: shell
install:
- choco install python3 --version 3.5.2.20161029 -y --force --params "/InstallDir:C:\Python35-x64"
script:
- C:/Python35-x64/python -m pip install cibuildwheel==1.0.0
- C:/Python35-x64/python -m cibuildwheel --platform windows --output-dir wheelhouse
env:
- CIBW_BUILD='cp35-win_amd64'
- CIBW_BEFORE_BUILD='python -m pip install cython'
deploy:
name: Windows Python 3.5 x64
provider: releases
api_key: $GITHUB_TOKEN
file_glob: true
file: wheelhouse/*
skip_cleanup: true
draft: true
prerelease: true
overwrite: true
on:
tags: true
- stage: wheels
name: Wheels for Windows Python 3.[678]
os: windows
language: shell
install:
- choco install python3 --version 3.6.8 --sidebyside -y --forcex86 --force --params "/InstallDir:C:\Python36"
- choco install python3 --version 3.6.8 --sidebyside -y --force --params "/InstallDir:C:\Python36-x64"
- choco install python3 --version 3.7.4 --sidebyside -y --forcex86 --force --params "/InstallDir:C:\Python37"
- choco install python3 --version 3.7.4 --sidebyside -y --force --params "/InstallDir:C:\Python37-x64"
- choco install python3 --version 3.8.0 --sidebyside -y --forcex86 --force --params "/InstallDir:C:\Python38"
- choco install python3 --version 3.8.0 --sidebyside -y --force --params "/InstallDir:C:\Python38-x64"
script:
- C:/Python36/python -m pip install cibuildwheel==1.0.0
- C:/Python36-x64/python -m pip install cibuildwheel==1.0.0
- C:/Python37/python -m pip install cibuildwheel==1.0.0
- C:/Python37-x64/python -m pip install cibuildwheel==1.0.0
- C:/Python38/python -m pip install cibuildwheel==1.0.0
- C:/Python38-x64/python -m pip install cibuildwheel==1.0.0
- C:/Python36/python -m cibuildwheel --platform windows --output-dir wheelhouse
- C:/Python36-x64/python -m cibuildwheel --platform windows --output-dir wheelhouse
- C:/Python37/python -m cibuildwheel --platform windows --output-dir wheelhouse
- C:/Python37-x64/python -m cibuildwheel --platform windows --output-dir wheelhouse
- C:/Python38/python -m cibuildwheel --platform windows --output-dir wheelhouse
- C:/Python38-x64/python -m cibuildwheel --platform windows --output-dir wheelhouse
env:
- CIBW_BUILD='cp3[678]-*'
- CIBW_BEFORE_BUILD='python -m pip install cython'
deploy:
name: Windows Python 3.[678]
provider: releases
api_key: $GITHUB_TOKEN
file_glob: true
file: wheelhouse/*
skip_cleanup: true
draft: true
prerelease: true
overwrite: true
on:
tags: true