.travis.yml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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. - python: "2.7"
  75. - python: "3.4"
  76. - python: "3.5"
  77. - python: "3.6"
  78. ## TODO: check if Travis Xenial supports these versions
  79. #- python: "3.7"
  80. #- python: "3.8-dev"
  81. - python: "nightly"
  82. # PyPy versions
  83. ## TODO: check if Travis Xenial supports these versions
  84. #- python: "pypy2.7"
  85. - python: "pypy3.5"
  86. ## Uncomment to allow the build to report success (with non-required
  87. ## sub-builds continuing to run) if all required sub-builds have
  88. ## succeeded. This is somewhat buggy currently: it can cause
  89. ## duplicate notifications and prematurely report success if a
  90. ## single sub-build has succeeded. See
  91. ## https://github.com/travis-ci/travis-ci/issues/1696
  92. #fast_finish: true
  93. ## These builds fail in Travis at the moment
  94. #allow_failures:
  95. # - env: TOR="master-nightly"
  96. ## We don't need sudo. (The "apt:" stanza after this allows us to not need
  97. ## sudo; otherwise, we would need it for getting dependencies.)
  98. sudo: false
  99. ## (Linux only) Use the Ubuntu Xenial Linux Image
  100. ## deb.torproject.org doesn't support Trusty any more
  101. dist: xenial
  102. ## (OSX only) Use the default OSX image
  103. ## See https://docs.travis-ci.com/user/reference/osx#os-x-version
  104. ## Default is Xcode 9.4 on macOS 10.13 as of August 2018
  105. #osx_image: xcode9.4
  106. ## This env var isn't used by the build, but it's useful for debugging
  107. ## It should be kept in sync with the Linux tor version below
  108. env:
  109. - TOR="stable-release"
  110. ## Download our dependencies
  111. addons:
  112. ## (Linux only)
  113. apt:
  114. sources:
  115. ## Xenial has Tor 0.2.7, so we need a newer version of Tor from the
  116. ## torproject repositories, and the torproject key from deb.tpo
  117. - sourceline: 'deb https://deb.torproject.org/torproject.org xenial main'
  118. key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
  119. packages:
  120. - tor
  121. ## (macOS only)
  122. homebrew:
  123. packages:
  124. - tor
  125. install:
  126. ## Chutney has no dependencies, apart from tor
  127. ## List installed package versions
  128. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then dpkg-query --show; fi
  129. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew list --versions; fi
  130. - python --version
  131. - tor --version
  132. script:
  133. - tools/test-network.sh
  134. after_failure:
  135. ## List the contents of net/nodes
  136. - ls -lR net/nodes/
  137. ## Dump the important directory documents
  138. #- cat net/nodes/000a*/cached-certs
  139. - cat net/nodes/000a*/cached-consensus
  140. - cat net/nodes/000a*/cached-descriptors*
  141. #- cat net/nodes/000a*/cached-extrainfo*
  142. - cat net/nodes/000a*/cached-microdesc-consensus
  143. - cat net/nodes/000a*/cached-microdescs*
  144. #- cat net/nodes/000a*/key-pinning-journal
  145. #- cat net/nodes/000a*/router-stability
  146. #- cat net/nodes/00*a*/sr-state
  147. #- cat net/nodes/00*a*/state
  148. - for f in net/nodes/00*a*/v3-status-votes ; do echo "$f"; cat "$f"; done
  149. - for f in net/nodes/00*a*/unparseable-descs/* ; do echo "$f"; cat "$f"; done
  150. ## Re-run chutney in debug mode
  151. ## TODO: improve debug mode
  152. - tools/test-network.sh --debug && echo "chutney debug run succeeded"
  153. notifications:
  154. irc:
  155. channels:
  156. - "irc.oftc.net#tor-ci"
  157. template:
  158. - "%{repository} %{branch} %{commit} - %{author}: %{commit_subject}"
  159. - "Build #%{build_number} %{result}. Details: %{build_url}"
  160. on_success: change
  161. on_failure: change
  162. email:
  163. on_success: never
  164. on_failure: change