Commit Graph

55 Commits

Author SHA1 Message Date
Conner Fromknecht
7a1013fb9e
make+travis: verify compiled protos on travis 2020-03-10 13:03:01 +01:00
Oliver Gugger
ac28b2c692
travis: remove git clone depth limitation to fix linter
By default, Travis-CI does `git clone --depth=50` which limits the
repo to the last 50 commits. Because we do linting against an old
commit, it cannot be found any more. We remove the limit completely
to not run into this problem again.
2020-02-20 20:59:25 +01:00
Conner Fromknecht
d7af7934b8
travis: staged travis builds
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.
2019-12-05 14:36:01 -08:00
Wilmer Paulino
44fa28b27b
build: bump travis bitcoind version to 0.19.0.1 2019-11-25 10:59:00 -08:00
Conner Fromknecht
45114cb819
build: bump to bitcoind 0.18.1 for itests 2019-10-01 16:29:55 -07:00
Olaoluwa Osuntokun
a4e2bb47d2 build: update travis to build against go 1.13
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.
2019-09-11 05:54:33 -07:00
Johan T. Halseth
857a2c3e65
make+travis: enable bitcoind itests on travis 2019-09-02 09:37:37 +02:00
Wilmer Paulino
18342410f0
travis: fix log upload regression after itest move 2019-06-04 15:03:54 -07:00
Olaoluwa Osuntokun
3b575463dc
Merge pull request #1881 from halseth/neutrino-integration-tests
Neutrino integration tests
2019-05-27 16:09:44 -07:00
Johan T. Halseth
19d6cc00e5
travis: enable neutrino itest 2019-05-27 09:29:03 +02:00
Olaoluwa Osuntokun
0c762af263
scripts: update bitcoind version to 0.18 2019-05-23 18:08:58 -07:00
Conner Fromknecht
98f8696e68
travis: install bitcoind 0.17.1 binaries 2019-05-22 16:35:46 -07:00
Johan T. Halseth
0082db4848
travis: use go 1.12.x 2019-02-26 12:19:00 -03:00
Conner Fromknecht
61e5a783e8
travis: use make travis-itest to perform linting 2019-01-31 23:47:15 -08:00
Conner Fromknecht
2c716095d5
travis: use make targets instead of chaining 2018-11-30 15:20:46 -08:00
Olaoluwa Osuntokun
0734e53260
build: inline travis btcd build 2018-11-30 14:01:53 -08:00
Olaoluwa Osuntokun
9e5ba86cef
build: force modules at the travis script level 2018-11-29 21:40:47 -08:00
Olaoluwa Osuntokun
ac04306dcf
travis: collapse commands into single instance to ensure exit on fail
Before this commit, if for example the linter failed, then we would go
on to all the other tests rather than halting. We fix this by instead
chaining the relevant commands, and eliminating the LINT env variable
in the build matrix.
2018-11-29 21:27:55 -08:00
Olaoluwa Osuntokun
f65b1a4d6e
travis: force go modules support in $GOPATH, cache modules directory 2018-11-28 20:13:54 -08:00
Olaoluwa Osuntokun
e5f4b7ca66
travis: remove dep directive from travis, as we use go modules now 2018-11-28 20:13:51 -08:00
Johan T. Halseth
aceda7fbcb
travis: enable caches
This commit sets the GOCACHE environment variable, and enables caching
on travis.

GOCACHE will tell the compiler (only go 1.10+) where to store build and
test artifacts. Caching this directory will significantly speed up
succeeding builds and test runs.

We also cache vendor/ as this will speed up the call to 'make dep'.

A few dependencies in the GOPATH are cached, as calls to 'go get' for
these will be sped up. Note that we don't cache the lnd directory, as it
will conflict with the changes in the PR being built.
2018-11-16 11:08:54 +01:00
Johan T. Halseth
b4aeb83dbb
travis: split up into 3 builds
This commit distributes the CI tests into 3 independend builds, by
splitting the integration test run and unit test coverage.

To better handle the extra cases, we define a build matrix with the
three build types (RACE and LINT, ITEST, COVER).
2018-11-16 11:08:16 +01:00
Johan T. Halseth
d3c9be1f32
travis: only run on latest go 2018-11-16 11:07:03 +01:00
Johan T. Halseth
9e950b4739
travis: execute make travis step by step
Instead of calling 'make travis' directly, we call each step. This lets us
better track how much time is spent on each.

Also note that we execute 'itest-only' instead of 'itest', and instead
execute the dependencies (btcd, build) manually first.

We explicitly set the ITEST environment variable, for readability, and
define a new COVER. This is currently true when ITEST=true to keep the
existing build configuration, but will later be configured to be
independent.
2018-11-16 11:04:51 +01:00
Johan T. Halseth
b98ab723ee
travis: remove unnecessary export PATH
This is done automatically by travis as part of the go setup.
2018-11-16 11:04:51 +01:00
Harald Nordgren
433c5506ce build: bump Go versions, use '.x' to always get latest patch versions 2018-10-30 20:15:42 -07:00
Johan T. Halseth
2c62f3e1f6
travis: correctly set RACE=TRUE in build matrix 2018-10-10 11:03:24 +02:00
Olaoluwa Osuntokun
8bc61693bf
build: update build file to exclude go 1.10 from linting
In this commit, we modify our build file to only lint under go 1.11. We
do this as there's been a breaking change in gofmt between go 1.10 and
go 1.11 that causes files which pass the linter under go 1.10, to fail
the linter under go 1.11. In the end, we only really need to lint using
one version of go.

