From 8520071f2313ae6973082ca7cb5680a9df88ce78 Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 26 Sep 2019 17:25:17 +1000 Subject: Travis: Unroll the build matrix into matrix: include: The jobs should be the same, but Travis may display them differently. Part of 31859. --- .travis.yml | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index a2bc6395df..b18335d743 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,14 +5,12 @@ cache: compiler: - gcc - - clang os: - linux - - osx -## The build matrix in the following stanza expands into builds for each -## OS and compiler. +## We don't use the build matrix cross-product, because it makes too many jobs +## Instead, we list each job under matrix: include: env: global: ## The Travis CI environment allows us two cores, so let's use both. @@ -23,15 +21,17 @@ env: ## 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 - ## - ## We don't list default variable values, because we set the defaults - ## in global (or the default is unset) + ## This matrix entry is required, but it doesn't actually create any jobs - matrix: - ## include creates builds with gcc, linux + ## include creates builds with gcc, linux, unless we override those defaults include: + ## gcc is the default compiler for most jobs, so we want a clang Linux job + - compiler: clang + ## clang is the default macOS compiler, so we use it for the macOS job + - compiler: clang + os: osx ## 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 @@ -52,18 +52,11 @@ matrix: ## 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: + ## Careful! We use global envs, which makes it hard to allow failures by env: ## https://docs.travis-ci.com/user/customizing-the-build#matching-jobs-with-allow_failures - exclude: - ## gcc on OSX is less useful, because the default compiler is clang. - - compiler: gcc - os: osx - ## gcc on Linux with no env is redundant, because all the custom builds use - ## gcc on Linux - - compiler: gcc - os: linux - env: + # allow_failures: + # - compiler: gcc + # os: linux ## (Linux only) Use the latest Linux image (Ubuntu Trusty) dist: trusty -- cgit v1.2.3-54-g00ecf From 4e4297830ec04da32dda1b9424847f4710cc202e Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 26 Sep 2019 17:39:46 +1000 Subject: Travis: Remove a redundant clang Linux job Part of 31859. --- .travis.yml | 2 -- changes/ticket31859 | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changes/ticket31859 diff --git a/.travis.yml b/.travis.yml index b18335d743..f47fe8bb2c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,8 +27,6 @@ env: matrix: ## include creates builds with gcc, linux, unless we override those defaults include: - ## gcc is the default compiler for most jobs, so we want a clang Linux job - - compiler: clang ## clang is the default macOS compiler, so we use it for the macOS job - compiler: clang os: osx diff --git a/changes/ticket31859 b/changes/ticket31859 new file mode 100644 index 0000000000..0eb8a42e9a --- /dev/null +++ b/changes/ticket31859 @@ -0,0 +1,3 @@ + o Testing: + - Remove some redundant Travis CI jobs, to speed up CI. + Closes ticket 31859. -- cgit v1.2.3-54-g00ecf From 1e0e23c1e48ebc388f7a16a08a3f12e01db15bfa Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 26 Sep 2019 17:44:41 +1000 Subject: Travis: Add a macOS chutney job, but don't wait for it to finish Since Travis macOS has IPv6 support (and Travis Linux does not), chutney will now run its IPv6 networks as part of Travis CI. But since chutney is slow, don't wait for the macOS chutney to finish. (Travis have fixed the duplicate notification bug in fast_finish. So we can use fast_finish and allow_failure to finish early. Unfortunately, allow_failure also means we ignore failures in macOS chutney.) Also make sure that we have: * a compile on each platform, with each compiler, * a check on each platform, and * a check on each compiler. Finally, sort builds: allow fail last, macOS first, slowest first. Closes ticket 30860. Closes ticket 31859 for 0.2.9. --- .travis.yml | 37 ++++++++++++++++++------------------- changes/ticket30860 | 3 +++ changes/ticket31859 | 2 +- 3 files changed, 22 insertions(+), 20 deletions(-) create mode 100644 changes/ticket30860 diff --git a/.travis.yml b/.travis.yml index f47fe8bb2c..564c97dbfd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,34 +27,33 @@ env: matrix: ## include creates builds with gcc, linux, unless we override those defaults include: - ## clang is the default macOS compiler, so we use it for the macOS job + ## We run basic tests on macOS - compiler: clang os: osx - ## 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) - ## We run coverage with hardening off, which seems like enough - # - env: HARDENING_OPTIONS="" + ## We run chutney on Linux, because it's faster than chutney on macOS + - env: CHUTNEY="yes" CHUTNEY_ALLOW_FAILURES="2" SKIP_MAKE_CHECK="yes" ## We check asciidoc with distcheck, to make sure we remove doc products + ## We use Linux clang, because there are no other Linux clang jobs - env: DISTCHECK="yes" ASCIIDOC_OPTIONS="" SKIP_MAKE_CHECK="yes" - # We also try running a hardened clang build with chutney on Linux. - - env: CHUTNEY="yes" SKIP_MAKE_CHECK="yes" CHUTNEY_ALLOW_FAILURES="2" compiler: clang + ## We include a single coverage build with the best options for coverage + - env: COVERAGE_OPTIONS="--enable-coverage" HARDENING_OPTIONS="" + ## We run chutney on macOS, because macOS Travis has IPv6 + - env: CHUTNEY="yes" CHUTNEY_ALLOW_FAILURES="2" SKIP_MAKE_CHECK="yes" + os: osx - ## 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 + ## Allow the build to report success (with non-required sub-builds + ## continuing to run) if all required sub-builds have succeeded. + fast_finish: true ## Careful! We use global envs, which makes it hard to allow failures by env: ## https://docs.travis-ci.com/user/customizing-the-build#matching-jobs-with-allow_failures - # allow_failures: - # - compiler: gcc - # os: linux + allow_failures: + ## macOS chutney is very slow, so we let the build finish before it's done + ## We'd like to fast finish, but still eventually show failures. + ## But Travis doesn't have that option. + - env: CHUTNEY="yes" CHUTNEY_ALLOW_FAILURES="2" SKIP_MAKE_CHECK="yes" + os: osx ## (Linux only) Use the latest Linux image (Ubuntu Trusty) dist: trusty diff --git a/changes/ticket30860 b/changes/ticket30860 new file mode 100644 index 0000000000..b946f735c4 --- /dev/null +++ b/changes/ticket30860 @@ -0,0 +1,3 @@ + o Testing: + - Run the chutney IPv6 networks as part of Travis CI. + Closes ticket 30860. diff --git a/changes/ticket31859 b/changes/ticket31859 index 0eb8a42e9a..dbc591e00b 100644 --- a/changes/ticket31859 +++ b/changes/ticket31859 @@ -1,3 +1,3 @@ o Testing: - - Remove some redundant Travis CI jobs, to speed up CI. + - Simplify the Travis CI build matrix, and optimise for build time. Closes ticket 31859. -- cgit v1.2.3-54-g00ecf