There are different versions of clang-format being installed on
different versions of ubuntu that apparently produce different
results when formatting the proto files. This is likely too much
of a hurdle for new contributors to also manually install the
correct version of a command line tool just to format stuff.
This PR introduces staging to our travis pipeline. Currently all
instances perform:
- compilation of lnd
- linting
- compilation and installation of btcd binaries
- installation of bitcoind binaries
In total this adds about 3 minutes to each of our 5 instances, resulting in
roughly 12 minutes of redundant execution time. Additionally, if if a build
fails to compile or lint we detect this 5 separate times, consuming precious
instances from other builds.
We alleviate this by adding an initial Build phase, which runs a single
instance performing the actions above. This has the benefit of quickly sanity
checking the pr before moving on to the more expensive unit or integration test
suites, and failing faster for common mistakes. It also warms up the build
caches for the Test stage in one fell swoop.
For instance, if 5 people push changes at the same time, they can all get
immediate feedback regarding compilation or linting issues, and potentially
save hours waiting for other people's test to finish or fail before finding out
they had a spelling error. This doesn't alleviate all possible issues, e.g. the
5 instances may already be consumed by test suites, but it does make a sizable
step towards minimizing time-to-failure in common scenarios.
This commit applies the same cd /tmp prefix to installations for all
dependencies. It also corrects the previous behavior, which requires the
cd /tmp to be in the same command, and not separate statements.
In this commit, we update Travis to start building against the newly
released go 1.13. Additionally, we'll now utilize the new `trimpath` to
the `go build` and `go install` commands. This new flag serves to remove
all file system paths from the compiled Go executable, which will make
our binaries more reproducible.
Previous to this commit, running `make unit-cover pkg=xx`
would ignore the selected package and run unit tests and
coverage for all packages.
After this commit, the package selected with pkg= is the
only one that is tested and coverage output generated for.
If no pkg is selected, the default is as before, all pkgs.
When using the unit test flakehunter and specifying a package, after the
first successful run, all of the tests would be run, rather than just
the ones within the specified package.
We need to distinguish an lnd build for the purpose of integration
testing from a regular dev build. This makes it possible to adapt
parameters to let integration tests run faster (for example:
sweeper batch window).