lnd.xprv/.travis.yml
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

50 lines
1.3 KiB
YAML

language: go
cache:
directories:
- vendor/
- $GOCACHE
- $GOPATH/src/github.com/btcsuite
- $GOPATH/src/github.com/golang
- $GOPATH/src/gopkg.in/alecthomas
go:
- "1.11.x"
env:
global:
- GOCACHE=$HOME/.go-build
matrix:
- RACE=true LINT=true
- ITEST=true
- COVER=true
sudo: required
install:
- sudo add-apt-repository -y ppa:bitcoin/bitcoin -y
- sudo apt-get update -q
- sudo apt-get install bitcoind -y
- export PATH=$PATH:$PWD/linux-amd64/
script:
# Common for all builds.
- make dep
- make btcd
# Run linter if LINT=true.
- 'if [ "$LINT" = true ]; then make lint ; fi'
# Run unit tests with race condition detector.
- 'if [ "$RACE" = true ]; then make unit-race ; fi'
# Run integration tests.
- 'if [ "$ITEST" = true ]; then make build ; fi'
- 'if [ "$ITEST" = true ]; then make itest-only ; fi'
# Run unit tests and generate coverage report.
- 'if [ "$COVER" = true ]; then make unit-cover; fi'
- 'if [ "$COVER" = true ]; then make goveralls; fi'
after_script:
- echo "Uploading to termbin.com..." && find *.log | xargs -I{} sh -c "cat {} | nc termbin.com 9999 | xargs -r0 printf '{} uploaded to %s'"
- echo "Uploading to file.io..." && tar -zcvO *.log | curl -s -F 'file=@-;filename=logs.tar.gz' https://file.io | xargs -r0 printf 'logs.tar.gz uploaded to %s\n'