d7af7934b8
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.
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
language: go
|
|
cache:
|
|
directories:
|
|
- ~/bitcoin/bitcoin-0.19.0.1/bin
|
|
- $GOCACHE
|
|
- $GOPATH/pkg/mod
|
|
- $GOPATH/src/github.com/btcsuite
|
|
- $GOPATH/src/github.com/golang
|
|
- $GOPATH/src/gopkg.in/alecthomas
|
|
|
|
go:
|
|
- "1.13.x"
|
|
|
|
env:
|
|
global:
|
|
- GOCACHE=$HOME/.go-build
|
|
|
|
sudo: required
|
|
|
|
before_script: bash ./scripts/install_bitcoind.sh
|
|
|
|
jobs:
|
|
include:
|
|
- stage: Build
|
|
script:
|
|
- make unit pkg=... case=_NONE_
|
|
- make lint
|
|
- make btcd
|
|
- stage: Test
|
|
script: make travis-cover
|
|
name: Unit Cover
|
|
- script: make travis-race
|
|
name: Unit Race
|
|
- script: make itest
|
|
name: Btcd Integration
|
|
- script: make itest backend=bitcoind
|
|
name: Bitcoind Integration
|
|
- script: make itest backend=neutrino
|
|
name: Neutrino Integration
|
|
|
|
after_script:
|
|
- LOG_FILES=./lntest/itest/*.log
|
|
- echo "Uploading to termbin.com..." && find $LOG_FILES | xargs -I{} sh -c "cat {} | nc termbin.com 9999 | xargs -r0 printf '{} uploaded to %s'"
|
|
- echo "Uploading to file.io..." && tar -zcvO $LOG_FILES | curl -s -F 'file=@-;filename=logs.tar.gz' https://file.io | xargs -r0 printf 'logs.tar.gz uploaded to %s\n'
|