8bc61693bf
In this commit, we modify our build file to only lint under go 1.11. We do this as there's been a breaking change in gofmt between go 1.10 and go 1.11 that causes files which pass the linter under go 1.10, to fail the linter under go 1.11. In the end, we only really need to lint using one version of go. In order to achieve this, we "unroll" the build matrix to enumerate each version and the environment variables that it should be run with. We then modify the Makefile to only include the lint directive if the particular env variable is set ($(USE_LINT)). With these two changes, we'll now only lint under go 1.11.
24 lines
789 B
YAML
24 lines
789 B
YAML
language: go
|
|
matrix:
|
|
include:
|
|
- go: "1.11"
|
|
env: RACE=FALSE USE_LINT=TRUE
|
|
- go: "1.11"
|
|
env: RACE=FALSE USE_LINT=TRUE
|
|
- go: "1.10"
|
|
env: RACE=TRUE USE_LINT=FALSE
|
|
- go: "1.10"
|
|
env: RACE=FALSE USE_LINT=FALSE
|
|
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:
|
|
- export PATH=$PATH:$GOPATH/bin
|
|
- make travis
|
|
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'
|