.travis.yml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. language: python
  2. os:
  3. - linux
  4. ## We add a single macOS build below
  5. matrix:
  6. # include creates Linux, python 2.7, tor stable builds by default
  7. # the key(s) in each item override these defaults
  8. include:
  9. ## Test macOS with its default python version, and work around an issue
  10. ## with language: python on Travis macOS
  11. ## We get the tor version in the homebrew cache on the macOS image
  12. ## The current tor version in homebrew is on this page:
  13. ## https://formulae.brew.sh/formula/tor
  14. - os: osx
  15. language: c
  16. env: TOR_VERSION="stable-release"
  17. ## Test tor lts, stable, alpha, and nightly
  18. ## Standard dpkg configs fall back to stable when newer
  19. ## repositories are removed. But we want to fail, so we notice and
  20. ## update the repositories.
  21. ## TODO: check what happens when they fall back to 0.2.7 in xenial main
  22. ## The current tor versions in Ubuntu are on this page:
  23. ## https://packages.ubuntu.com/search?keywords=tor&searchon=names&exact=1
  24. - addons:
  25. apt:
  26. sources:
  27. - sourceline: 'deb https://deb.torproject.org/torproject.org tor-nightly-0.2.9.x-xenial main'
  28. key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
  29. packages:
  30. - tor
  31. env: TOR_VERSION="0.2.9-nightly"
  32. - addons:
  33. apt:
  34. sources:
  35. - sourceline: 'deb https://deb.torproject.org/torproject.org tor-nightly-0.3.5.x-xenial main'
  36. key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
  37. packages:
  38. - tor
  39. env: TOR_VERSION="0.3.5-nightly"
  40. - addons:
  41. apt:
  42. sources:
  43. - sourceline: 'deb https://deb.torproject.org/torproject.org tor-nightly-master-xenial main'
  44. key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
  45. packages:
  46. - tor
  47. env: TOR_VERSION="master-nightly"
  48. ## Test all supported python releases
  49. - python: "2.7"
  50. - python: "3.4"
  51. - python: "3.5"
  52. - python: "3.6"
  53. ## TODO: check if Travis Xenial supports these versions
  54. #- python: "3.7"
  55. #- python: "3.8-dev"
  56. - python: "nightly"
  57. # PyPy versions
  58. ## TODO: check if Travis Xenial supports these versions
  59. #- python: "pypy2.7"
  60. - python: "pypy3.5"
  61. ## Uncomment to allow the build to report success (with non-required
  62. ## sub-builds continuing to run) if all required sub-builds have
  63. ## succeeded. This is somewhat buggy currently: it can cause
  64. ## duplicate notifications and prematurely report success if a
  65. ## single sub-build has succeeded. See
  66. ## https://github.com/travis-ci/travis-ci/issues/1696
  67. #fast_finish: true
  68. ## These builds fail in Travis at the moment
  69. #allow_failures:
  70. # - env: TOR_VERSION="master-nightly"
  71. ## We don't need sudo. (The "apt:" stanza after this allows us to not need
  72. ## sudo; otherwise, we would need it for getting dependencies.)
  73. sudo: false
  74. ## (Linux only) Use the Ubuntu Xenial Linux Image
  75. ## deb.torproject.org doesn't support Trusty any more
  76. dist: xenial
  77. ## (OSX only) Use the default OSX image
  78. ## See https://docs.travis-ci.com/user/reference/osx#os-x-version
  79. ## Default is Xcode 9.4 on macOS 10.13 as of August 2018
  80. #osx_image: xcode9.4
  81. ## This env var isn't used by the build, but it's useful for debugging
  82. ## It should be kept in sync with the Linux tor version below
  83. env:
  84. - TOR_VERSION="stable-release"
  85. ## Download our dependencies
  86. addons:
  87. ## (Linux only)
  88. apt:
  89. sources:
  90. ## Xenial has Tor 0.2.7, so we need a newer version of Tor from the
  91. ## torproject repositories, and the torproject key from deb.tpo
  92. - sourceline: 'deb https://deb.torproject.org/torproject.org xenial main'
  93. key_url: 'https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc'
  94. packages:
  95. - tor
  96. ## (macOS only)
  97. homebrew:
  98. packages:
  99. - tor
  100. install:
  101. ## Chutney has no dependencies, apart from tor
  102. ## List installed package versions
  103. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then dpkg-query --show; fi
  104. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew list --versions; fi
  105. - python --version
  106. - tor --version
  107. script:
  108. - tools/test-network.sh
  109. after_failure:
  110. ## List the contents of net/nodes
  111. - ls -lR net/nodes/
  112. ## Dump the important directory documents
  113. #- cat net/nodes/000a*/cached-certs
  114. - cat net/nodes/000a*/cached-consensus
  115. - cat net/nodes/000a*/cached-descriptors*
  116. #- cat net/nodes/000a*/cached-extrainfo*
  117. - cat net/nodes/000a*/cached-microdesc-consensus
  118. - cat net/nodes/000a*/cached-microdescs*
  119. #- cat net/nodes/000a*/key-pinning-journal
  120. #- cat net/nodes/000a*/router-stability
  121. #- cat net/nodes/00*a*/sr-state
  122. #- cat net/nodes/00*a*/state
  123. - for f in net/nodes/00*a*/v3-status-votes ; do echo "$f"; cat "$f"; done
  124. - for f in net/nodes/00*a*/unparseable-descs/* ; do echo "$f"; cat "$f"; done
  125. ## Re-run chutney in debug mode
  126. ## TODO: improve debug mode
  127. - tools/test-network.sh --debug && echo "chutney debug run succeeded"
  128. notifications:
  129. irc:
  130. channels:
  131. - "irc.oftc.net#tor-ci"
  132. template:
  133. - "%{repository} %{branch} %{commit} - %{author}: %{commit_subject}"
  134. - "Build #%{build_number} %{result}. Details: %{build_url}"
  135. on_success: change
  136. on_failure: change
  137. email:
  138. on_success: never
  139. on_failure: change