forked from tornadoweb/tornado
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
101 lines (91 loc) · 3.48 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
# https://travis-ci.org/tornadoweb/tornado
os: linux
dist: xenial
language: python
addons:
apt:
packages:
- libgnutls-dev
env:
global:
- CIBW_BUILD="cp3[6789]*"
- CIBW_TEST_COMMAND="python3 -m tornado.test"
- CIBW_TEST_COMMAND_WINDOWS="python -m tornado.test --fail-if-logs=false"
# Before starting the full build matrix, run one test configuration
# and the linter (the `black` linter is especially likely to catch
# first-time contributors).
stages:
- quick
- test
jobs:
fast_finish: true
include:
# We have two and a half types of builds: Wheel builds run on all supported
# platforms and run the basic test suite for all supported python versions.
# Sdist builds (the "and a half") just build an sdist and run some basic
# validation. Both of these upload their artifacts to pypi if there is a
# tag on the build and the key is available.
#
# Tox builds run a more comprehensive test suite with more configurations
# and dependencies (getting all these dependencies installed for wheel
# builds is a pain, and slows things down because we don't use as much
# parallelism there. We could parallelize wheel builds more but we're also
# amortizing download costs across the different builds). The wheel builds
# take longer, so we run them before the tox builds for better bin packing
# in our allotted concurrency.
- python: '3.8'
arch: amd64
services: docker
env: BUILD_WHEEL=1
- python: '3.8'
arch: arm64
services: docker
env: BUILD_WHEEL=1 ASYNC_TEST_TIMEOUT=15
- os: windows
env: PATH=/c/Python38:/c/Python38/Scripts:$PATH BUILD_WHEEL=1
language: shell
before_install:
- choco install python --version 3.8.0
# Windows build images have outdated root certificates; until that's
# fixed use certifi instead.
# https://github.com/joerick/cibuildwheel/issues/452
- python -m pip install certifi
- export SSL_CERT_FILE=`python -c "import certifi; print(certifi.where())"`
- os: osx
env: BUILD_WHEEL=1
language: shell
- python: '3.8'
arch: amd64
env: BUILD_SDIST=1
- python: '3.6'
env: TOX_ENV=py36-full
- python: '3.7'
env: TOX_ENV=py37-full
- python: '3.8'
env: TOX_ENV=py38-full
- python: '3.9-dev'
env: TOX_ENV=py39-full
- python: nightly
env: TOX_ENV=py3
- python: pypy3.6-7.3.1
# Pypy is a lot slower due to jit warmup costs, so don't run the "full"
# test config there.
env: TOX_ENV=pypy3
# Docs and lint python versions must be synced with those in tox.ini
- python: '3.8'
env: TOX_ENV=docs
# the quick stage runs first, but putting this at the end lets us take
# advantage of travis-ci's defaults and not repeat stage:test in the others.
- python: '3.8'
env: TOX_ENV=py38,lint
stage: quick
install:
- if [[ -n "$TOX_ENV" ]]; then pip3 install tox; fi
- if [[ -n "$BUILD_WHEEL" ]]; then pip3 install cibuildwheel; fi
- if [[ -n "$BUILD_WHEEL" || -n "$BUILD_SDIST" ]]; then pip3 install twine; fi
script:
- if [[ -n "$TOX_ENV" ]]; then tox -e $TOX_ENV -- $TOX_ARGS; fi
- if [[ -n "$BUILD_WHEEL" ]]; then cibuildwheel --output-dir dist && ls -l dist; fi
- if [[ -n "$BUILD_SDIST" ]]; then python setup.py check sdist && ls -l dist; fi
after_success:
- if [[ ( -n "$BUILD_WHEEL" || -n "$BUILD_SDIST" ) && -n "$TRAVIS_TAG" && -n "$TWINE_PASSWORD" ]]; then twine upload -u __token__ dist/*; fi