.travis.yml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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-trusty main'
  22. key_url: 'http://ha.pool.sks-keyservers.net/pks/lookup?search=0xA3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89&options=mr&op=get'
  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 trusty main'
  30. key_url: 'http://ha.pool.sks-keyservers.net/pks/lookup?search=0xA3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89&options=mr&op=get'
  31. - sourceline: 'deb https://deb.torproject.org/torproject.org tor-experimental-0.3.5.x-trusty 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 trusty main'
  39. key_url: 'http://ha.pool.sks-keyservers.net/pks/lookup?search=0xA3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89&options=mr&op=get'
  40. - sourceline: 'deb https://deb.torproject.org/torproject.org tor-nightly-master-trusty 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. ## Travis Trusty doesn't support these versions
  50. #- python: "3.7"
  51. #- python: "3.8-dev"
  52. - python: "nightly"
  53. # PyPy versions
  54. ## Travis Trusty doesn't support 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 latest Linux image (Ubuntu Trusty)
  72. dist: trusty
  73. ## (OSX only) Use the default OSX image
  74. ## See https://docs.travis-ci.com/user/reference/osx#os-x-version
  75. ## Default is Xcode 9.4 on macOS 10.13 as of August 2018
  76. #osx_image: xcode9.4
  77. ## This env var isn't used by the build, but it's useful for debugging
  78. ## It should be kept in sync with the Linux tor version below
  79. env:
  80. - TOR_VERSION="stable"
  81. ## Download our dependencies
  82. addons:
  83. ## (Linux only)
  84. apt:
  85. sources:
  86. ## Trusty has Tor 0.2.4, so we need a newer version of Tor from the
  87. ## torproject repositories, and the torproject key from the keyservers
  88. - sourceline: 'deb https://deb.torproject.org/torproject.org trusty main'
  89. key_url: 'http://ha.pool.sks-keyservers.net/pks/lookup?search=0xA3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89&options=mr&op=get'
  90. packages:
  91. - tor
  92. ## (macOS only)
  93. homebrew:
  94. packages:
  95. - tor
  96. install:
  97. ## Chutney has no dependencies, apart from tor
  98. ## List installed package versions
  99. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then dpkg-query --show; fi
  100. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew list --versions; fi
  101. - python --version
  102. - tor --version
  103. script:
  104. - tools/test-network.sh
  105. after_failure:
  106. ## List the contents of net/nodes
  107. - ls -lR net/nodes/
  108. ## Dump the important directory documents
  109. #- cat net/nodes/000a*/cached-certs
  110. - cat net/nodes/000a*/cached-consensus
  111. - cat net/nodes/000a*/cached-descriptors*
  112. #- cat net/nodes/000a*/cached-extrainfo*
  113. - cat net/nodes/000a*/cached-microdesc-consensus
  114. - cat net/nodes/000a*/cached-microdescs*
  115. #- cat net/nodes/000a*/key-pinning-journal
  116. #- cat net/nodes/000a*/router-stability
  117. #- cat net/nodes/00*a*/sr-state
  118. #- cat net/nodes/00*a*/state
  119. - for f in net/nodes/00*a*/v3-status-votes ; do echo "$f"; cat "$f"; done
  120. - for f in net/nodes/00*a*/unparseable-descs/* ; do echo "$f"; cat "$f"; done
  121. ## Re-run chutney in debug mode
  122. ## TODO: improve debug mode
  123. - tools/test-network.sh --debug && echo "chutney debug run succeeded"
  124. notifications:
  125. irc:
  126. channels:
  127. - "irc.oftc.net#tor-ci"
  128. template:
  129. - "%{repository} %{branch} %{commit} - %{author}: %{commit_subject}"
  130. - "Build #%{build_number} %{result}. Details: %{build_url}"
  131. on_success: change
  132. on_failure: change
  133. email:
  134. on_success: never
  135. on_failure: change