.travis.yml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. language: c
  2. compiler:
  3. - gcc
  4. - clang
  5. notifications:
  6. irc:
  7. channels:
  8. - "irc.oftc.net#tor-ci"
  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. ## Required dependencies
  32. - libevent-dev
  33. - libseccomp2
  34. - zlib1g-dev
  35. ## Optional dependencies
  36. - liblzma-dev
  37. - libscrypt-dev
  38. ## zstd doesn't exist in Ubuntu Trusty
  39. #- libzstd
  40. ## The build matrix in the following two stanzas expands into four builds (per OS):
  41. ##
  42. ## * with GCC, with Rust
  43. ## * with GCC, without Rust
  44. ## * with Clang, with Rust
  45. ## * with Clang, without Rust
  46. env:
  47. global:
  48. ## The Travis CI environment allows us two cores, so let's use both.
  49. - MAKEFLAGS="-j 2"
  50. matrix:
  51. ## If one build in the matrix fails (e.g. if building withour Rust and Clang
  52. ## fails, but building with Rust and GCC is still going), then cancel the
  53. ## entire job early and call the whole thing a failure.
  54. fast_finish: true
  55. before_install:
  56. ## If we're on OSX, homebrew usually needs to updated first
  57. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
  58. ## Download rustup
  59. - curl -Ssf -o rustup.sh https://sh.rustup.rs
  60. install:
  61. ## If we're on OSX use brew to install required dependencies (for Linux, see the "apt:" section above)
  62. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then { brew outdated openssl || brew upgrade openssl; }; fi
  63. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then { brew outdated libevent || brew upgrade libevent; }; fi
  64. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then { brew outdated pkg-config || brew upgrade pkg-config; }; fi
  65. ## If we're on OSX also install the optional dependencies
  66. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then { brew outdated xz || brew upgrade xz; }; fi
  67. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then { brew outdated libscrypt || brew upgrade libscrypt; }; fi
  68. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then { brew outdated zstd || brew upgrade zstd; }; fi
  69. script:
  70. - ./autogen.sh
  71. - ./configure $RUST_OPTIONS --disable-asciidoc --enable-gcc-warnings --disable-silent-rules --enable-fragile-hardening
  72. ## We run `make check` because that's what https://jenkins.torproject.org does.
  73. - make check
  74. after_failure:
  75. ## `make check` will leave a log file with more details of test failures.
  76. - cat test-suite.log