In order to achieve this, we "unroll" the build matrix to enumerate each
version and the environment variables that it should be run with. We
then modify the Makefile to only include the lint directive if the
particular env variable is set ($(USE_LINT)). With these two changes,
we'll now only lint under go 1.11.
2018-10-07 14:37:39 +09:00
Olaoluwa Osuntokun
233246714d build+docs: bump to golang 1.11 2018-10-07 11:28:49 +09:00
Oliver Gugger
b75429c6fe test: upload integration test logs from TravisCI to file.io 2018-05-01 13:16:21 +03:00
Conner Fromknecht
fa6271c8d4
travis: update to use make travis 2018-03-31 01:59:02 -07:00
Wilmer Paulino
a2ad7a51ba
travis: retrieve btcd version from dep's manifest file 2018-03-12 13:38:36 -04:00
Olaoluwa Osuntokun
7f0dd8f28f
build: update travis to build against golang 1.10+1.9.4 2018-02-19 17:32:54 -08:00
romanornr
d512642c02 Travis: fix sudo required and apt-get update command 2018-01-17 10:06:40 -07:00
Alex
1305a4fedf build: update travis to install bitcoind for running tests 2018-01-15 13:59:34 -08:00
Johan T. Halseth
3a0d4e78ae
travis.yml: build btcd version from glide.yaml for use in integration tests 2017-11-20 14:22:15 -08:00
Olaoluwa Osuntokun
e0561c98c9
build: update to latest golang versions 2017-11-01 14:55:14 -07:00
Sam Lewis
dd90a724e5 test: add upload of integration logs from TravisCI builds
This commit adds adds: 

- Functionality to `gotest.sh` to log the output of `lnd` instances used for
  integration testing to file.

- Uploading of those log files to [termbin.com ](http://www.termbin.com) from
  TravisCI integration builds.

As an example of a build with this enabled, you can look at [this
build](https://travis-ci.org/samvrlewis/lnd/builds/286942025), which is a build
from my `ci_logging_test` branch. That branch has the same diff as my
`ci_logging` branch but with a small inclusion to allow TravisCI builds to work
(as I described in [my
comment](https://github.com/lightningnetwork/lnd/issues/302#issuecomment-335133834)
the other day). If you scroll to the end of the job logs where `RACE=false`
you'll see a `after_script` section with an output like this:

```
output0.log uploaded to http://termbin.com/aloqr
output1.log uploaded to http://termbin.com/3ggh
output2.log uploaded to http://termbin.com/abb9
output3.log uploaded to http://termbin.com/rk9j
output4.log uploaded to http://termbin.com/956p
output5.log uploaded to http://termbin.com/iwwt
```

Fixes #302.
2017-10-17 15:42:22 -07:00
Olaoluwa Osuntokun
2c556d11c7
build: update travis config to use go 1.9 and 1.8.3 2017-08-30 20:37:47 -07:00
Olaoluwa Osuntokun
f39b7aaaf9
build: create parallel travis builds to isolate race condition tests
This commit modifies the travis build script, and our local test script
to ensure that the race condition builds are conducted in a parallel
build. After this commit two travis builds will be kicked off for each
push/commit: one that runs the race condition tests in isolation, and
another that runs the integration tests then the coverage tests.

In order to do the above cleanly, the integration tests are now guarded
behind a build flag. In order to run the integration tests, one now
needs to specify the `-tags rpctest` flag when running the `go test`
command.
2017-07-04 16:05:22 -07:00
Andrey Samokhvalov
2acb2bb373 travis: use glide install of btcd
In order to have more stable builds we should use use glide install
directly, instead of "go get".
2017-06-26 20:26:27 +03:00
Olaoluwa Osuntokun
3d63a97443
build: update travis to build against go 1.7.5 and go 1.8.3 2017-06-10 18:10:14 -07:00
Olaoluwa Osuntokun
238411ccd5
travis: update travis build to go1.8.1 2017-04-20 15:46:05 -07:00
Andrey Samokhvalov
1aa4452622 gotest: add gofmt, govet, golint, gosimple, unconvert, race detector, test coverage in travis 2017-03-13 16:30:23 -07:00
Olaoluwa Osuntokun
4d7ca825d4
build: update travis to build against Go 1.8 and 1.7.5
Sticking with our tradition of tracking the two latest go releases,
we'll now build against Go 1.8 (which was recently released and Go
1.7.5).

The release of Go 1.8 is very attractive to the project as it includes
performance and GC improvements as well as the addition of more
profiling and race condition detection capabilities within the runtime.
2017-02-17 13:37:09 +08:00
Olaoluwa Osuntokun
e057684c8e
travis: update build to go1.7.4 2017-01-12 17:14:41 -08:00
Olaoluwa Osuntokun
caa620a6de
build: update travis to build against go 1.7.3 2016-10-26 14:28:51 -07:00
Olaoluwa Osuntokun
803b66fd6d
build: force 'go test' to build+test packages serially
This commit fixes some flakiness exhibited within the tests on Travis
due to the default behavior of the `go test` command to execute tests
amongst packages in parallel. Since many tests use the `rpctest`
package from `btcd`, many instances of `btcd` would be started at the
same time, with only one being able to grab the port and fully start
up. By forcing tests to be executed serially, this behavior should be
patched.

One downside is that builds on Travis will take longer. Therefore, this
may be  a temporary fix a more fundamental fix within the `rpctest`
package is implemented.
2016-09-06 11:20:40 -07:00
Olaoluwa Osuntokun
164db26a11
build: install lnd binary within Travis container for integration tests 2016-08-30 11:14:42 -07:00
Olaoluwa Osuntokun
50186f9460
build: remove GO15VENDOREXPERIMENT flag as go1.5 has been dropped 2016-08-29 22:15:49 -07:00