-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
61 lines (57 loc) · 2.01 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
branches:
only:
- master
- /^v.*$/
stages:
- name: go-pb-update
if: type = push AND branch = master
- name: build
matrix:
include:
- language: go
stage: go-pb-update
go: 1.13.x
sudo: true
services:
- docker
install:
- docker pull $DOCKER_AUX_REPO
- go get -u github.com/gogo/protobuf/protoc-gen-gofast
script: bash -v ci/go-pb-update.sh
- language: go
stage: build
go: 1.11.x
- language: go
go: 1.12.x
- language: go
go: 1.13.x
install:
- go get -t ./...
script:
- gofmt -w $(find -name "*.go")
- git diff --exit-code
- go get golang.org/x/tools/cmd/cover
- go test -v -race -covermode=atomic -coverprofile=coverage.txt
after_success: bash <(curl -s https://codecov.io/bash)
before_deploy:
- cd $GOPATH/bin
- rm -rf *
- GOOS=linux GOARCH=amd64 go install github.com/proio-org/go-proio/tools/...
- tar -czf proio_tools-$TRAVIS_TAG-linux-amd64.tar.gz *
- GOOS=darwin GOARCH=amd64 go install github.com/proio-org/go-proio/tools/...
- cd darwin_amd64
- tar -czf ../proio_tools-$TRAVIS_TAG-darwin-amd64.tar.gz *
- GOOS=windows GOARCH=amd64 go install github.com/proio-org/go-proio/tools/...
- cd ../windows_amd64
- zip ../proio_tools-$TRAVIS_TAG-windows-amd64.zip *
deploy:
provider: releases
api_key: $RELEASE_ASSET_TOKEN
file:
- $GOPATH/bin/proio_tools-$TRAVIS_TAG-linux-amd64.tar.gz
- $GOPATH/bin/proio_tools-$TRAVIS_TAG-darwin-amd64.tar.gz
- $GOPATH/bin/proio_tools-$TRAVIS_TAG-windows-amd64.zip
on:
tags: true
overwrite: true
sudo: false