From 340da669be373174550e038d1d20ff2bff49eb6b Mon Sep 17 00:00:00 2001 From: Taylor Yu Date: Thu, 28 Jun 2018 14:43:31 -0500 Subject: 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. --- changes/ticket26560 | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changes/ticket26560 (limited to 'changes') 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. -- cgit v1.2.3-54-g00ecf From 7cf7b52fcab81c55a4c493bad68eddc0d27a0d63 Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 9 Aug 2018 17:06:13 +1000 Subject: 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 (limited to 'changes') 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. -- cgit v1.2.3-54-g00ecf From 286a6bc3b8fd2c369583d0d48c09769fed78e39f Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 9 Aug 2018 15:40:27 +1000 Subject: 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 (limited to 'changes') 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. -- cgit v1.2.3-54-g00ecf From 23b242104ba5cefb5fd16effda33a611e521050d Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 9 Aug 2018 18:29:29 +1000 Subject: 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 (limited to 'changes') 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. -- cgit v1.2.3-54-g00ecf From e4d7f2667c6c4660ad9663a39fbdef7d3e2961cd Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 9 Aug 2018 19:33:28 +1000 Subject: 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 (limited to 'changes') 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. -- cgit v1.2.3-54-g00ecf From ce19477ffcdf64255f050308182f3d682e6f6de1 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 10 Aug 2018 11:00:46 +1000 Subject: 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 (limited to 'changes') 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 -- cgit v1.2.3-54-g00ecf From c9ad16ca2a2aff63fc4814c843cd376c76e43095 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 10 Aug 2018 11:22:36 +1000 Subject: 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 (limited to 'changes') 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 -- cgit v1.2.3-54-g00ecf From 3b1c74baa5e1b42c3271b2c74a665da6c528b106 Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 9 Aug 2018 15:41:57 +1000 Subject: 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 (limited to 'changes') 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. -- cgit v1.2.3-54-g00ecf From 4517c4c3e38fe93d668ab84dc5e7cb3bd0a3c173 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 10 Aug 2018 11:26:53 +1000 Subject: 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 (limited to 'changes') 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. -- cgit v1.2.3-54-g00ecf From 4cd3fcf2481868a693c31957fe0d61d69bf1312b Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 10 Aug 2018 12:10:56 +1000 Subject: Changes file for Travis: enable macOS builds --- changes/ticket24629 | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changes/ticket24629 (limited to 'changes') 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. -- cgit v1.2.3-54-g00ecf