.travis.yml 7.7 KB

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