[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/release-0.3.3] Travis: add rust cargo online mode
commit 14ceee0fd1cc82da9fc6cd51d69173546bc4d7fd
Author: teor <teor@xxxxxxxxxxxxxx>
Date: Thu Aug 9 22:32:20 2018 +1000
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.
---
.travis.yml | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index e61c3ba8b..43392b3f4 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.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits