Commit Graph

177 Commits

Author SHA1 Message Date
Oliver Gugger
3d9d985fdf
make: disable itest error whitelist check
Since we don't really do anything with the errors we check in the itest
error whitelist but get a lot of failed Travis runs because of it, we
disable the check for the moment.
2021-07-30 10:18:43 +02:00
Oliver Gugger
36a316e29a
make+scripts: fix rpc-check command 2021-07-27 12:59:54 +02:00
Andras Banki-Horvath
798bf05838
build: add itest-race build target to catch data races with itests
This commit adds itest-race build target that can be used with
individual itests to detect and catch uncovered data races.
2021-07-22 15:15:35 +02:00
eugene
13d7e97a84
docs: update fuzz.md to explain new build/run process 2021-06-16 12:49:26 -04:00
carla
a80a6f0453
Makefile: bump goacc commit 2021-04-13 15:39:03 +02:00
Johan T. Halseth
2868b22083
make: pass mobile subserver prefix to docker when generating mobile RPC 2021-04-06 12:52:27 +02:00
Conner Fromknecht
c9ed5927f6
Merge pull request #5038 from cfromknecht/debug-unit
make: add unit-debug target
2021-02-19 14:01:31 -08:00
Oliver Gugger
fdbd4da771
make: use make for docker-release
To fix an issue where the golang version would be picked up from the
host system if the docker-release command was used, we switch over to
using make inside of the container as well instead of feeding the
parameters into the release script manually.
We only pass in the flags that we might actually want to overwrite.
2021-02-17 18:11:42 +01:00
Conner Fromknecht
7f9dcc143f
make: add unit-debug target 2021-02-17 08:47:59 -08:00
Oliver Gugger
3ddb92d99b
make: clean mobile stubs before building release
To fix an issue where the vendor.tar.gz in a release build had a
different hash if the mobile RPC stubs were in the mobile/ folder, we
clean those out first.

The culprit was the `google.golang.org/grpc/test/bufconn` package which
is currently only used in the mobile RPC stubs and nowhere else.
Therefore the vendor/module.txt was different when vendoring with the
generated mobile RPC stubs being around.
2021-02-05 13:11:35 +01:00
Johan T. Halseth
315f97ffd5
Merge pull request #4911 from guggero/docker-rpc-compile
lnrpc+mobile: use docker to compile/format protos
2021-02-01 13:42:42 +01:00
Johan T. Halseth
10a81e01e3
Merge pull request #2162 from halseth/make-goimports
[Makefile] Define `make imports`
2021-01-29 08:54:00 +01:00
Oliver Gugger
3bcfe931f9
make+lnrpc: compile mobile RPC with docker too
Now that we have a base docker image that has all our RPC compilation
dependencies installed, we can also run the mobile RPC compilation
there. This removes the need to install falafel and goimports on the
local machine.
2021-01-28 10:29:02 +01:00
Oliver Gugger
e9a0f36786
make+lnrpc: use docker to compile protos
This commit aims to make it easier for developers to compile our
protobuf definitions. They now only need to have docker installed
instead of a whole set of binaries and libraries all pinned to very
specific versions.
2021-01-28 10:27:09 +01:00
Olaoluwa Osuntokun
b2857bf392
Merge pull request #4914 from guggero/docker-verification
docker: add verification script
2021-01-18 15:29:15 -08:00
Olaoluwa Osuntokun
ff897db293
Merge pull request #4901 from bhandras/etcd_itest_ci
etcd+itests: use itest generated ports for embedded etcd and add etcd itests to travis CI
2021-01-14 17:53:54 -08:00
Oliver Gugger
25ac071300
build: add release-install goal, hash individual binaries
We add a new make goal called release-install that creates the same
reproducible binaries as the release script would create, but only for
the current OS/architecture. It then installs those binaries to the
system's GOBIN directory.
To allow easy verification of individual binaries (instead of just the
packag tarballs/zips), we also add the hashes of lnd and lncli binaries
to the manifest. We do the same in the docker build.
2021-01-13 15:36:11 +01:00
Oliver Gugger
4c56f3cacb
multi: add release helper docker file 2021-01-08 16:14:24 +01:00
Andras Banki-Horvath
b2ab5e8af1
itests: run etcd itests with generated ports 2021-01-08 15:39:12 +01:00
Oliver Gugger
330f3c4dd0
make: use --tags to describe commit 2021-01-08 11:27:46 +01:00
Johan T. Halseth
892635a93d
make: run goimports during make fmt 2020-12-18 09:04:44 +01:00
Johan T. Halseth
6dfefe39ce
make: exclude autogenerated files from go fmt 2020-12-18 09:04:44 +01:00
Oliver Gugger
b42c5e5fad
make+scripts: use pre-compiled btcd in itest
To make sure we build the exact version of btcd that is referenced in
the project's go.mod file and to not overwrite any binary the user might
already have installed on the system, we compile btcd into an explicit
file in the itest directory.
This should also speed up invocations of "make itest-only" because the
test harness doesn't always compile btcd on its own.

