-
Notifications
You must be signed in to change notification settings - Fork 35
/
.travis.yml
88 lines (77 loc) · 4.8 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
---
language: go
go:
- 1.x
matrix:
fast_finish: true
before_install:
- go get golang.org/x/lint/golint
- go get github.com/mattn/goveralls
- >-
if [ -n "$TRAVIS_TAG" ]; then
sudo apt-get install -y rpm build-essential fakeroot expect debsigs;
openssl aes-256-cbc -K $encrypted_6b7e08428daf_key -iv $encrypted_6b7e08428daf_iv -in dist/gpg_key.priv.enc -out dist/gpg_key.priv -d;
fi
before_script:
- golint -set_exit_status ./...
- go vet ./... | grep ':' && false || true
- go test -v -cover ./...
script:
- >-
if [ -n "$TRAVIS_TAG" ]; then
CGO_ENABLED=0 go build -ldflags="-s -w -X main.version=${TRAVIS_TAG:1} -X main.build=${TRAVIS_COMMIT::6}" -o $GOPATH/bin/gbt ./cmd/gbt;
$GOPATH/bin/gbt -version | egrep " ${TRAVIS_TAG:1}, build ${TRAVIS_COMMIT::6}\$";
dist/build.sh;
else
go install github.com/jtyr/gbt/cmd/gbt;
$GOPATH/bin/gbt -version;
fi
- >-
if [ "$TRAVIS_PULL_REQUEST" = 'false' ]; then
for N in $(go list ./...); do go test -v -covermode=count -coverprofile=${N//\//_}.out ${N/_$PWD\//.\/} 1>/dev/null; done;
echo 'mode: count' > coverage.out && cat *.out | grep -v 'mode:' | sort -r | awk '{if($1 != last) {print $0;last=$1}}' >> coverage.out;
$GOPATH/bin/goveralls -coverprofile=coverage.out -service=travis-ci;
fi
deploy:
- provider: releases
api_key:
secure: A1QDjXCQegKNbREQZVXheeHRAXIbwyk0Sds+MwgsYyHrs9CRSw/mX8GYJod+m2fv9Zo/+IQpswvMcl+OGyzAoWcHxVmBi6451j56qrvE/GgRdn/DSql85fXbYi2NBjTbe49TSXiw5N76Nr8mB7XfaSBo1HWUi/INpddwLLke6728pWN5F7yUua90CJb8WRUK2xIB4cbchIF9ktgC6aVEFK+xk9rcWA5hSs9nJa56cJLh28q8cVl7PGbma8oVypfNXCYbTcXMG+ZWhGJBi4GdVz2A+ybPLMngWEN17oxZNCM3OsJIlUiQzwAyRGqKp5Mn3gT0Tzegx589wb37S2X0aSuOhnJ4i8P1TfTzURU/yzdT0wJ3VWyVP+4THaTLAiFOg+NCzZ/wJltBAGuSW6+lEMsozY4g5LhcT1zCdRC1IWavzUmMS7hFokhAaRYP4/XKCfeO14yEmtjxMajG466EdMPWxobWR5xvDvun1bIj8rezV2JBlyM3VHWwmcz+B4Ss7loNgeq7l8HLK9E/5AVr3BSaVtPpqJ8mZwm76iAdpI6GsU7/qK1rjG015Hh0jGy30f/VGIFC7bESvfXHQhX9+jLXnxXkFtTEMVNI72YANg54MVYzgETq5wel65j7+0OVUa9J0oNfCc9/c8QQIf9oSKnplHMPYqoWTViSURZSsdQ=
file_glob: true
file:
- /tmp/gbt/*.tar.gz
- /tmp/gbt/*.deb
- /tmp/gbt/*.rpm
- /tmp/gbt/*.txt
skip_cleanup: true
on:
tags: true
repo: jtyr/gbt
- provider: packagecloud
username: gbt
repository: release
token:
secure: dqvuV55yoBumwteOf8HcsWraOBP0EaGvbYqEUHZUscL16IEe9Cmf+sfl3UekMUFoOmLchX0vLh2FD4izXlEHHQQDiW2lDVem1bjIgvEsRYPDZ/noFdXNIB7pAlMGhgeQUNGqm6OYVH47xB7RUEZvRPAYZ8whLKE5S/F1NKjRHQzGys92/aks3auNos35xX32KVHnc4eIylYigSHWFtmxKsUh1svlIGQpG1cfXVnjJAHDyxrWj42Ewd7u6Hrh3A4dpbazkMbJhXPx5TGQsfHOiEbaT+8QUq3mcO4QbOkZMdkyv4wBnfuZO+m1F40OfnD9WyVvFEROIiIFZF8KcOrM4JGjoR3SXe3GwWVeZmYbMwo/Y+RB9fHCA0prjhZgikl2e7TwpL5dc1mCyplFrTcwHIfhdQFGZZ7dZ4RQEZBFlw7t8VyIaukSzlZ0LRfcktlRop1+j+X9UJA0lgsMjT4wl5pbd2cGpb4BnBM6H4QdRN3msD1c7wR7VSjCdB3YMNkURQDMyxPjjeRHCaCKqN2u7wC/afAT0FDQLlP3dfdMyiHxHjVLC+JYaAdLYnQl8vhtGVnOEddIUe4VDQYaA5QOsFQEUTLH01jE0qLMgFTWrn2KNDDBwhh8dNcTCaAeOncA0P5qWqKuT1Wtw3DOdprviS0kAlHqTkjlj6Wv17Tsep8=
dist: ubuntu/xenial
skip_cleanup: true
local-dir: /tmp/gbt
package_glob: "*.deb"
on:
tags: true
repo: jtyr/gbt
- provider: packagecloud
username: gbt
repository: release
token:
secure: dqvuV55yoBumwteOf8HcsWraOBP0EaGvbYqEUHZUscL16IEe9Cmf+sfl3UekMUFoOmLchX0vLh2FD4izXlEHHQQDiW2lDVem1bjIgvEsRYPDZ/noFdXNIB7pAlMGhgeQUNGqm6OYVH47xB7RUEZvRPAYZ8whLKE5S/F1NKjRHQzGys92/aks3auNos35xX32KVHnc4eIylYigSHWFtmxKsUh1svlIGQpG1cfXVnjJAHDyxrWj42Ewd7u6Hrh3A4dpbazkMbJhXPx5TGQsfHOiEbaT+8QUq3mcO4QbOkZMdkyv4wBnfuZO+m1F40OfnD9WyVvFEROIiIFZF8KcOrM4JGjoR3SXe3GwWVeZmYbMwo/Y+RB9fHCA0prjhZgikl2e7TwpL5dc1mCyplFrTcwHIfhdQFGZZ7dZ4RQEZBFlw7t8VyIaukSzlZ0LRfcktlRop1+j+X9UJA0lgsMjT4wl5pbd2cGpb4BnBM6H4QdRN3msD1c7wR7VSjCdB3YMNkURQDMyxPjjeRHCaCKqN2u7wC/afAT0FDQLlP3dfdMyiHxHjVLC+JYaAdLYnQl8vhtGVnOEddIUe4VDQYaA5QOsFQEUTLH01jE0qLMgFTWrn2KNDDBwhh8dNcTCaAeOncA0P5qWqKuT1Wtw3DOdprviS0kAlHqTkjlj6Wv17Tsep8=
dist: el/7
skip_cleanup: true
local-dir: /tmp/gbt
package_glob: "*.rpm"
on:
tags: true
repo: jtyr/gbt
env:
global:
- secure: Am1FJP2T9i/Xb1TNU0mVk39bAU7BXbreR+hgagTAPFWspsZPneFNn7v2XHx62voR/oiaXB/wYQH4+F/+bbTjf+dAFZvEDKzMeWM9zGbNucG4zs2q3NzEJsRVdqWwg8hdM+6Qkokz73eSaxwTsePqVfNntn4Qt0FlNOk0FXPBCuBFIIqvqj4py/ssYDcC7mgsezF/fpJZG9W3py+0tmaxZTssdPENS3PAkqvnDcJuKj3a88oGPEpkmN8D0MTNPJqx/SXd/NCnUFDaeysMr8tuSEapEFoajd1NS3ihL91oEuBN5je6GxezYhiNhx6joxykNwnqDbDzo4isDxjU5CAUigLJkeFieiF8VSNbLj6wifm01tFy0I7IyvtdLBkRNnH999+6jnCPptIasI0FibIRORWWHa6077Y44BhCsqe5eIHtXLAOcDcdn0tHo8TtfnPX9x7zU/gzTqD6mJ65lbXW4TS2Mgv2lPL9vVuz/ad+rRYwwItM9k1ato5O10r5dSzoUaiXgYbsLdex1uIce0MuLiZutQ3FEA2uTaxh1kwKr7gQZuGMkBv5TNrBkLYC2CUiEFSipYnZ5oBSEH4p51QiWqgg82b/LX3AG7p/QYVQuFExSCFmUOTcCZOTCBJxXKiX9mzHWsE2USU/doN4lPL6EX3paCcJKTgI8Z/uyU0+0eA=
notifications:
email: false