.travis.yml 7.4 KB

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