.travis.yml 5.2 KB

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