diff options
author | teor <teor@torproject.org> | 2018-08-09 22:32:20 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2018-08-09 23:40:24 +1000 |
commit | 14ceee0fd1cc82da9fc6cd51d69173546bc4d7fd (patch) | |
tree | 76a0fba7b6b846f6f310feefa8f080da8b6e2f91 /.travis.yml | |
parent | e4d7f2667c6c4660ad9663a39fbdef7d3e2961cd (diff) | |
download | tor-14ceee0fd1cc82da9fc6cd51d69173546bc4d7fd.tar.gz tor-14ceee0fd1cc82da9fc6cd51d69173546bc4d7fd.zip |
Travis: add rust cargo online mode
Forward-ports parts of the 0.3.2 travis config on top of the 0.2.9
merge.
Also:
* build rust on clang and gcc, Linux and macOS
* build combinations of non-default options on gcc Linux
* exclude broken builds
* log the rustup version
Part of 24629.
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml index e61c3ba8b2..43392b3f4b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,6 +28,11 @@ env: ## We don't list default variable values, because we set the defaults ## in global (or the default is unset) - + ## We turn off hardening for Rust builds, because they are incompatible, + ## and it's going to take a while for them to be fixed. See: + ## https:/trac.torproject.org/projects/tor/ticket/25386 + ## https:/trac.torproject.org/projects/tor/ticket/26398 + - RUST_OPTIONS="--enable-rust --enable-cargo-online-mode" HARDENING_OPTIONS="" matrix: ## include creates builds with gcc, linux, sudo: false @@ -36,7 +41,8 @@ matrix: - env: COVERAGE_OPTIONS="--enable-coverage" HARDENING_OPTIONS="" ## We only want to check these build option combinations once ## (they shouldn't vary by compiler or OS) - - env: HARDENING_OPTIONS="" + ## We run rust and coverage with hardening off, which seems like enough + # - env: HARDENING_OPTIONS="" ## We check asciidoc with distcheck, to make sure we remove doc products - env: ASCIIDOC_OPTIONS="" DISTCHECK="yes" @@ -129,14 +135,26 @@ install: - if [[ "$COVERAGE_OPTIONS" != "" ]]; then pip install --user cpp-coveralls; fi ## If we're on OSX, and using asciidoc, install asciidoc - if [[ "$ASCIIDOC_OPTIONS" == "" ]] && [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install asciidoc; fi + ## If we're using Rust, download rustup + - if [[ "$RUST_OPTIONS" != "" ]]; then curl -Ssf -o rustup.sh https://sh.rustup.rs; fi + ## Install the stable channels of rustc and cargo and setup our toolchain environment + - if [[ "$RUST_OPTIONS" != "" ]]; then sh rustup.sh -y --default-toolchain stable; fi + - if [[ "$RUST_OPTIONS" != "" ]]; then source $HOME/.cargo/env; fi ## ## 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 + ## Get some info about rustup, rustc and cargo + - if [[ "$RUST_OPTIONS" != "" ]]; then which rustup; fi + - if [[ "$RUST_OPTIONS" != "" ]]; then which rustc; fi + - if [[ "$RUST_OPTIONS" != "" ]]; then which cargo; fi + - if [[ "$RUST_OPTIONS" != "" ]]; then rustup --version; fi + - if [[ "$RUST_OPTIONS" != "" ]]; then rustc --version; fi + - if [[ "$RUST_OPTIONS" != "" ]]; then cargo --version; fi script: - ./autogen.sh - - CONFIGURE_FLAGS="$ASCIIDOC_OPTIONS $COVERAGE_OPTIONS $HARDENING_OPTIONS $OPENSSL_OPTIONS --enable-fatal-warnings --disable-silent-rules" + - CONFIGURE_FLAGS="$ASCIIDOC_OPTIONS $COVERAGE_OPTIONS $HARDENING_OPTIONS $OPENSSL_OPTIONS $RUST_OPTIONS --enable-fatal-warnings --disable-silent-rules" - echo $CONFIGURE_FLAGS - ./configure $CONFIGURE_FLAGS ## We run `make check` because that's what https://jenkins.torproject.org does. |