forked from aio-libs/aiohttp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
282 lines (264 loc) · 7.69 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
sudo: false
language: python
python:
- 3.5
- &mainstream_python 3.6
- 3.6-dev
- nightly
- &pypy3 pypy3.5
install:
- &upgrade_python_toolset pip install --upgrade pip wheel setuptools
- pip install -r requirements/ci.txt
script:
- make cov-ci-no-ext
- make cov-ci-aio-debug
- make cov-ci-run
after_success:
- codecov
_helpers:
- &_mainstream_python_base
python: *mainstream_python
- &_reset_steps
env: []
before_install: skip
install: skip
script: skip
after_success: []
- &_lint_base
stage: &doc_stage_name docs, linting and pre-test checks
<<: *_mainstream_python_base
<<: *_reset_steps
install:
- *upgrade_python_toolset
- pip install -U -r requirements/ci.txt
- &_doc_base
<<: *_lint_base
install:
- *upgrade_python_toolset
- pip install -U -r requirements/ci.txt -r requirements/doc.txt -r requirements/doc-spelling.txt
after_failure: cat docs/_build/spelling/output.txt
addons:
apt:
packages:
- libenchant-dev
- &osx_python_base
stage: &stage_test_osx_name test under OS X (last chance to fail before deploy available)
os: osx
language: generic
python: *pypy3
env:
- &env_pypy3 PYTHON_VERSION=pypy3.5-5.8.0
- &env_pyenv PYENV_ROOT="$HOME/.pyenv"
- &env_path PATH="$PYENV_ROOT/bin:$PATH"
before_install:
- brew update
- brew install readline xz
- &ensure_pyenv_installed |
if [ ! -f "$PYENV_ROOT/bin/pyenv" ]
then
rm -rf "$PYENV_ROOT"
curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash
fi
pyenv update
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
- &install_python pyenv install --skip-existing --keep --verbose "$PYTHON_VERSION"
- &switch_python pyenv shell "$PYTHON_VERSION"
- &python_version python --version
before_cache:
- brew --cache
- &generic_deploy_base
stage: &deploy_stage_name deploy (PYPI upload itself runs only for tagged commits)
<<: *_mainstream_python_base
deploy: &deploy_step
provider: pypi
# `skip_cleanup: true` is required to preserve binary wheels, built
# inside of manylinux1 docker container during `script` step above.
skip_cleanup: true
user: andrew.svetlov
password:
secure: ZQKbdPT9BlNqP5CTbWRQyeyig7Bpf7wsnYVQIQPOZc9Ec74A+dsbagstR1sPkAO+d+5PN0pZMovvmU7OQhSVPAnJ74nsN90/fL4ux3kqYecMbevv0rJg20hMXSSkwMEIpjUsMdMjJvZAcaKytGWmKL0qAlOJHhixd1pBbWyuIUE=
# Although Travis CI instructs `setup.py` to build source distribution,
# which is default value for distribution option (`distribution: sdist`),
# it will also upload all wheels we've previously built in manylinux1
# docker container using `twine upload -r pypi dist/*` command.
# Also since commit https://github.com/travis-ci/dpl/commit/90b5e39
# it is default that Travis PYPI provider has `skip_upload_docs: true`
# set by default.
# Besides above, we don't do cleanup of `dist/*`, because it's being done
# by Travis CI PYPI deployment provider after upload, unconditionally.
on:
tags: true
all_branches: true
- &osx_pypi_deploy_base_1011
<<: *osx_python_base
<<: *generic_deploy_base
osx_image: xcode7.3
script: skip
after_success: []
env:
- &env_os1011_msg Build and deploy to PYPI of OS X 10.11 binary wheel
- &env_py36 PYTHON_VERSION=3.6.3
- *env_pyenv
- *env_path
deploy:
<<: *deploy_step
skip_cleanup: false
distributions: bdist_wheel
- &osx_pypi_deploy_base_1012
<<: *osx_pypi_deploy_base_1011
osx_image: xcode8.1
env:
- &env_os1012_msg Build and deploy to PYPI of OS X 10.12 binary wheel
- *env_py36
- *env_pyenv
- *env_path
- &osx_pypi_deploy_base_1010
<<: *osx_pypi_deploy_base_1011
osx_image: xcode6.4
env:
- &env_os1010_msg Build and deploy to PYPI of OS X 10.10 binary wheel
- *env_py36
- *env_pyenv
- *env_path
# doesn't work on MacOSX out of the box -- the system has no Python installed
# there's a workaround to use `language: generic` and install it, but it's slow
os: linux
jobs:
fast_finish: true
allow_failures:
- python: nightly
- python: *pypy3
include:
- <<: *_doc_base
env:
- docs
script:
- towncrier --yes
- make doc-spelling
- <<: *_lint_base
env:
- flake8
script:
- flake8 aiohttp examples tests demos
- <<: *_lint_base
env:
- dist setup check
install:
- *upgrade_python_toolset
- pip install -r requirements/doc.txt
script:
- python setup.py check --metadata --restructuredtext --strict --verbose
- <<: *osx_python_base
python: 3.5.3
env:
- &env_py35 PYTHON_VERSION=3.5.3
- *env_pyenv
- *env_path
- <<: *osx_python_base
python: *mainstream_python
env:
- *env_py36
- *env_pyenv
- *env_path
- <<: *osx_python_base
python: *mainstream_python
env:
- PYTHON_VERSION=3.6-dev
- *env_pyenv
- *env_path
- <<: *osx_python_base
python: nightly
env:
- PYTHON_VERSION=3.7-dev
- *env_pyenv
- *env_path
# pypy3.5-5.8.0 fails under OS X because it's unsupported
# Build and deploy manylinux1 binary wheels and source distribution
- <<: *generic_deploy_base
<<: *_reset_steps
env: Build and deploy to PYPI of manylinux1 binary wheels for all supported Pythons and source distribution
dist: trusty
group: edge
services:
- docker
script:
- ./tools/run_docker.sh "aiohttp"
- pip install -r requirements/ci.txt # to compile *.c files by Cython
deploy:
provider: pypi
# `skip_cleanup: true` is required to preserve binary wheels, built
# inside of manylinux1 docker container during `script` step above.
skip_cleanup: true
user: andrew.svetlov
password:
secure: ZQKbdPT9BlNqP5CTbWRQyeyig7Bpf7wsnYVQIQPOZc9Ec74A+dsbagstR1sPkAO+d+5PN0pZMovvmU7OQhSVPAnJ74nsN90/fL4ux3kqYecMbevv0rJg20hMXSSkwMEIpjUsMdMjJvZAcaKytGWmKL0qAlOJHhixd1pBbWyuIUE=
# Although Travis CI instructs `setup.py` to build source distribution,
# which is default value for distribution option (`distribution: sdist`),
# it will also upload all wheels we've previously built in manylinux1
# docker container using `twine upload -r pypi dist/*` command.
# Also since commit https://github.com/travis-ci/dpl/commit/90b5e39
# it is default that Travis PYPI provider has `skip_upload_docs: true`
# set by default.
# Besides above, we don't do cleanup of `dist/*`, because it's being done
# by Travis CI PYPI deployment provider after upload, unconditionally.
on:
tags: true
all_branches: true
# Build and deploy MacOS binary wheels for each OSX+Python combo possible
# OS X 10.10, Python 3.5
- <<: *osx_pypi_deploy_base_1010
python: 3.5
env:
- *env_os1010_msg
- *env_py35
- *env_pyenv
- *env_path
# OS X 10.10, Python 3.6
- <<: *osx_pypi_deploy_base_1010
env:
- *env_os1010_msg
- *env_py36
- *env_pyenv
- *env_path
# OS X 10.11, Python 3.5
- <<: *osx_pypi_deploy_base_1011
python: 3.5
env:
- *env_os1011_msg
- *env_py35
- *env_pyenv
- *env_path
# OS X 10.11, Python 3.6
- <<: *osx_pypi_deploy_base_1011
env:
- *env_os1011_msg
- *env_py36
- *env_pyenv
- *env_path
# OS X 10.12, Python 3.5
- <<: *osx_pypi_deploy_base_1012
python: 3.5
env:
- *env_os1012_msg
- *env_py35
- *env_pyenv
- *env_path
# OS X 10.12, Python 3.6
- <<: *osx_pypi_deploy_base_1012
env:
- *env_os1012_msg
- *env_py36
- *env_pyenv
- *env_path
stages:
- *doc_stage_name
- test
- name: *stage_test_osx_name
if: type IN (api, cron)
- name: *deploy_stage_name
# This will prevent deploy unless it's a tagged commit:
if: tag IS present
cache: pip
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log