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.
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.
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.
When Travis CI runs make distcheck, test-suite.log doesn't exist in
the expected place. Add a new make target to show this file and use
it when DISTCHECK=yes in .travis.yml. Fixes bug 25814; bug not in any
released Tor.
Travis CI deployed a change that disables ptrace capabilities in
container builds, which prevents LeakSanitizer on clang from working
properly. Set "sudo: required" to force non-container builds for
clang and work around this.
* CHANGE .travis.yml so that commands for different purposes (e.g. getting
dependencies, building, testing) are in separate config lines and sections.
* CHANGE .travis.yml to use their mechanism for installing dependencies via
apt. [0] This also allows us to not need sudo (the "sudo: false" line).
* CHANGE Travis CI tests (the "script:" section) to build and run tests in the
same manner as Jenkins (i.e. with --enable-fatal-warnings and
--disable-silent-rules and run `make check`).
* ADD Travis configuration to do all the target builds with both GCC and clang.
* ADD make flags to build with both of the cores available.
* ADD notifications for IRC, and configure email notifications (to the author
of the commit) only if the branch was previously building successfully and
the latest commit broke it.
* ADD the ability to run the Travis build matrix for OSX as well, but leave it
commented out by default (because it takes roughly ten times longer, due to a
shortage of OSX build machines).
* ADD Travis config option to cancel/fail the build early if one target has
already failed ("fast_finish: true").
* ADD comments to describe what our Travis config is doing and why it is
configured that way.
[0]: https://docs.travis-ci.com/user/installing-dependencies/#Installing-Packages-on-Container-Based-Infrastructure)
Installs dependencies (including rust) and runs the existing test suite.
TODO: Introduce build matrix utilizing the rust toolchain to run test
suites both with and without the rust components.