forked from lightningnetwork/lnd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
112 lines (96 loc) · 3.41 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
language: go
cache:
directories:
- $GOCACHE
- $GOPATH/pkg/mod
- $GOPATH/src/github.com/btcsuite
- $GOPATH/src/github.com/golang
- $GOPATH/src/github.com/grpc-ecosystem
- $GOPATH/src/gopkg.in/alecthomas
- $GOPATH/src/google.golang.org
# Remove Travis' default flag --depth=50 from the git clone command to make sure
# we have the whole git history, including the commit we lint against.
git:
depth: false
go:
# If you change this value, please change it in the following files as well:
# /Dockerfile
# /dev.Dockerfile
# /make/builder.Dockerfile
# /.github/workflows/main.yml
# /.github/workflows/release.yml
- 1.16.3
env:
global:
- GOCACHE=$HOME/.go-build
- BITCOIN_VERSION=0.20.1
sudo: required
jobs:
include:
- stage: Sanity Check
name: Lint and compile
script:
# Step 1: Make sure no diff is produced when compiling with the correct
# version.
- make rpc-check
# Step 2: Make sure the unit tests compile, but don't run them. They run
# in a GitHub Workflow.
- make unit pkg=... case=_NONE_
# Step 3: Lint go code. Invoke GC more often to reduce memory usage.
- GOGC=30 make lint
- stage: Integration Test
name: Btcd Integration
script:
- make itest-parallel
- name: Bitcoind Integration (txindex enabled)
script:
- bash ./scripts/install_bitcoind.sh
- make itest-parallel backend=bitcoind
- name: Bitcoind Integration with etcd (txindex enabled)
script:
- bash ./scripts/install_bitcoind.sh
- make itest-parallel backend=bitcoind dbbackend=etcd
- name: Bitcoind Integration (txindex disabled)
script:
- bash ./scripts/install_bitcoind.sh
- make itest-parallel backend="bitcoind notxindex"
- name: Neutrino Integration
script:
- make itest-parallel backend=neutrino
- name: Bitcoind Integration ARM
script:
- bash ./scripts/install_bitcoind.sh
- GOARM=7 GOARCH=arm GOOS=linux make itest-parallel backend=bitcoind ITEST_PARALLELISM=2
arch: arm64
services:
- docker
- name: Btcd Integration Windows
script:
# The windows VM seems to be slower than the other Travis VMs. We only
# run 2 test suites in parallel instead of the default 4.
- make itest-parallel windows=1 ITEST_PARALLELISM=2
os: windows
before_install:
- choco upgrade --no-progress -y make netcat curl findutils
- export MAKE=mingw32-make
after_failure:
- |-
case $TRAVIS_OS_NAME in
windows)
echo "Uploading to termbin.com..."
LOG_FILES=$(find ./lntest/itest -name '*.log')
for f in $LOG_FILES; do echo -n $f; cat $f | nc termbin.com 9999 | xargs -r0 printf ' uploaded to %s'; done
;;
esac
after_failure:
- |-
case $TRAVIS_OS_NAME in
windows)
# Needs other commands, see after_script of the Windows build
;;
*)
LOG_FILES=$(find ./lntest/itest -name '*.log')
echo "Uploading to termbin.com..." && for f in $LOG_FILES; do echo -n $f; cat $f | nc termbin.com 9999 | xargs -r0 printf ' uploaded to %s'; done
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'
;;
esac