From f76cddd3762bf615eca7ca5d95b685671171fae8 Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 9 Aug 2018 22:53:48 +1000 Subject: [PATCH 1/8] Travis: fix a typo --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9671411b48..bc39f661b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -100,7 +100,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 4cd3fcf2481868a693c31957fe0d61d69bf1312b Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 10 Aug 2018 12:10:56 +1000 Subject: [PATCH 2/8] 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 f4f2e43f5dfa6da163ec89ab67baa4f2f13b3197 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 10 Aug 2018 12:33:51 +1000 Subject: [PATCH 3/8] 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 bc39f661b6..7583eb7490 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,7 +38,7 @@ matrix: ## (they shouldn't vary by compiler or OS) - 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="" ## Uncomment to allow the build to report success (with non-required ## sub-builds continuing to run) if all required sub-builds have From e78f9c5dfb55e71fa79c152d13a1ff72fd907040 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 10 Aug 2018 16:24:31 +1000 Subject: [PATCH 4/8] Travis: add a missing macOS asciidoc dependency --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 7583eb7490..eed1371818 100644 --- a/.travis.yml +++ b/.travis.yml @@ -124,6 +124,7 @@ 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 [[ "$ASCIIDOC_OPTIONS" == "" ]] && [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install xmlto; fi ## ## Finally, list installed package versions - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then dpkg-query --show; fi From 169afe3ca52fc8b201f00fe8b262c75e79a199d5 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 10 Aug 2018 16:30:21 +1000 Subject: [PATCH 5/8] Travis: Improve Rust comments --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8c2c9e3d61..9f1bc70e84 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,7 +50,8 @@ 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) + ## Check rust offline without hardening (see above), or distcheck + ## Distcheck doesn't work with rust in 0.3.2 ## TOR_RUST_DEPENDENCIES is spelt RUST_DEPENDENCIES in 0.3.2 - env: RUST_OPTIONS="--enable-rust" RUST_DEPENDENCIES=true HARDENING_OPTIONS="" From a544af818671eae8f265c687e24349061d3b8450 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 10 Aug 2018 11:55:50 +1000 Subject: [PATCH 6/8] 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 8c2c9e3d61..e599950620 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: 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="" + - 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 f5aa667d48d88f917371219ddefce26637c2b1ad Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 10 Aug 2018 11:59:42 +1000 Subject: [PATCH 7/8] 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 e599950620..3d86fdc1b7 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: ASCIIDOC_OPTIONS="" DISTCHECK="yes" - ## 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 546c134801a17ebb63032b5ac52a65279998ea6f Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 10 Aug 2018 13:11:27 +1000 Subject: [PATCH 8/8] 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