.travis.yml 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. language: python
  2. # The default python version on Travis is 2.7
  3. # But we add this line to show the python version in the Travis UI
  4. python: "2.7"
  5. os:
  6. - linux
  7. ## We add a single macOS build below
  8. matrix:
  9. # include creates Linux, python 2.7, tor stable builds by default
  10. # the key(s) in each item override these defaults
  11. include:
  12. ## Test macOS with its default python version, which is currently 2.7.
  13. ## (But we don't show the version, because Travis might change it without
  14. ## us noticing.)
  15. ## Use language: c to work around an issue with language: python on macOS.
  16. ## We get the tor version in the homebrew cache on the macOS image
  17. ## The current tor version in homebrew is on this page:
  18. ## https://formulae.brew.sh/formula/tor
  19. - os: osx
  20. language: c
  21. python:
  22. env: TOR="stable-release"
  23. ## Test all supported and available tor versions on Linux
  24. ## If the deb.torproject.org repositories are removed, we will fall back to
  25. ## Ubuntu security's tor version (currently 0.2.9.14). We might want to
  26. ## automatically fail the job if we can't get a newer tor, see #29741.
  27. ## The current tor versions in Ubuntu are on this page:
  28. ## https://packages.ubuntu.com/search?keywords=tor&searchon=names&exact=1
  29. - addons:
  30. apt:
  31. sources:
  32. - sourceline: 'deb https://deb.torproject.org/torproject.org tor-nightly-0.2.9.x-xenial main'
  33. key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
  34. packages:
  35. - tor
  36. env: TOR="0.2.9-nightly"
  37. - addons:
  38. apt:
  39. sources:
  40. - sourceline: 'deb https://deb.torproject.org/torproject.org tor-nightly-0.3.4.x-xenial main'
  41. key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
  42. packages:
  43. - tor
  44. env: TOR="0.3.4-nightly"
  45. ## The current stable release is listed at the end of the file, because
  46. ## it is the default for other build variants
  47. - addons:
  48. apt:
  49. sources:
  50. - sourceline: 'deb https://deb.torproject.org/torproject.org tor-nightly-0.3.5.x-xenial main'
  51. key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
  52. packages:
  53. - tor
  54. env: TOR="0.3.5-nightly"
  55. ## The experimental deb line needs to be updated when 0.4.0 becomes stable
  56. - addons:
  57. apt:
  58. sources:
  59. - sourceline: 'deb https://deb.torproject.org/torproject.org tor-experimental-0.4.0.x-xenial main'
  60. key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
  61. packages:
  62. - tor
  63. env: TOR="0.4.0-nightly"
  64. - addons:
  65. apt:
  66. sources:
  67. - sourceline: 'deb https://deb.torproject.org/torproject.org tor-nightly-master-xenial main'
  68. key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
  69. packages:
  70. - tor
  71. env: TOR="master-nightly"
  72. ## Test all supported python releases
  73. ## Pre-installed in Travis xenial:
  74. ## https://docs.travis-ci.com/user/reference/xenial/#python-support
  75. ## End of Life: 1 January 2020
  76. ## https://www.python.org/dev/peps/pep-0373/#id2
  77. - python: "2.7"
  78. ## Final Release: 17 March 2019
  79. ## https://www.python.org/dev/peps/pep-0429/#release-schedule
  80. - python: "3.4"
  81. ## Final Release: 17 March 2019
  82. ## https://www.python.org/dev/peps/pep-0478/#id4
  83. - python: "3.5"
  84. ## End of Life: December 2021
  85. ## https://www.python.org/dev/peps/pep-0494/#lifespan
  86. - python: "3.6"
  87. ## End of Life: June 2023
  88. ## https://www.python.org/dev/peps/pep-0537/#lifespan
  89. - python: "3.7"
  90. ## Stable: 20 October 2019
  91. ## (Switch from 3.8-dev to 3.8, and check for 3.9-dev)
  92. ## End of Life: October2024
  93. ## https://www.python.org/dev/peps/pep-0569/#lifespan
  94. - python: "3.8-dev"
  95. - python: "nightly"
  96. # PyPy versions
  97. ## End of Life: "forever"
  98. ## http://doc.pypy.org/en/latest/faq.html#how-long-will-pypy-support-python2
  99. ## But chutney can decide not to support python 2 after 1 Jan 2020.
  100. ## Travis Xenial does not support pypy2.7
  101. #- python: "pypy2.7"
  102. ## PyPy does not have documented end of life dates
  103. - python: "pypy3.5"
  104. ## PyPy 3.6 is currently in alpha
  105. ## Travis Xenial does not support pypy3.6-dev yet?
  106. #- python: "pypy3.6-dev"
  107. ## Uncomment to allow the build to report success (with non-required
  108. ## sub-builds continuing to run) if all required sub-builds have
  109. ## succeeded. This is somewhat buggy currently: it can cause
  110. ## duplicate notifications and prematurely report success if a
  111. ## single sub-build has succeeded. See
  112. ## https://github.com/travis-ci/travis-ci/issues/1696
  113. #fast_finish: true
  114. ## These builds fail in Travis at the moment
  115. #allow_failures:
  116. # - env: TOR="master-nightly"
  117. ## We don't need sudo. (The "apt:" stanza after this allows us to not need
  118. ## sudo; otherwise, we would need it for getting dependencies.)
  119. sudo: false
  120. ## (Linux only) Use the Ubuntu Xenial Linux Image
  121. ## deb.torproject.org doesn't support Trusty any more
  122. dist: xenial
  123. ## (OSX only) Use the default OSX image
  124. ## See https://docs.travis-ci.com/user/reference/osx#os-x-version
  125. ## Default is Xcode 9.4 on macOS 10.13 as of August 2018
  126. #osx_image: xcode9.4
  127. ## This env var isn't used by the build, but it's useful for debugging
  128. ## It should be kept in sync with the Linux tor version below
  129. env:
  130. - TOR="stable-release"
  131. ## Download our dependencies
  132. addons:
  133. ## (Linux only)
  134. apt:
  135. sources:
  136. ## Xenial has Tor 0.2.7, so we need a newer version of Tor from the
  137. ## torproject repositories, and the torproject key from deb.tpo
  138. - sourceline: 'deb https://deb.torproject.org/torproject.org xenial main'
  139. key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
  140. packages:
  141. - tor
  142. ## (macOS only)
  143. homebrew:
  144. packages:
  145. - tor
  146. install:
  147. ## Chutney has no dependencies, apart from tor
  148. ## List installed package versions
  149. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then dpkg-query --show; fi
  150. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew list --versions; fi
  151. - python --version
  152. - tor --version
  153. script:
  154. - tools/test-network.sh --allow-failures 1
  155. after_failure:
  156. ## List the contents of net/nodes
  157. - ls -lR net/nodes/
  158. ## Dump the important directory documents
  159. #- cat net/nodes/000a*/cached-certs
  160. - cat net/nodes/000a*/cached-consensus
  161. - cat net/nodes/000a*/cached-descriptors*
  162. #- cat net/nodes/000a*/cached-extrainfo*
  163. - cat net/nodes/000a*/cached-microdesc-consensus
  164. - cat net/nodes/000a*/cached-microdescs*
  165. #- cat net/nodes/000a*/key-pinning-journal
  166. #- cat net/nodes/000a*/router-stability
  167. #- cat net/nodes/00*a*/sr-state
  168. #- cat net/nodes/00*a*/state
  169. - for f in net/nodes/00*a*/v3-status-votes ; do echo "$f"; cat "$f"; done
  170. - for f in net/nodes/00*a*/unparseable-descs/* ; do echo "$f"; cat "$f"; done
  171. ## Re-run chutney in debug mode
  172. ## TODO: improve debug mode
  173. - tools/test-network.sh --debug && echo "chutney debug run succeeded"
  174. notifications:
  175. irc:
  176. channels:
  177. - "irc.oftc.net#tor-ci"
  178. template:
  179. - "%{repository} %{branch} %{commit} - %{author}: %{commit_subject}"
  180. - "Build #%{build_number} %{result}. Details: %{build_url}"
  181. on_success: change
  182. on_failure: change
  183. email:
  184. on_success: never
  185. on_failure: change