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