Replace tpo git repository URL by gitlab
[stem.git] / .travis.yml
blobfe96ccf6f6eb0a6236f211c52788496855c0d301
1 language: python
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
5 python: "2.7"
7 os:
8   - linux
9   ## We also use macOS for some networks
11 matrix:
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
15   include:
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.
25     - os: osx
26       language: c
27       python:
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
36     - addons:
37         apt:
38           sources:
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'
41           packages:
42             - tor
43       env: TOR="0.2.9-nightly" TARGET=""
44     - addons:
45         apt:
46           sources:
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'
49           packages:
50             - tor
51       env: TOR="0.3.5-nightly" TARGET=""
52     ## The current stable release is 0.4.0
53     - addons:
54         apt:
55           sources:
56             - sourceline: 'deb https://deb.torproject.org/torproject.org xenial main'
57               key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
58           packages:
59             - tor
60       env: TOR="stable-release" TARGET=""
61     ## We also have 0.4.0 and 0.4.1 nightlies
62     - addons:
63         apt:
64           sources:
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'
67           packages:
68             - tor
69       env: TOR="0.4.0-nightly" TARGET=""
70     - addons:
71         apt:
72           sources:
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'
75           packages:
76             - tor
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
84     - python: "2.7"
85       env: TOR="master-nightly" TARGET="--target ONLINE"
86     ## End of Life: December 2021
87     ## https://www.python.org/dev/peps/pep-0494/#lifespan
88     - python: "3.6"
89       env: TOR="master-nightly" TARGET=""
90     ## End of Life: June 2023
91     ## https://www.python.org/dev/peps/pep-0537/#lifespan
92     - python: "3.7"
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
98     - python: "3.8-dev"
99       env: TOR="master-nightly" TARGET=""
100     - python: "nightly"
101       env: TOR="master-nightly" TARGET="--target ONLINE"
102     # PyPy versions
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
107     #- python: "pypy2.7"
108     #  env: TOR="master-nightly" TARGET=""
109     ## PyPy does not have documented end of life dates
110     - python: "pypy3.5"
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
123   #fast_finish: true
125   ## These builds fail in Travis at the moment
126   #allow_failures:
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.)
131 sudo: false
133 ## (Linux only) Use the Ubuntu Xenial Linux Image
134 ## deb.torproject.org doesn't support Trusty any more
135 dist: xenial
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
140 #osx_image: xcode9.4
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
144 env:
145   - TOR="master-nightly" TARGET="--target ONLINE"
147 ## Download our dependencies
148 addons:
149   ## (Linux only)
150   apt:
151     sources:
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'
154     packages:
155       - tor
156   ## (macOS only)
157   homebrew:
158     packages:
159       - tor
160     # See ticket #30928 for more information. This key should be removed at
161     # some point to speed up builds.
162     update: true
164 install:
165   ## We also need to install stem's dependencies
166   - pip install -U pip
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
171   - pip list
172   - python --version
173   - tor --version
175 script:
176   ## Run stem's tests
177   - ./run_tests.py --unit
178   - ./run_tests.py --integ $TARGET
180 after_failure:
181   ## Show the integ tor log
182   - cat "$STEM_SOURCE_DIR"/test/data/tor_log || echo "cat failed"
184 notifications:
185   irc:
186     channels:
187       - "irc.oftc.net#tor-ci"
188     template:
189       - "%{repository} %{branch} %{commit} - %{author}: %{commit_subject}"
190       - "Build #%{build_number} %{result}. Details: %{build_url}"
191     on_success: change
192     on_failure: change
193   email:
194     on_success: never
195     on_failure: change