commit a427bc9b8cdabfea260742afced03e17f7a2f822 Author: teor teor@torproject.org Date: Mon Oct 22 12:02:06 2018 +1000
Travis: add a basic Travis CI config
Part of 27912. --- .travis.yml | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+)
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..90236c6 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,105 @@ +language: python + +python: + - "2.7" + +os: + - linux + ## Python versions aren't availabe on macOS Travis + #- osx + +## The build matrix in the following stanza expands into builds for each +## OS and python version. +## Placeholder +#env: +# global: +# - +# matrix: +# - + +## Add extra builds +## Placeholder +#matrix: +# include: +# - env: + + ## Uncomment to allow the build to report success (with non-required + ## sub-builds continuing to run) if all required sub-builds have + ## succeeded. This is somewhat buggy currently: it can cause + ## duplicate notifications and prematurely report success if a + ## single sub-build has succeeded. See + ## https://github.com/travis-ci/travis-ci/issues/1696 + #fast_finish: true + + ## Careful! We use global envs, which makes it hard to exclude or + ## allow failures by env: + ## https://docs.travis-ci.com/user/customizing-the-build#matching-jobs-with-all... + #exclude: + ## Placeholder + #- python: "3.6" + # os: linux + +## We don't need sudo. (The "apt:" stanza after this allows us to not need +## sudo; otherwise, we would need it for getting dependencies.) +sudo: false + +## (Linux only) Use the latest Linux image (Ubuntu Trusty) +dist: trusty + +## (Linux only) Download our dependencies +addons: + apt: + sources: + ## Trusty has Tor 0.2.4, so we need a newer version of Tor from the + ## torproject repositories, and the torproject key from the keyservers + - sourceline: 'deb https://deb.torproject.org/torproject.org trusty main' + key_url: 'http://ha.pool.sks-keyservers.net/pks/lookup?search=0xA3C4F0F979CAA22CDBA8F5...' + packages: + ## Required dependencies + - tor + ## Is this necessary for a once-off build? + #- deb.torproject.org-keyring + +## (OSX only) Use the default OSX image +## See https://docs.travis-ci.com/user/reference/osx#os-x-version +## Default is Xcode 9.4 on macOS 10.13 as of August 2018 +#osx_image: xcode9.4 + +before_install: + ## Placeholder + - + +install: + ## Placeholder + - + ## + ## Finally, list installed package versions + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then dpkg-query --show; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew list --versions; fi + - python --version + - tor --version + +script: + - tools/test-network.sh + +after_failure: + ## Re-run chutney in debug mode + ## TODO: improve debug mode + - tools/test-network.sh --debug + +after_success: + ## Placeholder + - + +notifications: + irc: + channels: + - "irc.oftc.net#tor-ci" + template: + - "%{repository} %{branch} %{commit} - %{author}: %{commit_subject}" + - "Build #%{build_number} %{result}. Details: %{build_url}" + on_success: change + on_failure: change + email: + on_success: never + on_failure: change