-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
173 lines (145 loc) · 5.17 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
language: python
# The default python version on Travis is 2.7
# But we add this line to show the python version in the Travis UI
python: "2.7"
os:
- linux
## We also run two macOS jobs with python 2 and 3
## Default env vars
env:
global:
## Most builds use the standard command names
- PYTHON="python"
- PIP="pip"
matrix:
## This matrix entry is required, but it doesn't actually create any jobs
-
## We don't use the build matrix cross-product, because it makes too many jobs
## Instead, we list each job under matrix: include:
matrix:
# include creates Linux, python 2.7 builds by default
# the key(s) in each item override these defaults
include:
## Test all supported python releases
## python in macOS on Travis is tricky:
## - We use the default python version on macOS, which is currently 2.7.
## (But we don't show the version, because Travis might change it
## without us noticing.)
## - We use language: c, because language: python fails on Travis macOS.
## We need to install python@2 in homebrew, to get pip[2]
- os: osx
language: c
python:
addons:
## (macOS only)
homebrew:
packages:
## macOS needs pip[2] from homebrew python
- python@2
- shellcheck
## See ticket #30928 for more information. This key should be
## removed at some point to speed up builds.
update: true
## Pre-installed in macOS
- os: osx
language: c
python:
## python 3 is installed under these names
env: PYTHON="python3" PIP="pip3"
## Pre-installed in Travis bionic:
## https://docs.travis-ci.com/user/reference/bionic/#python-support
## End of Life: 1 January 2020
## https://www.python.org/dev/peps/pep-0373/#update
- python: "2.7"
## End of Life: December 2021
## https://www.python.org/dev/peps/pep-0494/#lifespan
- python: "3.6"
## End of Life: June 2023
## https://www.python.org/dev/peps/pep-0537/#lifespan
- python: "3.7"
## Extra Installs
## End of Life: October 2024
## https://www.python.org/dev/peps/pep-0569/#lifespan
- python: "3.8"
## Python 3.9
## Travis Dev Package: ????
## (Add 3.9-dev)
## Stable: 10 October 2020
## (Switch from 3.9-dev to 3.9, and check for {3.10,4.0}-dev)
## End of Life: October 2025
## https://www.python.org/dev/peps/pep-0596/#lifespan
#- python: "3.9-dev"
- python: "nightly"
## PyPy versions
## PyPy isn't packaged for Travis Bionic yet
## PyPy 2
## End of Life: "forever"
## http://doc.pypy.org/en/latest/faq.html#how-long-will-pypy-support-python2
## But stem or fallback-scripts may decide not to support python 2
## after 1 Jan 2020.
- python: "pypy"
dist: xenial
## PyPy does not have documented end of life dates
- python: "pypy3"
dist: xenial
## Uncomment to allow the build to report success (with non-required
## sub-builds continuing to run) if all required sub-builds have
## succeeded. This is somewhat buggy currently: it can cause
## duplicate notifications and prematurely report success if a
## single sub-build has succeeded. See
## https://github.com/travis-ci/travis-ci/issues/1696
#fast_finish: true
## These builds fail in Travis at the moment
allow_failures:
#- python: "nightly"
## (Linux only) Use a recent Linux image (Ubuntu Bionic)
dist: bionic
## (macOS only) Use a recent macOS image
## See https://docs.travis-ci.com/user/reference/osx#os-x-version
## Default is Xcode 9.4 on macOS 10.13 as of October 2019
## Recent is Xcode 11.2 on macOS 10.14 as of October 2019
osx_image: xcode11.2
## Download our dependencies
## We don't install shellcheck on macOS, because brew update is slow
addons:
## (Linux only)
apt:
packages:
## Optional build dependencies
- shellcheck
before_install:
## Set pipefail: we use pipes
- set -o pipefail || echo "pipefail failed"
install:
## List installed package versions
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then dpkg-query --show; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew list --versions; fi
- if command -v shellcheck ; then shellcheck --version; fi
- $PYTHON --version
## Are we running python 2?
- if $PYTHON --version 2>&1 | cut -d" " -f2 | grep -q '2[.]'; then PY2=1; else PY2= ; fi
## We could install stem's dependencies, but they are all optional
- $PIP install -U pip
- $PIP install -r requirements.txt
- if [[ "$PY2" ]]; then $PIP install -r requirements-python2.txt; fi
## Now list installed python package versions
- $PIP list
script:
## Run some fallback-scripts tests
## Hide info-level logs, unless there is an error
- ./test.sh 2>&1 | tee fallback.log | grep -v "INFO::"
after_failure:
## Show all the output, including info-level logs
- cat fallback.log || echo "cat failed"
notifications:
irc:
channels:
- "irc.oftc.net#tor-ci"
template:
- "%{repository} %{branch} %{commit} - %{author}: %{commit_subject}"
- "Build #%{build_number} %{result}. Details: %{build_url}"
on_success: change
on_failure: change
email:
on_success: never
on_failure: change