-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
50 lines (40 loc) · 1.27 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
dist: trusty
env:
global:
- CC_TEST_REPORTER_ID=$CC_TOKEN
language: go
notifications:
email: false
before_script:
- go get -v github.com/golang/dep/cmd/dep
- go get -v github.com/codeclimate/test-reporter
- cd $GOPATH/src/github.com/golang/dep/cmd/dep && git checkout tags/v0.4.1 && go install
- cd $GOPATH/src/github.com/codeclimate/test-reporter && git checkout tags/v0.4.3 && go install
- cd - && dep ensure -v -vendor-only
- test-reporter before-build
- cd $TRAVIS_BUILD_DIR && cp ./testfiles/gphoto2 ~/bin/gphoto2
- chmod +x ~/bin/gphoto2
script:
- go test -coverprofile c.out ${gobuild_args} ./...
- go get github.com/mattn/go-isatty
- cd src/app/
- env GOOS=linux GOARCH=arm GOARM=5 go build goPhoBo.go
- env GOOS=windows GOARCH=amd64 go build goPhoBo.go
after_script:
- test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
after_success:
- zip -r goPhoBo-win64.zip static
- zip -u goPhoBo-win64.zip goPhoBo.exe
- zip -r goPhoBo-raspi.zip static
- zip -u goPhoBo-raspi.zip goPhoBo
deploy:
provider: releases
skip_cleanup: true
api_key: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
keep_history: true
file:
- goPhoBo-win64.zip
- goPhoBo-raspi.zip
on:
repo: pfedan/goPhoBo
tags: true