travis+lint+make: limit lint concurrency only on travis

Since linting is much faster by using the defaults locally.
This commit is contained in:
Johan T. Halseth 2020-03-28 10:39:17 +01:00
parent 90dfb97224
commit 73c542c934
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26
3 changed files with 8 additions and 6 deletions

@ -2,10 +2,6 @@ run:
# timeout for analysis
deadline: 4m
# Linting uses a lot of memory. Keep it under control by only running a single
# worker.
concurrency: 1
# Skip autogenerated files for mobile.
skip-files:
- "mobile\\/.*generated\\.go"

@ -41,7 +41,7 @@ jobs:
script:
- make rpc-check
- make unit pkg=... case=_NONE_
- make lint
- make lint workers=1
- make btcd
- LNDBUILDSYS=windows-amd64 bash ./build/release/release.sh
- stage: Test

@ -51,7 +51,13 @@ include make/testing_flags.mk
DEV_TAGS := $(if ${tags},$(DEV_TAGS) ${tags},$(DEV_TAGS))
LINT = $(LINT_BIN) run -v
# Linting uses a lot of memory, so keep it under control by limiting the number
# of workers if requested.
ifneq ($(workers),)
LINT_WORKERS = --concurrency=$(workers)
endif
LINT = $(LINT_BIN) run -v $(LINT_WORKERS)
GREEN := "\\033[0;32m"
NC := "\\033[0m"