3 # The default python version on Travis is 2.7
4 # But we add this line to show the python version in the Travis UI
9 ## We also use macOS for some networks
12 # include creates Linux, python 2.7, tor master builds by default
13 # we use tor master to catch tor issues before stable releases
14 # the key(s) in each item override these defaults
16 ## macOS on Travis is tricky:
17 ## - We use the default python version on macOS, which is currently 2.7.
18 ## (But we don't show the version, because Travis might change it
19 ## without us noticing.)
20 ## - We use language: c, because language: python fails on Travis macOS.
21 ## - We get the tor version in the homebrew cache on the macOS image.
22 ## The latest tor version in homebrew is on this page:
23 ## https://formulae.brew.sh/formula/tor
24 ## The Travis version might be slightly older.
28 env: TOR="stable-release" TARGET="--target ONLINE"
30 ## Test all supported and available tor versions on Linux
31 ## If the deb.torproject.org repositories are removed, we will fall back to
32 ## Ubuntu security's tor version (currently 0.2.9.14). We might want to
33 ## automatically fail the job if we can't get a newer tor, see #29741.
34 ## The current tor versions in Ubuntu are on this page:
35 ## https://packages.ubuntu.com/search?keywords=tor&searchon=names&exact=1
39 - sourceline: 'deb https://deb.torproject.org/torproject.org tor-nightly-0.2.9.x-xenial main'
40 key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
43 env: TOR="0.2.9-nightly" TARGET=""
47 - sourceline: 'deb https://deb.torproject.org/torproject.org tor-nightly-0.3.5.x-xenial main'
48 key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
51 env: TOR="0.3.5-nightly" TARGET=""
52 ## The current stable release is 0.4.0
56 - sourceline: 'deb https://deb.torproject.org/torproject.org xenial main'
57 key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
60 env: TOR="stable-release" TARGET=""
61 ## We also have 0.4.0 and 0.4.1 nightlies
65 - sourceline: 'deb https://deb.torproject.org/torproject.org tor-nightly-0.4.0.x-xenial main'
66 key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
69 env: TOR="0.4.0-nightly" TARGET=""
73 - sourceline: 'deb https://deb.torproject.org/torproject.org tor-nightly-0.4.1.x-xenial main'
74 key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
77 env: TOR="0.4.1-nightly" TARGET=""
79 ## Test all supported python releases
80 ## Pre-installed in Travis xenial:
81 ## https://docs.travis-ci.com/user/reference/xenial/#python-support
82 ## End of Life: 1 January 2020
83 ## https://www.python.org/dev/peps/pep-0373/#id2
85 env: TOR="master-nightly" TARGET="--target ONLINE"
86 ## End of Life: December 2021
87 ## https://www.python.org/dev/peps/pep-0494/#lifespan
89 env: TOR="master-nightly" TARGET=""
90 ## End of Life: June 2023
91 ## https://www.python.org/dev/peps/pep-0537/#lifespan
93 env: TOR="master-nightly" TARGET=""
94 ## Stable: 20 October 2019
95 ## (Switch from 3.8-dev to 3.8, and check for 3.9-dev)
96 ## End of Life: October 2024
97 ## https://www.python.org/dev/peps/pep-0569/#lifespan
99 env: TOR="master-nightly" TARGET=""
101 env: TOR="master-nightly" TARGET="--target ONLINE"
103 ## End of Life: "forever"
104 ## http://doc.pypy.org/en/latest/faq.html#how-long-will-pypy-support-python2
105 ## But stem may decide not to support python 2 after 1 Jan 2020.
106 ## Travis Xenial does not support pypy2.7
108 # env: TOR="master-nightly" TARGET=""
109 ## PyPy does not have documented end of life dates
111 env: TOR="master-nightly" TARGET=""
112 ## PyPy 3.6 is currently in alpha
113 ## Travis Xenial does not support pypy3.6-dev yet?
114 #- python: "pypy3.6-dev"
115 # env: TOR="master-nightly" TARGET=""
117 ## Uncomment to allow the build to report success (with non-required
118 ## sub-builds continuing to run) if all required sub-builds have
119 ## succeeded. This is somewhat buggy currently: it can cause
120 ## duplicate notifications and prematurely report success if a
121 ## single sub-build has succeeded. See
122 ## https://github.com/travis-ci/travis-ci/issues/1696
125 ## These builds fail in Travis at the moment
127 # - env: TOR="master-nightly" TARGET="--target ONLINE"
129 ## We don't need sudo. (The "apt:" stanza after this allows us to not need
130 ## sudo; otherwise, we would need it for getting dependencies.)
133 ## (Linux only) Use the Ubuntu Xenial Linux Image
134 ## deb.torproject.org doesn't support Trusty any more
137 ## (OSX only) Use the default OSX image
138 ## See https://docs.travis-ci.com/user/reference/osx#os-x-version
139 ## Default is Xcode 9.4 on macOS 10.13 as of August 2018
142 ## The TOR env var should be kept in sync with the Linux tor version below
143 ## This line doesn't actually create any Travis jobs
145 - TOR="master-nightly" TARGET="--target ONLINE"
147 ## Download our dependencies
152 - sourceline: 'deb https://deb.torproject.org/torproject.org tor-nightly-master-xenial main'
153 key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
160 # See ticket #30928 for more information. This key should be removed at
161 # some point to speed up builds.
165 ## We also need to install stem's dependencies
167 - pip install -r requirements.txt
168 ## List installed package versions
169 - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then dpkg-query --show; fi
170 - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew list --versions; fi
177 - ./run_tests.py --unit
178 - ./run_tests.py --integ $TARGET
181 ## Show the integ tor log
182 - cat "$STEM_SOURCE_DIR"/test/data/tor_log || echo "cat failed"
187 - "irc.oftc.net#tor-ci"
189 - "%{repository} %{branch} %{commit} - %{author}: %{commit_subject}"
190 - "Build #%{build_number} %{result}. Details: %{build_url}"