From 340da669be373174550e038d1d20ff2bff49eb6b Mon Sep 17 00:00:00 2001 From: Taylor Yu Date: Thu, 28 Jun 2018 14:43:31 -0500 Subject: [PATCH 01/24] Add more optional packages to Travis Apparently we weren't building with either libcap or libseccomp on Travis. Install libcap-dev and libseccomp-dev in .travis.yml. Closes ticket 26560. --- .travis.yml | 3 ++- changes/ticket26560 | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changes/ticket26560 diff --git a/.travis.yml b/.travis.yml index 6a3e1bfc01..e3735f7d58 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,11 +42,12 @@ addons: packages: ## Required dependencies - libevent-dev - - libseccomp2 - zlib1g-dev ## Optional dependencies + - libcap-dev - liblzma-dev - libscrypt-dev + - libseccomp-dev ## zstd doesn't exist in Ubuntu Trusty #- libzstd diff --git a/changes/ticket26560 b/changes/ticket26560 new file mode 100644 index 0000000000..5b4fb1bfe7 --- /dev/null +++ b/changes/ticket26560 @@ -0,0 +1,3 @@ + o Minor features (continuous integration): + - Install libcap-dev and libseccomp2-dev so these optional + dependencies get tested on Travis CI. Closes ticket 26560. From c53f17fb1a3b787567cee1e87f03a887a5cee0bd Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 9 Aug 2018 16:42:05 +1000 Subject: [PATCH 02/24] Travis: Rewrite .travis.yml Build on all compilers: * default options + hardening Build on gcc: * coverage (+ no hardening) * distcheck * no hardening Add some extra logging: * tail config.log on failure (config.log is too long for travis to render) Put the config in a more logical order * Sort config items in chronological order * Put related items together Part of 24629. --- .travis.yml | 225 ++++++++++++++++++++++++---------------------------- 1 file changed, 105 insertions(+), 120 deletions(-) diff --git a/.travis.yml b/.travis.yml index e3735f7d58..dfdf20f311 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,110 @@ language: c -## Comment out the compiler list for now to allow an explicit build -## matrix. -# compiler: -# - gcc -# - clang +compiler: + - gcc + - clang + +os: + - linux + +## The build matrix in the following stanza expands into builds for each +## OS and compiler. +env: + global: + ## The Travis CI environment allows us two cores, so let's use both. + - MAKEFLAGS="-j 2" + ## We turn on hardening by default + ## Also known as --enable-fragile-hardening in 0.3.0.3-alpha and later + - HARDENING_OPTIONS="--enable-expensive-hardening" + matrix: + ## We want to use each build option at least once + ## + ## We don't list default variable values, because we set the defaults + ## in global (or the default is unset) + - + +matrix: + ## include creates builds with gcc, linux, sudo: false + include: + ## We include a single coverage build with the best options for coverage + - 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: DISTCHECK="yes" + - env: HARDENING_OPTIONS="" + + ## Uncomment to allow the build to report success (with non-required + ## sub-builds continuing to run) if all required sub-builds have + ## succeeded. This is somewhat buggy currently: it can cause + ## duplicate notifications and prematurely report success if a + ## single sub-build has succeeded. See + ## https://github.com/travis-ci/travis-ci/issues/1696 + # fast_finish: true + + ## Careful! We use global envs, which makes it hard to exclude or + ## allow failures by env: + ## https://docs.travis-ci.com/user/customizing-the-build#matching-jobs-with-allow_failures + exclude: + ## Clang doesn't work in containerized builds, see below. + - compiler: clang + sudo: false + ## We also exclude non-containerized gcc, because they're slow and redundant. + - compiler: gcc + sudo: required + +## We don't need sudo. (The "apt:" stanza after this allows us to not need +## sudo; otherwise, we would need it for getting dependencies.) +## +## But we use "sudo: required" to force non-containerized builds, working +## around a Travis CI environment issue: clang LeakAnalyzer fails +## because it requires ptrace and the containerized environment no +## longer allows ptrace. +## https://github.com/travis-ci/travis-ci/issues/9033 +## +## In the matrix above, we exclude redundant combinations. +sudo: + - false + - required + +## (Linux only) Use the latest Linux image (Ubuntu Trusty) +dist: trusty + +## (Linux only) Download our dependencies +addons: + apt: + packages: + ## Required dependencies + - libevent-dev + - zlib1g-dev + ## Optional dependencies + - libcap-dev + - libscrypt-dev + - libseccomp-dev + +install: + ## Install conditional features + ## Install coveralls + - if [[ "$COVERAGE_OPTIONS" != "" ]]; then pip install --user cpp-coveralls; fi + +script: + - ./autogen.sh + - ./configure $COVERAGE_OPTIONS $HARDENING_OPTIONS --disable-asciidoc --enable-fatal-warnings --disable-silent-rules + ## We run `make check` because that's what https://jenkins.torproject.org does. + - if [[ "$DISTCHECK" == "" ]]; then make check; fi + - if [[ "$DISTCHECK" != "" ]]; then make distcheck DISTCHECK_CONFIGURE_FLAGS="$HARDENING_OPTIONS $COVERAGE_OPTIONS --disable-asciidoc --enable-fatal-warnings --disable-silent-rules"; fi + +after_failure: + ## configure will leave a log file with more details of config failures. + ## But the log is too long for travis' rendered view, so tail it. + - tail -1000 config.log + ## `make check` will leave a log file with more details of test failures. + - if [[ "$DISTCHECK" == "" ]]; then cat test-suite.log; fi + ## `make distcheck` puts it somewhere different. + - if [[ "$DISTCHECK" != "" ]]; then make show-distdir-testlog; fi + +after_success: + ## If this build was one that produced coverage, upload it. + - if [[ "$COVERAGE_OPTIONS" != "" ]]; then coveralls -b . --exclude src/test --exclude src/trunnel --gcov-options '\-p'; fi notifications: irc: @@ -18,118 +118,3 @@ notifications: email: on_success: never on_failure: change - -os: - - linux - ## Uncomment the following line to also run the entire build matrix on OSX. - ## This will make your CI builds take roughly ten times longer to finish. - # - osx - -## Use the Ubuntu Trusty images. -dist: trusty - -## We don't need sudo. (The "apt:" stanza after this allows us to not need sudo; -## otherwise, we would need it for getting dependencies.) -## -## We override this in the explicit build matrix to work around a -## Travis CI environment regression -## https://github.com/travis-ci/travis-ci/issues/9033 -sudo: false - -## (Linux only) Download our dependencies -addons: - apt: - packages: - ## Required dependencies - - libevent-dev - - zlib1g-dev - ## Optional dependencies - - libcap-dev - - liblzma-dev - - libscrypt-dev - - libseccomp-dev - ## zstd doesn't exist in Ubuntu Trusty - #- libzstd - -## The build matrix in the following two stanzas expands into four builds (per OS): -## -## * with GCC, with Rust -## * with GCC, without Rust -## * with Clang, with Rust -## * with Clang, without Rust -env: - global: - ## The Travis CI environment allows us two cores, so let's use both. - - MAKEFLAGS="-j 2" - -matrix: - ## Uncomment to allow the build to report success (with non-required - ## sub-builds continuing to run) if all required sub-builds have - ## succeeded. This is somewhat buggy currently: it can cause - ## duplicate notifications and prematurely report success if a - ## single sub-build has succeeded. See - ## https://github.com/travis-ci/travis-ci/issues/1696 - # fast_finish: true - - ## Uncomment the appropriate lines below to allow the build to - ## report success even if some less-critical sub-builds fail and it - ## seems likely to take a while for someone to fix it. Currently - ## Travis CI doesn't distinguish "all builds succeeded" from "some - ## non-required sub-builds failed" except on the individual build's - ## page, which makes it somewhat annoying to detect from the - ## branches and build history pages. See - ## https://github.com/travis-ci/travis-ci/issues/8716 - allow_failures: - # - env: RUST_OPTIONS="--enable-rust" TOR_RUST_DEPENDENCIES=true - # - env: RUST_OPTIONS="--enable-rust --enable-cargo-online-mode - # - compiler: clang - - ## Create explicit matrix entries to work around a Travis CI - ## environment issue. Missing keys inherit from the first list - ## entry under that key outside the "include" clause. - include: - - compiler: gcc - - compiler: gcc - env: COVERAGE_OPTIONS="--enable-coverage" - - compiler: gcc - env: DISTCHECK="yes" - ## The "sudo: required" forces non-containerized builds, working - ## around a Travis CI environment issue: clang LeakAnalyzer fails - ## because it requires ptrace and the containerized environment no - ## longer allows ptrace. - - compiler: clang - sudo: required - -before_install: - ## If we're on OSX, homebrew usually needs to updated first - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi - ## Download rustup - - curl -Ssf -o rustup.sh https://sh.rustup.rs - - if [[ "$COVERAGE_OPTIONS" != "" ]]; then pip install --user cpp-coveralls; fi - -install: - ## If we're on OSX use brew to install required dependencies (for Linux, see the "apt:" section above) - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then { brew outdated openssl || brew upgrade openssl; }; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then { brew outdated libevent || brew upgrade libevent; }; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then { brew outdated pkg-config || brew upgrade pkg-config; }; fi - ## If we're on OSX also install the optional dependencies - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then { brew outdated xz || brew upgrade xz; }; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then { brew outdated libscrypt || brew upgrade libscrypt; }; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then { brew outdated zstd || brew upgrade zstd; }; fi - -script: - - ./autogen.sh - - ./configure $RUST_OPTIONS $COVERAGE_OPTIONS --disable-asciidoc --enable-fatal-warnings --disable-silent-rules --enable-fragile-hardening - ## We run `make check` because that's what https://jenkins.torproject.org does. - - if [[ "$DISTCHECK" == "" ]]; then make check; fi - - if [[ "$DISTCHECK" != "" ]]; then make distcheck DISTCHECK_CONFIGURE_FLAGS="$RUST_OPTIONS $COVERAGE_OPTIONS --disable-asciidoc --enable-fatal-warnings --disable-silent-rules --enable-fragile-hardening"; fi - -after_failure: - ## `make check` will leave a log file with more details of test failures. - - if [[ "$DISTCHECK" == "" ]]; then cat test-suite.log; fi - ## `make distcheck` puts it somewhere different. - - if [[ "$DISTCHECK" != "" ]]; then make show-distdir-testlog; fi - -after_success: - ## If this build was one that produced coverage, upload it. - - if [[ "$COVERAGE_OPTIONS" != "" ]]; then coveralls -b . --exclude src/test --exclude src/trunnel --gcov-options '\-p'; fi From 515d190b2ca9249871d04067c3bdbd312669997e Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 9 Aug 2018 18:03:18 +1000 Subject: [PATCH 03/24] Travis: enable macOS builds Also: * explain why we don't install zlib Part of 24629. --- .travis.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.travis.yml b/.travis.yml index dfdf20f311..d75c74ebb6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ compiler: os: - linux + - osx ## The build matrix in the following stanza expands into builds for each ## OS and compiler. @@ -81,7 +82,26 @@ addons: - libscrypt-dev - libseccomp-dev +## (OSX only) Use the default OSX image +## See https://docs.travis-ci.com/user/reference/osx#os-x-version +## Default is Xcode 9.4 on macOS 10.13 as of August 2018 +#osx_image: xcode9.4 + +before_install: + ## If we're on OSX, homebrew usually needs to updated first + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi + ## We might be upgrading some useless packages, but that's better than missing an upgrade + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade; fi + install: + ## If we're on OSX use brew to install required dependencies (for Linux, see the "apt:" section above) + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install libevent; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install openssl; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install pkg-config; fi + ## macOS comes with zlib by default, so the homebrew install is keg-only + # - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install zlib; fi + ## If we're on OSX also install the optional dependencies + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install libscrypt; fi ## Install conditional features ## Install coveralls - if [[ "$COVERAGE_OPTIONS" != "" ]]; then pip install --user cpp-coveralls; fi From 7cf7b52fcab81c55a4c493bad68eddc0d27a0d63 Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 9 Aug 2018 17:06:13 +1000 Subject: [PATCH 04/24] Travis: create configure flags once, then echo the flags Creating the configure flags once avoids inconsistent flags between configure and distcheck configure. Echoing the flags helps developers work out what configure is doing. (Backported to 0.2.9 and later as a precaution.) Fixes 27088 on 0.3.4.1-alpha, adds logging in previous releases. --- .travis.yml | 6 ++++-- changes/bug27088 | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 changes/bug27088 diff --git a/.travis.yml b/.travis.yml index d75c74ebb6..6169c808ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -108,10 +108,12 @@ install: script: - ./autogen.sh - - ./configure $COVERAGE_OPTIONS $HARDENING_OPTIONS --disable-asciidoc --enable-fatal-warnings --disable-silent-rules + - CONFIGURE_FLAGS="$COVERAGE_OPTIONS $HARDENING_OPTIONS --disable-asciidoc --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. - if [[ "$DISTCHECK" == "" ]]; then make check; fi - - if [[ "$DISTCHECK" != "" ]]; then make distcheck DISTCHECK_CONFIGURE_FLAGS="$HARDENING_OPTIONS $COVERAGE_OPTIONS --disable-asciidoc --enable-fatal-warnings --disable-silent-rules"; fi + - if [[ "$DISTCHECK" != "" ]]; then make distcheck DISTCHECK_CONFIGURE_FLAGS="$CONFIGURE_FLAGS"; fi after_failure: ## configure will leave a log file with more details of config failures. diff --git a/changes/bug27088 b/changes/bug27088 new file mode 100644 index 0000000000..d4d3b292c5 --- /dev/null +++ b/changes/bug27088 @@ -0,0 +1,5 @@ + o Minor bugfixes (continuous integration): + - Pass the module flags to distcheck configure, and + log the flags before running configure. (Backported + to 0.2.9 and later as a precaution.) + Fixes bug 27088; bugfix on 0.3.4.1-alpha. From 74b3a340df0df1eb803b4b17039725fc42d5a86a Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 9 Aug 2018 17:44:11 +1000 Subject: [PATCH 05/24] Travis: make macOS builds work for Tor 0.2.9 Tor 0.2.9 needs extra help to find OpenSSL on macOS. Part of 24629. --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6169c808ae..c2db6b78b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -102,13 +102,15 @@ install: # - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install zlib; fi ## If we're on OSX also install the optional dependencies - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install libscrypt; fi + ## If we're on OSX, OpenSSL is keg-only, so tor 0.2.9 and later need to be configured --with-openssl-dir= to build + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then OPENSSL_OPTIONS=--with-openssl-dir=`brew --prefix openssl`; fi ## Install conditional features ## Install coveralls - if [[ "$COVERAGE_OPTIONS" != "" ]]; then pip install --user cpp-coveralls; fi script: - ./autogen.sh - - CONFIGURE_FLAGS="$COVERAGE_OPTIONS $HARDENING_OPTIONS --disable-asciidoc --enable-fatal-warnings --disable-silent-rules" + - CONFIGURE_FLAGS="$COVERAGE_OPTIONS $HARDENING_OPTIONS $OPENSSL_OPTIONS --disable-asciidoc --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. From 286a6bc3b8fd2c369583d0d48c09769fed78e39f Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 9 Aug 2018 15:40:27 +1000 Subject: [PATCH 06/24] Travis: Use ccache Part of ticket 26952. --- .travis.yml | 6 ++++++ changes/ticket26952-ccache | 3 +++ 2 files changed, 9 insertions(+) create mode 100644 changes/ticket26952-ccache diff --git a/.travis.yml b/.travis.yml index c2db6b78b3..424f0d0701 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,8 @@ language: c +cache: + ccache: true + compiler: - gcc - clang @@ -94,6 +97,9 @@ before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade; fi install: + ## If we're on OSX use brew to install ccache (ccache is automatically installed on Linux) + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ccache; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi ## If we're on OSX use brew to install required dependencies (for Linux, see the "apt:" section above) - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install libevent; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install openssl; fi diff --git a/changes/ticket26952-ccache b/changes/ticket26952-ccache new file mode 100644 index 0000000000..edc115e9de --- /dev/null +++ b/changes/ticket26952-ccache @@ -0,0 +1,3 @@ + o Minor features (continuous integration): + - Use ccache in our Travis CI configuration. + Closes ticket 26952. From 23b242104ba5cefb5fd16effda33a611e521050d Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 9 Aug 2018 18:29:29 +1000 Subject: [PATCH 07/24] Travis: run an asciidoc build Implements 27087. --- .travis.yml | 15 +++++++++++++-- changes/ticket27087 | 3 +++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 changes/ticket27087 diff --git a/.travis.yml b/.travis.yml index 424f0d0701..d822780cd3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,8 @@ env: ## We turn on hardening by default ## Also known as --enable-fragile-hardening in 0.3.0.3-alpha and later - HARDENING_OPTIONS="--enable-expensive-hardening" + ## We turn off asciidoc by default, because it's slow + - ASCIIDOC_OPTIONS="--disable-asciidoc" matrix: ## We want to use each build option at least once ## @@ -34,8 +36,9 @@ 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: DISTCHECK="yes" - env: HARDENING_OPTIONS="" + ## We check asciidoc with distcheck, to make sure we remove doc products + - env: ASCIIDOC_OPTIONS="" DISTCHECK="yes" ## Uncomment to allow the build to report success (with non-required ## sub-builds continuing to run) if all required sub-builds have @@ -84,6 +87,12 @@ addons: - libcap-dev - libscrypt-dev - libseccomp-dev + ## Conditional dependencies + ## Always installed, so we don't need sudo + - asciidoc + - docbook-xsl + - docbook-xml + - xmlto ## (OSX only) Use the default OSX image ## See https://docs.travis-ci.com/user/reference/osx#os-x-version @@ -113,10 +122,12 @@ install: ## Install conditional features ## Install coveralls - 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 script: - ./autogen.sh - - CONFIGURE_FLAGS="$COVERAGE_OPTIONS $HARDENING_OPTIONS $OPENSSL_OPTIONS --disable-asciidoc --enable-fatal-warnings --disable-silent-rules" + - CONFIGURE_FLAGS="$ASCIIDOC_OPTIONS $COVERAGE_OPTIONS $HARDENING_OPTIONS $OPENSSL_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. diff --git a/changes/ticket27087 b/changes/ticket27087 new file mode 100644 index 0000000000..b8af70aaa0 --- /dev/null +++ b/changes/ticket27087 @@ -0,0 +1,3 @@ + o Minor features (continuous integration): + - Run asciidoc during Travis CI. + Implements ticket 27087. From fa9a0cc1fe81bef8584f446829b6fcef258cc762 Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 9 Aug 2018 22:16:28 +1000 Subject: [PATCH 08/24] Travis: list installed package versions before building Part of 24629. --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index d822780cd3..9671411b48 100644 --- a/.travis.yml +++ b/.travis.yml @@ -124,6 +124,10 @@ 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 + ## + ## 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 script: - ./autogen.sh From e4d7f2667c6c4660ad9663a39fbdef7d3e2961cd Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 9 Aug 2018 19:33:28 +1000 Subject: [PATCH 09/24] Travis: add lzma and zstd, where available Forward-ports parts of the 0.3.2 travis config on top of the 0.2.9 merge. Part of 24629, also fixes 27090. --- .travis.yml | 5 +++++ changes/bug27090 | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 changes/bug27090 diff --git a/.travis.yml b/.travis.yml index 9671411b48..e61c3ba8b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -85,8 +85,11 @@ addons: - zlib1g-dev ## Optional dependencies - libcap-dev + - liblzma-dev - libscrypt-dev - libseccomp-dev + ## zstd doesn't exist in Ubuntu Trusty + #- libzstd ## Conditional dependencies ## Always installed, so we don't need sudo - asciidoc @@ -117,6 +120,8 @@ install: # - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install zlib; fi ## If we're on OSX also install the optional dependencies - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install libscrypt; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install xz; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install zstd; fi ## If we're on OSX, OpenSSL is keg-only, so tor 0.2.9 and later need to be configured --with-openssl-dir= to build - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then OPENSSL_OPTIONS=--with-openssl-dir=`brew --prefix openssl`; fi ## Install conditional features diff --git a/changes/bug27090 b/changes/bug27090 new file mode 100644 index 0000000000..3d119a9c30 --- /dev/null +++ b/changes/bug27090 @@ -0,0 +1,3 @@ + o Minor bugfixes (continuous integration): + - Build with zstd on macOS. + Fixes bug 27090; bugfix on 0.3.1.5-alpha. From 14ceee0fd1cc82da9fc6cd51d69173546bc4d7fd Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 9 Aug 2018 22:32:20 +1000 Subject: [PATCH 10/24] 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 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. From e387eee362fc5c73b7b54c2e887d08816732a0ae Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 9 Aug 2018 22:52:51 +1000 Subject: [PATCH 11/24] Travis: add rust cargo offline mode Backports parts of the 0.3.3 travis config. Part of 24629. --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 43392b3f4b..8d300004aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,6 +45,9 @@ matrix: # - env: HARDENING_OPTIONS="" ## We check asciidoc with distcheck, to make sure we remove doc products - env: ASCIIDOC_OPTIONS="" DISTCHECK="yes" + ## Check rust offline without distcheck (see above) + ## TOR_RUST_DEPENDENCIES is spelt RUST_DEPENDENCIES in 0.3.2 + - env: RUST_OPTIONS="--enable-rust" RUST_DEPENDENCIES=true HARDENING_OPTIONS="" ## Uncomment to allow the build to report success (with non-required ## sub-builds continuing to run) if all required sub-builds have @@ -140,6 +143,8 @@ install: ## 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 + ## If we're testing rust builds in offline-mode, then set up our vendored dependencies + - if [[ "$RUST_DEPENDENCIES" == "true" ]]; then export RUST_DEPENDENCIES=$PWD/src/ext/rust/crates; fi ## ## Finally, list installed package versions - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then dpkg-query --show; fi From aee51d9a0e0772d6ad65613f67a63ab8856b7b50 Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 9 Aug 2018 22:53:48 +1000 Subject: [PATCH 12/24] Travis: fix a typo --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8d300004aa..25c31c3d2f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -112,7 +112,7 @@ addons: #osx_image: xcode9.4 before_install: - ## If we're on OSX, homebrew usually needs to updated first + ## If we're on OSX, homebrew usually needs to be updated first - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi ## We might be upgrading some useless packages, but that's better than missing an upgrade - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade; fi From 2a35b085eeee977376b5c5e2dd084f9f505d8f8a Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 10 Aug 2018 11:09:18 +1000 Subject: [PATCH 13/24] Rust: backport src/test/test_rust.sh from master Preparation for 26497. --- src/test/test_rust.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/test/test_rust.sh b/src/test/test_rust.sh index d559f94ce0..4ecca7834d 100755 --- a/src/test/test_rust.sh +++ b/src/test/test_rust.sh @@ -1,13 +1,19 @@ #!/bin/sh -# Test all the Rust crates we're using +# Test all Rust crates -crates=tor_util +set -e -exitcode=0 +export LSAN_OPTIONS=suppressions=${abs_top_srcdir}/src/test/rust_supp.txt -for crate in $crates; do - cd "${abs_top_srcdir:-.}/src/rust/${crate}" - CARGO_TARGET_DIR="${abs_top_builddir}/src/rust/target" CARGO_HOME="${abs_top_builddir}/src/rust" "${CARGO:-cargo}" test ${CARGO_ONLINE-"--frozen"} || exitcode=1 +for cargo_toml_dir in "${abs_top_srcdir:-../../..}"/src/rust/*; do + if [ -e "${cargo_toml_dir}/Cargo.toml" ]; then + cd "${cargo_toml_dir}" && \ + CARGO_TARGET_DIR="${abs_top_builddir:-../../..}/src/rust/target" \ + CARGO_HOME="${abs_top_builddir:-../../..}/src/rust/.cargo" \ + "${CARGO:-cargo}" test ${CARGO_ONLINE-"--frozen"} \ + ${EXTRA_CARGO_OPTIONS} \ + --manifest-path "${cargo_toml_dir}/Cargo.toml" || exitcode=1 + fi done exit $exitcode From ce19477ffcdf64255f050308182f3d682e6f6de1 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 10 Aug 2018 11:00:46 +1000 Subject: [PATCH 14/24] Stop setting $CARGO_HOME cargo will use the user's $CARGO_HOME, or $HOME/.cargo by default. Fixes bug 26497; bugfix on 0.3.1.5-alpha. --- changes/bug26497 | 3 +++ src/rust/tor_util/include.am | 1 - src/test/test_rust.sh | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changes/bug26497 diff --git a/changes/bug26497 b/changes/bug26497 new file mode 100644 index 0000000000..d0c05ff3e4 --- /dev/null +++ b/changes/bug26497 @@ -0,0 +1,3 @@ + o Minor bugfixes (rust): + - Stop setting $CARGO_HOME. cargo will use the user's $CARGO_HOME, or + $HOME/.cargo by default. Fixes bug 26497; bugfix on 0.3.1.5-alpha. diff --git a/src/rust/tor_util/include.am b/src/rust/tor_util/include.am index ec3898577b..c110602895 100644 --- a/src/rust/tor_util/include.am +++ b/src/rust/tor_util/include.am @@ -7,7 +7,6 @@ EXTRA_DIST +=\ src/rust/target/release/@TOR_RUST_UTIL_STATIC_NAME@: FORCE ( cd "$(abs_top_srcdir)/src/rust/tor_util" ; \ CARGO_TARGET_DIR="$(abs_top_builddir)/src/rust/target" \ - CARGO_HOME="$(abs_top_builddir)/src/rust" \ $(CARGO) build --release --quiet $(CARGO_ONLINE) ) FORCE: diff --git a/src/test/test_rust.sh b/src/test/test_rust.sh index 4ecca7834d..9ad7a698ad 100755 --- a/src/test/test_rust.sh +++ b/src/test/test_rust.sh @@ -9,7 +9,6 @@ for cargo_toml_dir in "${abs_top_srcdir:-../../..}"/src/rust/*; do if [ -e "${cargo_toml_dir}/Cargo.toml" ]; then cd "${cargo_toml_dir}" && \ CARGO_TARGET_DIR="${abs_top_builddir:-../../..}/src/rust/target" \ - CARGO_HOME="${abs_top_builddir:-../../..}/src/rust/.cargo" \ "${CARGO:-cargo}" test ${CARGO_ONLINE-"--frozen"} \ ${EXTRA_CARGO_OPTIONS} \ --manifest-path "${cargo_toml_dir}/Cargo.toml" || exitcode=1 From c9ad16ca2a2aff63fc4814c843cd376c76e43095 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 10 Aug 2018 11:22:36 +1000 Subject: [PATCH 15/24] Fix $abs_top_srcdir in test_rust.sh Consistently use ../../.. as a fallback for $abs_top_srcdir in test_rust.sh. Fixes bug 27093; bugfix on 0.3.4.3-alpha. --- changes/bug27093 | 3 +++ src/test/test_rust.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changes/bug27093 diff --git a/changes/bug27093 b/changes/bug27093 new file mode 100644 index 0000000000..6c097f1196 --- /dev/null +++ b/changes/bug27093 @@ -0,0 +1,3 @@ + o Minor bugfixes (rust): + - Consistently use ../../.. as a fallback for $abs_top_srcdir in + test_rust.sh. Fixes bug 27093; bugfix on 0.3.4.3-alpha. diff --git a/src/test/test_rust.sh b/src/test/test_rust.sh index 9ad7a698ad..2761b612b5 100755 --- a/src/test/test_rust.sh +++ b/src/test/test_rust.sh @@ -3,7 +3,7 @@ set -e -export LSAN_OPTIONS=suppressions=${abs_top_srcdir}/src/test/rust_supp.txt +export LSAN_OPTIONS=suppressions=${abs_top_srcdir:-../../..}/src/test/rust_supp.txt for cargo_toml_dir in "${abs_top_srcdir:-../../..}"/src/rust/*; do if [ -e "${cargo_toml_dir}/Cargo.toml" ]; then From 3b1c74baa5e1b42c3271b2c74a665da6c528b106 Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 9 Aug 2018 15:41:57 +1000 Subject: [PATCH 16/24] Travis: Use cargo cache Closes ticket 26952. --- .travis.yml | 7 +++++++ changes/ticket26952-cargo | 3 +++ 2 files changed, 10 insertions(+) create mode 100644 changes/ticket26952-cargo diff --git a/.travis.yml b/.travis.yml index 25c31c3d2f..8c2c9e3d61 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,11 @@ language: c cache: ccache: true + ## cargo: true + directories: + - $HOME/.cargo + ## where we point CARGO_TARGET_DIR in all our cargo invocations + - $TRAVIS_BUILD_DIR/src/rust/target compiler: - gcc @@ -116,6 +121,8 @@ before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi ## We might be upgrading some useless packages, but that's better than missing an upgrade - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade; fi + ## Create empty rust directories for non-Rust builds, so caching succeeds + - if [[ "$RUST_OPTIONS" == "" ]]; then mkdir -p $HOME/.cargo $TRAVIS_BUILD_DIR/src/rust/target; fi install: ## If we're on OSX use brew to install ccache (ccache is automatically installed on Linux) diff --git a/changes/ticket26952-cargo b/changes/ticket26952-cargo new file mode 100644 index 0000000000..e1efdfcd74 --- /dev/null +++ b/changes/ticket26952-cargo @@ -0,0 +1,3 @@ + o Minor features (continuous integration, rust): + - Use cargo cache in our Travis CI configuration. + Closes ticket 26952. From 4517c4c3e38fe93d668ab84dc5e7cb3bd0a3c173 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 10 Aug 2018 11:26:53 +1000 Subject: [PATCH 17/24] Changes file for Rust: backport src/test/test_rust.sh from master --- changes/bug26497-backport | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changes/bug26497-backport diff --git a/changes/bug26497-backport b/changes/bug26497-backport new file mode 100644 index 0000000000..1d86e01bf3 --- /dev/null +++ b/changes/bug26497-backport @@ -0,0 +1,3 @@ + o Minor bugfixes (rust): + - Backport test_rust.sh from master. + Fixes bug 26497; bugfix on 0.3.1.5-alpha. From 0f3fd10ee0f609cae6d2fe87fa437026f5e9e003 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 10 Aug 2018 11:47:36 +1000 Subject: [PATCH 18/24] Stop setting $CARGO_HOME in src/rust/tor_rust/include.am cargo will use the user's $CARGO_HOME, or $HOME/.cargo by default. Fixes bug 26497; bugfix on 0.3.1.5-alpha. --- src/rust/tor_rust/include.am | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/rust/tor_rust/include.am b/src/rust/tor_rust/include.am index c02324cb77..40511bf9f2 100644 --- a/src/rust/tor_rust/include.am +++ b/src/rust/tor_rust/include.am @@ -7,7 +7,6 @@ EXTRA_CARGO_OPTIONS= src/rust/target/release/@TOR_RUST_STATIC_NAME@: FORCE ( cd "$(abs_top_builddir)/src/rust" ; \ CARGO_TARGET_DIR="$(abs_top_builddir)/src/rust/target" \ - CARGO_HOME="$(abs_top_builddir)/src/rust" \ $(CARGO) build --release $(EXTRA_CARGO_OPTIONS) \ $(CARGO_ONLINE) \ --manifest-path "$(abs_top_srcdir)/src/rust/tor_rust/Cargo.toml" ) @@ -15,7 +14,6 @@ src/rust/target/release/@TOR_RUST_STATIC_NAME@: FORCE distclean-rust: ( cd "$(abs_top_builddir)/src/rust" ; \ CARGO_TARGET_DIR="$(abs_top_builddir)/src/rust/target" \ - CARGO_HOME="$(abs_top_builddir)/src/rust" \ $(CARGO) clean $(EXTRA_CARGO_OPTIONS) \ $(CARGO_ONLINE) \ --manifest-path "$(abs_top_srcdir)/src/rust/tor_rust/Cargo.toml" ) From 229a75a49a440e61c97dca820cf59360470e1560 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 10 Aug 2018 11:54:26 +1000 Subject: [PATCH 19/24] Rust: use a consistent working directory in builds and tests cd to ${abs_top_builddir}/src/rust before running cargo in src/test/test_rust.sh. Fixes bug 26497; bugfix on 0.3.3.2-alpha. --- changes/bug26497-cd | 4 ++++ src/test/test_rust.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changes/bug26497-cd diff --git a/changes/bug26497-cd b/changes/bug26497-cd new file mode 100644 index 0000000000..37bf1bc956 --- /dev/null +++ b/changes/bug26497-cd @@ -0,0 +1,4 @@ + o Minor bugfixes (rust): + - cd to ${abs_top_builddir}/src/rust before running cargo in + src/test/test_rust.sh. This makes the working directory consistent + between builds and tests. Fixes bug 26497; bugfix on 0.3.3.2-alpha. diff --git a/src/test/test_rust.sh b/src/test/test_rust.sh index 2761b612b5..4afc84285f 100755 --- a/src/test/test_rust.sh +++ b/src/test/test_rust.sh @@ -7,7 +7,7 @@ export LSAN_OPTIONS=suppressions=${abs_top_srcdir:-../../..}/src/test/rust_supp. for cargo_toml_dir in "${abs_top_srcdir:-../../..}"/src/rust/*; do if [ -e "${cargo_toml_dir}/Cargo.toml" ]; then - cd "${cargo_toml_dir}" && \ + cd "${abs_top_builddir:-../../..}/src/rust" && \ CARGO_TARGET_DIR="${abs_top_builddir:-../../..}/src/rust/target" \ "${CARGO:-cargo}" test ${CARGO_ONLINE-"--frozen"} \ ${EXTRA_CARGO_OPTIONS} \ From f398da2e2d2c2472619b1c42463cbf2ccc84cc6a Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 10 Aug 2018 12:33:51 +1000 Subject: [PATCH 20/24] Travis: put distcheck first for readability --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8c2c9e3d61..c7ea5948e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,7 +49,7 @@ matrix: ## 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" + - env: DISTCHECK="yes" ASCIIDOC_OPTIONS="" ## Check rust offline without distcheck (see above) ## TOR_RUST_DEPENDENCIES is spelt RUST_DEPENDENCIES in 0.3.2 - env: RUST_OPTIONS="--enable-rust" RUST_DEPENDENCIES=true HARDENING_OPTIONS="" From 82cccfbe25c3e5b5be14323b545c68c7eb52400c Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 10 Aug 2018 11:55:50 +1000 Subject: [PATCH 21/24] Travis: Use TOR_RUST_DEPENDENCIES for 0.3.3 and later TOR_RUST_DEPENDENCIES used to be spelt RUST_DEPENDENCIES in 0.3.2. Re-applies 0.3.3 changes after 24629. --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index c7ea5948e5..81f449797b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,8 +51,7 @@ matrix: ## We check asciidoc with distcheck, to make sure we remove doc products - env: DISTCHECK="yes" ASCIIDOC_OPTIONS="" ## Check rust offline without distcheck (see above) - ## TOR_RUST_DEPENDENCIES is spelt RUST_DEPENDENCIES in 0.3.2 - - env: RUST_OPTIONS="--enable-rust" RUST_DEPENDENCIES=true HARDENING_OPTIONS="" + - env: RUST_OPTIONS="--enable-rust" TOR_RUST_DEPENDENCIES=true HARDENING_OPTIONS="" ## Uncomment to allow the build to report success (with non-required ## sub-builds continuing to run) if all required sub-builds have @@ -151,7 +150,7 @@ install: - if [[ "$RUST_OPTIONS" != "" ]]; then sh rustup.sh -y --default-toolchain stable; fi - if [[ "$RUST_OPTIONS" != "" ]]; then source $HOME/.cargo/env; fi ## If we're testing rust builds in offline-mode, then set up our vendored dependencies - - if [[ "$RUST_DEPENDENCIES" == "true" ]]; then export RUST_DEPENDENCIES=$PWD/src/ext/rust/crates; fi + - if [[ "$TOR_RUST_DEPENDENCIES" == "true" ]]; then export TOR_RUST_DEPENDENCIES=$PWD/src/ext/rust/crates; fi ## ## Finally, list installed package versions - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then dpkg-query --show; fi From 7ec75e014fb7e736cdf392a4ca11196c0d492044 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 10 Aug 2018 11:59:42 +1000 Subject: [PATCH 22/24] Travis: Check Rust with distcheck in 0.3.3 and later Backports an 0.3.4 change that also works in 0.3.3. Part of 24629. --- .travis.yml | 5 +++-- changes/ticket24629-backport | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 changes/ticket24629-backport diff --git a/.travis.yml b/.travis.yml index 81f449797b..f1b89e1030 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,8 +50,9 @@ matrix: # - env: HARDENING_OPTIONS="" ## We check asciidoc with distcheck, to make sure we remove doc products - env: DISTCHECK="yes" ASCIIDOC_OPTIONS="" - ## Check rust offline without distcheck (see above) - - env: RUST_OPTIONS="--enable-rust" TOR_RUST_DEPENDENCIES=true HARDENING_OPTIONS="" + ## Check rust offline with distcheck, to make sure we remove rust products + ## But without hardening (see above) + - env: DISTCHECK="yes" RUST_OPTIONS="--enable-rust" TOR_RUST_DEPENDENCIES=true HARDENING_OPTIONS="" ## Uncomment to allow the build to report success (with non-required ## sub-builds continuing to run) if all required sub-builds have diff --git a/changes/ticket24629-backport b/changes/ticket24629-backport new file mode 100644 index 0000000000..dfbc465634 --- /dev/null +++ b/changes/ticket24629-backport @@ -0,0 +1,3 @@ + o Minor features (continuous integration): + - Backport Travis rust distcheck to 0.3.3. + Closes ticket 24629. From a5715a46c4d4b96c68ea4b30ad98c685ffadf7c2 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 10 Aug 2018 12:10:56 +1000 Subject: [PATCH 23/24] Changes file for Travis: enable macOS builds --- changes/ticket24629 | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changes/ticket24629 diff --git a/changes/ticket24629 b/changes/ticket24629 new file mode 100644 index 0000000000..482c0a1a6d --- /dev/null +++ b/changes/ticket24629 @@ -0,0 +1,3 @@ + o Minor features (continuous integration): + - Enable macOS builds in our Travis CI configuration. + Closes ticket 24629. From e1291aa84a04b8006130ce08338ee07a662e5ce0 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 10 Aug 2018 13:11:27 +1000 Subject: [PATCH 24/24] Rust: Use --all-features in test_rust.sh for 0.3.3 and 0.3.4 Re-applies 0.3.3 changes after 24629. --- src/test/test_rust.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/test_rust.sh b/src/test/test_rust.sh index 4afc84285f..5405af436b 100755 --- a/src/test/test_rust.sh +++ b/src/test/test_rust.sh @@ -9,7 +9,7 @@ for cargo_toml_dir in "${abs_top_srcdir:-../../..}"/src/rust/*; do if [ -e "${cargo_toml_dir}/Cargo.toml" ]; then cd "${abs_top_builddir:-../../..}/src/rust" && \ CARGO_TARGET_DIR="${abs_top_builddir:-../../..}/src/rust/target" \ - "${CARGO:-cargo}" test ${CARGO_ONLINE-"--frozen"} \ + "${CARGO:-cargo}" test --all-features ${CARGO_ONLINE-"--frozen"} \ ${EXTRA_CARGO_OPTIONS} \ --manifest-path "${cargo_toml_dir}/Cargo.toml" || exitcode=1 fi