.travis.yml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. language: python
  2. ## Use the default python version on macOS
  3. #python:
  4. os:
  5. - linux
  6. ## We can't add macOS here, because language: python isn't supported by
  7. ## macOS Travis. So we add macOS in matrix: include:
  8. ## The build matrix in the following stanza expands into builds for each
  9. ## OS and python version.
  10. ## Placeholder
  11. #env:
  12. # global:
  13. # -
  14. # matrix:
  15. # -
  16. matrix:
  17. # include creates Linux, python 2.7, tor stable builds by default
  18. include:
  19. ## Test macOS with its default python version, and work around an issue
  20. ## with language: python on Travis macOS
  21. - os: osx
  22. language: c
  23. ## Test tor 0.3.5 and tor nightly
  24. - addons:
  25. apt:
  26. sources:
  27. - sourceline: 'deb https://deb.torproject.org/torproject.org trusty main'
  28. key_url: 'http://ha.pool.sks-keyservers.net/pks/lookup?search=0xA3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89&options=mr&op=get'
  29. - sourceline: 'deb https://deb.torproject.org/torproject.org tor-experimental-0.3.5.x-trusty main'
  30. packages:
  31. - tor
  32. - addons:
  33. apt:
  34. sources:
  35. - sourceline: 'deb https://deb.torproject.org/torproject.org trusty main'
  36. key_url: 'http://ha.pool.sks-keyservers.net/pks/lookup?search=0xA3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89&options=mr&op=get'
  37. - sourceline: 'deb https://deb.torproject.org/torproject.org tor-nightly-master-trusty main'
  38. packages:
  39. - tor
  40. ## Test all supported python releases
  41. - python: "2.7"
  42. - python: "3.4"
  43. - python: "3.5"
  44. - python: "3.6"
  45. ## Travis Trusty doesn't support these versions
  46. #- python: "3.7"
  47. #- python: "3.8-dev"
  48. - python: "nightly"
  49. # PyPy versions
  50. ## Travis Trusty doesn't support these versions
  51. #- python: "pypy2.7"
  52. - python: "pypy3.5"
  53. ## Uncomment to allow the build to report success (with non-required
  54. ## sub-builds continuing to run) if all required sub-builds have
  55. ## succeeded. This is somewhat buggy currently: it can cause
  56. ## duplicate notifications and prematurely report success if a
  57. ## single sub-build has succeeded. See
  58. ## https://github.com/travis-ci/travis-ci/issues/1696
  59. #fast_finish: true
  60. ## Careful! We use global envs, which makes it hard to exclude or
  61. ## allow failures by env:
  62. ## https://docs.travis-ci.com/user/customizing-the-build#matching-jobs-with-allow_failures
  63. #exclude:
  64. ## Placeholder
  65. #- python: "3.6"
  66. # os: linux
  67. ## We don't need sudo. (The "apt:" stanza after this allows us to not need
  68. ## sudo; otherwise, we would need it for getting dependencies.)
  69. sudo: false
  70. ## (Linux only) Use the latest Linux image (Ubuntu Trusty)
  71. dist: trusty
  72. ## (OSX only) Use the default OSX image
  73. ## See https://docs.travis-ci.com/user/reference/osx#os-x-version
  74. ## Default is Xcode 9.4 on macOS 10.13 as of August 2018
  75. #osx_image: xcode9.4
  76. ## Download our dependencies
  77. addons:
  78. ## (Linux only)
  79. apt:
  80. sources:
  81. ## Trusty has Tor 0.2.4, so we need a newer version of Tor from the
  82. ## torproject repositories, and the torproject key from the keyservers
  83. - sourceline: 'deb https://deb.torproject.org/torproject.org trusty main'
  84. key_url: 'http://ha.pool.sks-keyservers.net/pks/lookup?search=0xA3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89&options=mr&op=get'
  85. packages:
  86. ## Required dependencies
  87. - tor
  88. ## Is this necessary for a once-off build?
  89. #- deb.torproject.org-keyring
  90. ## (macOS only)
  91. homebrew:
  92. packages:
  93. ## Required dependencies
  94. - tor
  95. before_install:
  96. ## Placeholder
  97. -
  98. install:
  99. ## Placeholder
  100. -
  101. ##
  102. ## Finally, 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. after_success:
  129. ## Placeholder
  130. -
  131. notifications:
  132. irc:
  133. channels:
  134. - "irc.oftc.net#tor-ci"
  135. template:
  136. - "%{repository} %{branch} %{commit} - %{author}: %{commit_subject}"
  137. - "Build #%{build_number} %{result}. Details: %{build_url}"
  138. on_success: change
  139. on_failure: change
  140. email:
  141. on_success: never
  142. on_failure: change