-
Notifications
You must be signed in to change notification settings - Fork 35
/
.travis.yml
276 lines (250 loc) · 10.1 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
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: "3.8"
os:
- linux
## We also use macOS for some networks
## We don't use the build matrix cross-product, because it makes too many jobs
## Instead, we list each job under matrix: include:
env:
global:
## Turn off tor's sandbox in chutney, until we fix sandbox errors that are
## triggered by Ubuntu Xenial and Bionic. See #32722.
- CHUTNEY_TOR_SANDBOX="0"
## Tolerate a small number of failures in chutney jobs
## Tor 0.3.5 seems particularly unstable, later versions seem to cope well
## with CHUTNEY_ALLOW_FAILURES="1"
- CHUTNEY_ALLOW_FAILURES="2"
matrix:
## This matrix entry is required, but it doesn't actually create any jobs
## by itself. All jobs are created by matrix: include: entries
##
## The TOR env var should be kept in sync with the Linux tor version in
## the addons section below
## We use the basic-min network by default, to reduce load and increase
## reliability
- TOR="master-nightly" NETWORK_FLAVOUR="basic-min"
matrix:
# include creates Linux, python 3.8, tor master builds by default
# we use tor master to catch tor issues before stable releases
# the key(s) in each item override these defaults
include:
## Test different network flavours
## We're using the networks from tor master's "make test-network-all"
##
## We need to use macOS to test IPv6 networks, because Travis Linux doesn't
## support IPv6. But macOS is tricky:
## - We use language: c, because language: python fails on Travis macOS.
## - We get the tor version in the homebrew cache on the macOS image.
## The latest tor version in homebrew is on this page:
## https://formulae.brew.sh/formula/tor
## The Travis version might be slightly older.
##
## IPv4 networks
## "make test-network-all" on all supported tor versions
- env: TOR="master-nightly" NETWORK_FLAVOUR="bridges-min"
- env: TOR="master-nightly" NETWORK_FLAVOUR="single-onion-v23"
## "make test-network-all" from 0.4.3 and earlier
- env: TOR="master-nightly" NETWORK_FLAVOUR="hs-v2-min"
- env: TOR="master-nightly" NETWORK_FLAVOUR="hs-v3-min"
## "make test-network-all" from 0.4.4 and later
- env: TOR="master-nightly" NETWORK_FLAVOUR="hs-v23-min"
## "make test-network" from 0.4.4 and later
## (and the chutney default network)
- env: TOR="master-nightly" NETWORK_FLAVOUR="bridges+hs-v23"
##
## IPv6 networks (on macOS)
## "make test-network-all" on all supported tor versions
- env: PYTHON="python3" TOR="stable-release" NETWORK_FLAVOUR="bridges+ipv6-min"
os: osx
language: c
python:
## The IPv6 exit test doesn't actually require IPv6, see #30182.
## But we'll keep this test, because it does test IPv6 exit config.
- env: TOR="master-nightly" NETWORK_FLAVOUR="ipv6-exit-min"
- env: PYTHON="python3" TOR="stable-release" NETWORK_FLAVOUR="hs-v23-ipv6-md"
os: osx
language: c
python:
## v3 onion service IPv6 tests
- env: PYTHON="python3" TOR="stable-release" NETWORK_FLAVOUR="single-onion-v23-ipv6-md"
os: osx
language: c
python:
## Test all supported and available tor versions on Linux
## If the deb.torproject.org repositories are removed, we will fall back to
## Ubuntu security's tor version (currently 0.2.9.14). We might want to
## automatically fail the job if we can't get a newer tor, see #29741.
##
## The current tor versions in Ubuntu are on this page:
## https://packages.ubuntu.com/search?keywords=tor&searchon=names&exact=1
##
- addons:
apt:
sources:
- sourceline: 'deb https://deb.torproject.org/torproject.org tor-nightly-0.3.5.x-bionic main'
key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
packages:
- shellcheck
- tor
env: TOR="0.3.5-nightly" NETWORK_FLAVOUR="basic-min"
- addons:
apt:
sources:
- sourceline: 'deb https://deb.torproject.org/torproject.org tor-nightly-0.4.1.x-bionic main'
key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
packages:
- shellcheck
- tor
env: TOR="0.4.1-nightly" NETWORK_FLAVOUR="basic-min"
# The current stable release is 0.4.2
- addons:
apt:
sources:
- sourceline: 'deb https://deb.torproject.org/torproject.org bionic main'
key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
packages:
- shellcheck
- tor
env: TOR="stable-release" NETWORK_FLAVOUR="basic-min"
- addons:
apt:
sources:
- sourceline: 'deb https://deb.torproject.org/torproject.org tor-nightly-0.4.2.x-bionic main'
key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
packages:
- shellcheck
- tor
env: TOR="0.4.2-nightly" NETWORK_FLAVOUR="basic-min"
# We test nightly master by default, in our network tests. So we don't need
# a nightly master test here.
## Test all supported python releases
## Pre-installed in macOS
- os: osx
language: c
python:
## python 3 is already installed, under this name
env: PYTHON="python3" TOR="stable-release" NETWORK_FLAVOUR="basic-min"
## Pre-installed in Travis Bionic:
## https://docs.travis-ci.com/user/reference/bionic/#python-support
## 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
## Tor master doesn't work on Travis Xenial, because it only has
## OpenSSL 1.1.0
## PyPy does not have documented end of life dates
- python: "pypy3"
dist: xenial
addons:
apt:
sources:
- sourceline: 'deb https://deb.torproject.org/torproject.org tor-nightly-0.4.2.x-xenial main'
key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
packages:
- shellcheck
- tor
env: TOR="0.4.2-nightly" NETWORK_FLAVOUR="basic-min"
## 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:
# - env: TOR="master-nightly" NETWORK_FLAVOUR="basic-min"
## (Linux only) Use the Ubuntu Bionic Linux Image
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
addons:
## (Linux only)
apt:
sources:
- sourceline: 'deb https://deb.torproject.org/torproject.org tor-nightly-master-bionic main'
key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
packages:
- shellcheck
- tor
## (macOS only)
homebrew:
packages:
- shellcheck
- tor
# See ticket #30928 for more information. This key should be removed at
# some point to speed up builds.
update: true
before_install:
## Set pipefail: we may use pipes in future
- set -o pipefail || echo "pipefail failed"
install:
## Chutney has no dependencies, apart from tor
## List installed package versions
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then dpkg-query --show; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew list --versions; fi
## Use the default spelling for python, unless it is overridden
- export PYTHON=${PYTHON:-python}
- $PYTHON --version
- if command -v shellcheck ; then shellcheck --version; fi
- tor --version
## List the permissions on chutney and chutney/net
- ls -al . net
script:
## Basic tests
- if command -v shellcheck ; then tests/shellcheck-tests.sh; fi
- tests/unit-tests.sh
## Quick smoke test, don't allow failures
- CHUTNEY_ALLOW_FAILURES=0 tools/test-network.sh --dry-run
## Different data directory
- tools/test-network.sh --net-dir "$(mktemp -d)"
## IP address handling
- tools/test-network.sh --ipv4 "127.0.0.1" --ipv6 "[::1]"
## Offline mode
- tools/test-network.sh --offline
## --data fails on python3, and on some tor versions
## We'll fix this issue in #30071
#- FIVE_MEGABYTES=$((5*1024*1024))
#- tools/test-network.sh --data "$FIVE_MEGABYTES" --connections 2 --rounds 2 --hs-multi-client 1 --start-time 130 --bootstrap-time 70 --stop-time 10
after_failure:
## Show some diagnostics
## Pass the node name as the first argument, to see detailed diagnostics for
## a particular node
- tools/diagnostics.sh
## And repeat the warnings at the end
- tools/test-network.sh --only-warnings
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