.travis.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. language: c
  2. compiler:
  3. - gcc
  4. - clang
  5. notifications:
  6. irc:
  7. channels:
  8. - "irc.oftc.net#tor-bots"
  9. template:
  10. - "%{repository} %{branch} %{commit} - %{author}: %{commit_subject}"
  11. - "Build #%{build_number} %{result}. Details: %{build_url}"
  12. on_success: change
  13. on_failure: change
  14. email:
  15. on_success: never
  16. on_failure: change
  17. os:
  18. - linux
  19. ## Uncomment the following line to also run the entire build matrix on OSX.
  20. ## This will make your CI builds take roughly ten times longer to finish.
  21. # - osx
  22. ## Use the Ubuntu Trusty images.
  23. dist: trusty
  24. ## We don't need sudo. (The "apt:" stanza after this allows us to not need sudo;
  25. ## otherwise, we would need it for getting dependencies.)
  26. sudo: false
  27. ## (Linux only) Download our dependencies
  28. addons:
  29. apt:
  30. packages:
  31. - libevent-dev
  32. - libseccomp2
  33. - zlib1g-dev
  34. ## The build matrix in the following two stanzas expands into four builds (per OS):
  35. ##
  36. ## * with GCC, with Rust
  37. ## * with GCC, without Rust
  38. ## * with Clang, with Rust
  39. ## * with Clang, without Rust
  40. env:
  41. global:
  42. ## The Travis CI environment allows us two cores, so let's use both.
  43. - MAKEFLAGS="-j 2"
  44. matrix:
  45. ## If one build in the matrix fails (e.g. if building withour Rust and Clang
  46. ## fails, but building with Rust and GCC is still going), then cancel the
  47. ## entire job early and call the whole thing a failure.
  48. fast_finish: true
  49. before_install:
  50. ## If we're on OSX, homebrew usually needs to updated first
  51. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
  52. ## Download rustup
  53. - curl -Ssf -o rustup.sh https://sh.rustup.rs
  54. install:
  55. ## If we're on OSX use brew to install dependencies (for Linux, see the "apt:" section above)
  56. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then { brew outdated openssl || brew upgrade openssl; }; fi
  57. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then { brew outdated libevent || brew upgrade libevent; }; fi
  58. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then { brew outdated pkg-config || brew upgrade pkg-config; }; fi
  59. script:
  60. - ./autogen.sh
  61. - ./configure $RUST_OPTIONS --disable-asciidoc --enable-fatal-warnings --disable-silent-rules
  62. ## We run `make check` because that's what https://jenkins.torproject.org does.
  63. - make check
  64. after_failure:
  65. ## `make check` will leave a log file with more details of test failures.
  66. - cat test-suite.log