From 340da669be373174550e038d1d20ff2bff49eb6b Mon Sep 17 00:00:00 2001 From: Taylor Yu Date: Thu, 28 Jun 2018 14:43:31 -0500 Subject: [PATCH 01/13] 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/13] 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/13] 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/13] 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/13] 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/13] 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/13] 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/13] 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 f76cddd3762bf615eca7ca5d95b685671171fae8 Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 9 Aug 2018 22:53:48 +1000 Subject: [PATCH 09/13] 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 10/13] 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 11/13] 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 12/13] 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 d514e98663fbac3107d02f492fbff9d6018c275d Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 10 Aug 2018 18:26:33 +1000 Subject: [PATCH 13/13] Travis: add a missing macOS asciidoc env var --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index eed1371818..8b8621007e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -125,6 +125,7 @@ install: ## 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 + - if [[ "$ASCIIDOC_OPTIONS" == "" ]] && [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export XML_CATALOG_FILES="/usr/local/etc/xml/catalog"; fi ## ## Finally, list installed package versions - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then dpkg-query --show; fi