We also fix a bug with the version parsing where adding a "replace"
directive in the go.mod would result in the awk commands to extract the
wrong version. Because we no longer use the DEPGET goal to build and
install btcd, using a replace directive now actually works for itests.
2020-12-03 23:23:49 +01:00
Oliver Gugger
8829960b1a
make+Travis: use EXEC_SUFFIX for Windows, remove explicit goal
To remove the need to have an extra make goal for the Windows itests, we
instead add the flag windows=1 that sets the make variable EXEC_SUFFIX
to properly add the ".exe" suffix to all executable names.
2020-12-03 23:23:49 +01:00
Oliver Gugger
b91b7434f6
make: replace ITEST goal with script
To make the Makefile a bit easier to understand, we remove the implicit
ITEST goal/command variable and switch all itest execution over to
explicit goals in the main Makefile.
2020-12-03 23:23:44 +01:00
Oliver Gugger
47e8882480
make+itest: allow the same test to be run in parallel 2020-11-10 13:57:31 +01:00
Oliver Gugger
d4068e9892
travis+make: execute test groups in parallel 2020-11-04 11:03:33 +01:00
carla
c92b030652
multi: remove experimential build flag for assumechanvalid 2020-10-21 14:13:50 +02:00
Oliver Gugger
ab4f1c3b5a
github+make: check all CLI flags are in sample-lnd.conf
We add a GitHub action to our workflow that makes sure all command line
flags of lnd that are available with the default build tags are
contained in the sample-lnd.conf file.
2020-10-16 08:53:16 +02:00
Oliver Gugger
5189cb799a
make: add fuzz-build and fuzz commands 2020-10-09 09:53:55 +02:00
Olaoluwa Osuntokun
0f90bb638d build: build and run CI against Go 1.5 2020-10-06 15:30:50 -07:00
Andras Banki-Horvath
357cd7d7a7
make: allow optional extra tags when running unit tests 2020-09-17 14:50:19 +02:00
Oliver Gugger
6115a7b12b
make+itest: make itest Windows compatible 2020-08-05 08:53:04 +02:00
Johan T. Halseth
935fa7f12d
make+mobile: pass expected falafel version to build script 2020-07-17 08:49:03 +02:00
Johan T. Halseth
d41ca81aad
make: add goimports dep
Required by mobile bindings generate script.
2020-07-17 08:49:02 +02:00
Johan T. Halseth
fd8e6c98b9
make: fetch falafel dependency for mobile-rpc 2020-07-17 08:49:02 +02:00
Johan T. Halseth
7a30332619
mobile: use single "mobile" build tag instead of "ios" and "android"
Since the "android" build tag conflicts with a go compiler build tag, we instead use a single "mobile" tag for both platforms.
2020-07-17 08:49:02 +02:00
nsa
85852733af Makefile: add -w to -ldflags to strip DWARF symbols
Compiling with this flag cuts down on the binary size by several
megabytes.
2020-06-09 14:40:48 -04:00
Oliver Gugger
f48b0289f5
make: check that all RPCs are defined in yaml 2020-06-04 08:50:44 +02:00
Conner Fromknecht
fcc18b6815
Merge pull request #4221 from guggero/move-release
build: move release script and README to more appropriate locations
2020-05-05 09:33:53 -07:00
Conner Fromknecht
315c56607c
Merge pull request #4161 from joostjager/itest-err-guard
itest: check for new errors in logs
2020-05-04 10:15:49 -07:00
Oliver Gugger
caf4cb16c4
build+make: move release script
Because this script is now run from the main Makefile, it is more
suitable to be located in the main scripts folder where the other
build related scripts reside.
2020-04-24 14:29:06 +02:00
Oliver Gugger
317ccb2cc9
make+build: call release script from makefile 2020-04-21 11:28:41 +02:00
Joost Jager
1307a96624
itest: check for new errors in logs 2020-04-20 14:02:23 +02:00
Oliver Gugger
ec5bfd3df7
make: move escaped double quote to fix windows build 2020-04-14 15:51:44 +02:00
Conner Fromknecht
d66f15d01f
make+build: compile go version into binary 2020-04-10 16:39:23 -07:00
Conner Fromknecht
07420835d0
make+build: compile build tags into binary 2020-04-10 16:39:23 -07:00
Conner Fromknecht
75a1a1fbab
make+build: compile SHA1 commit hash into binary 2020-04-10 16:39:22 -07:00
Johan T. Halseth
73c542c934
travis+lint+make: limit lint concurrency only on travis
Since linting is much faster by using the defaults locally.
2020-03-31 10:27:44 +02:00
Oliver Gugger
7917d22daf
Makefile: don't format proto
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.
2020-03-11 10:17:45 +01:00
Conner Fromknecht
7a1013fb9e
make+travis: verify compiled protos on travis 2020-03-10 13:03:01 +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
Conner Fromknecht
dd13a3c0d8
Makefile: make unit tess non-verbose
Makes it easier to spot failures without scrolling through pages of
successful tests.
2019-11-22 12:29:02 -08:00
Conner Fromknecht
da1b599d88
Makefile+release: only use -trimpath on release script
Allows lnd to still be compiled with go1.12.x, tho users with go1.13 can
still verify release binaries.
2019-09-19 14:34:38 -07:00
Olaoluwa Osuntokun
003c576406
Merge pull request #3513 from halseth/lint-skip-generated
[trivial] lint: skip generated files
2019-09-18 21:51:16 -07:00
Conner Fromknecht
cd7610ff41
Makefile: remove linter version from pkg definition 2019-09-18 14:18:14 -07:00
Conner Fromknecht
4e5c4df098
Makefile: remove side-effects to go.mod when installing all deps
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.
2019-09-18 14:03:18 -07:00
Conner Fromknecht
ed8913f08a
Makefile: add verbose output to go get for linter 2019-09-18 14:01:49 -07:00
Conner Fromknecht
697974c9cf
Makefile: remove extraneous go install calls for module deps 2019-09-18 14:01:12 -07:00
Conner Fromknecht
a8130f0c40
Makefile: remove -u when installing go-acc 2019-09-18 13:43:35 -07:00
Johan T. Halseth
504a910def
make: run linter on verbose 2019-09-18 09:07:53 +02:00
Olaoluwa Osuntokun
7b1166bbb7
Merge pull request #3458 from Roasbeef/go1.13
build: update travis and Makefile to build using Go 1.13
2019-09-14 11:18:51 +03:00
Joost Jager
1216dc6a5b
build: pin golangci-lint version
To prevent builds breaking when golangci-lint or any of the linters is
updated.
2019-09-13 11:46:23 +02: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
3aa9f18395
make: define make android, make mobile (ios+android) 2019-09-05 09:22:54 +02:00
Johan T. Halseth
4dcaea1f5d
make: define make ios, make vendor 2019-09-05 09:22:54 +02:00
Johan T. Halseth
a5c63786c6
make+mobile: define gen_bindings.sh
gen_bindings uses falafel to generate Go bindings from the lnrpc
protos.
2019-09-05 09:22:54 +02:00
Conner Fromknecht
4dbe9379a9
Makefile: ensure submodules are linted, covered, and tested 2019-08-08 14:39:18 -07:00
Johan T. Halseth
3207c8a736
make: change linter gometalinter->golangci-lint 2019-08-07 10:53:09 +02: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
3df0821aa3
make: add backend tag for itests
Defaults to running itests with btcd.
2019-05-27 09:29:02 +02:00
AdamISZ
9b3676fdd4
Allow unit-cover target for make to filter by package
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.
2019-05-24 12:51:35 +02:00
Johan T. Halseth
ccff4fc0a5
make: point makefile to new main package 2019-04-23 20:57:33 +02:00
Olaoluwa Osuntokun
3895a4f276
Merge pull request #2745 from cfromknecht/make-install-btcd
Makefile: actually install btcd w/ make btcd
2019-03-08 18:41:18 -08:00
Conner Fromknecht
29fe6e61e2
Makefile: actually install btcd w/ make btcd 2019-03-07 17:56:37 -08:00
Wilmer Paulino
b66f97c23a
Makefile: fix unit test flakehunter when running on specific package
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.
2019-03-06 18:01:07 -08:00
Conner Fromknecht
245b76ab51
Makefile: lint all travis builds
Ensures we fail faster if the source code doesn't
pass the lint checks.
2019-01-31 15:36:56 -08:00
Conner Fromknecht
e0cf99c53d
Makefile: use go-acc for coverage 2019-01-23 17:42:52 -08:00
Johan T. Halseth
4cbc6e6e07
make: build lnd-itest before flakehunting 2019-01-17 14:40:20 +01:00
Johan T. Halseth
5c41243f35
Merge pull request #2118 from halseth/make-fmt-2
make: ensure make fmt is run with -s flag
2019-01-08 10:32:34 +01:00
Joost Jager
3b1357c3ab
build: apply rpctest tag in itest
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).
2018-12-18 10:50:07 +01:00
Johan T. Halseth
0ba4fb8605
make: don't hardcode commit date
As it won't correspond to the commit hash, include the whole version
string.
2018-12-04 14:09:33 +01:00
Johan T. Halseth
bafc44c14b
make: get btcd commit hash from go.mod
Since go.sum also contains historical commits, we must fetch currenct
commit hash from go.mod.
2018-12-04 13:50:51 +01:00
Olaoluwa Osuntokun
5107feb1ce
Merge pull request #2261 from cfromknecht/makefile-unused-declarations
Makefile: remove unused HAVE_ declarations + cleanup
2018-12-03 13:34:43 -08:00
Brian Sipple
c9a5593a64 build: update make btcd command with GO111MODULE=on 2018-12-02 15:43:26 -08:00
Conner Fromknecht
7557bded50
Makefile: remove unused HAVE_ declarations + cleanup 2018-12-02 15:24:14 -08:00
Conner Fromknecht
0d9b5ecc3c
Makefile: use period for print for consistency 2018-11-30 15:20:50 -08:00
Conner Fromknecht
0ad3302e16
Makefile: remove unnecessary PROD_TAGS 2018-11-30 15:20:47 -08:00
Conner Fromknecht
3e0ca05740
Makefile: add travis-race and travis-cover targets 2018-11-30 15:20:45 -08:00
Olaoluwa Osuntokun
24ab9970bf
build: modify make file to use go get with precise btcd hash 2018-11-30 14:01:00 -08:00
Olaoluwa Osuntokun
9e5ba86cef
build: force modules at the travis script level 2018-11-29 21:40:47 -08:00
Olaoluwa Osuntokun
1483af79da
build: force gomodules when executing linter 2018-11-29 21:35:51 -08:00
Olaoluwa Osuntokun
910757d30e
build: force go modules off when using metalinter in makefile 2018-11-29 21:26:30 -08:00
Olaoluwa Osuntokun
0936aebf1d
build: remove glide usage to build btcd from Makefile
We no longer need glide to build btcd as btcd itself now uses go modules
as we do.
2018-11-29 20:33:50 -08:00
Olaoluwa Osuntokun
e2e73379c7
build: update makefile to be aware of go modules, remove dep support
In this commit, we update the makefile to be aware of go modules. Along
the way, we remove all references to dep as we no longer use it within
this project. Note that in order to allow usage of go modules within the
$GOPATH directory, we set the `GO111MODULE=on` environment variable.
2018-11-28 20:13:52 -08:00
Johan T. Halseth
b64d55cdbf
make: remove make travis 2018-11-16 11:04:51 +01:00
Johan T. Halseth
23c858576f
make: define itest-only
'itest-only' can be used to only run integration tests, not build any of
the dependencies. This is useful on travis, where manually executing
each command makes it easier to track the time spent on each.
2018-11-16 11:04:50 +01:00
Johan T. Halseth
c6ee2803ad
make: define goveralls 2018-11-16 11:04:50 +01:00
Johan T. Halseth
099a9b7b79
make: remove uneccessary go install
'go install' is done as part of 'go get -u'.
2018-11-16 11:04:50 +01:00
Johan T. Halseth
dca5997262
make: ensure make fmt is run with -s flag
Linting will fail if code is not formatted with the -s flag, so make
sure we always use it when formatting.
2018-10-29 08:58:47 +01:00