File tree Expand file tree Collapse file tree 3 files changed +54
-5
lines changed Expand file tree Collapse file tree 3 files changed +54
-5
lines changed Original file line number Diff line number Diff line change 2525 if : success()
2626 uses : actions/setup-go@v1
2727 with :
28- go-version : 1.13 .x
28+ go-version : 1.15 .x
2929 - name : Checkout code
3030 uses : actions/checkout@v1
3131 - name : Run tests
4848 - name : Install Go
4949 uses : actions/setup-go@v1
5050 with :
51- go-version : 1.13 .x
51+ go-version : 1.15 .x
5252 - name : Checkout code
5353 uses : actions/checkout@v1
5454 - name : build
7474 name : bin
7575 - name : Run test
7676 run : |
77- chmod 755 bin/gcov2lcov
7877 make inttest
Original file line number Diff line number Diff line change 1+ on :
2+ release :
3+ types : [created]
4+
5+ name : Upload release assets
6+ jobs :
7+ build :
8+ name : build binaries
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Install Go
12+ uses : actions/setup-go@v1
13+ with :
14+ go-version : 1.13.x
15+ - name : Checkout code
16+ uses : actions/checkout@v1
17+ - name : build
18+ run : |
19+ export GO111MODULE=on
20+ make build
21+ for f in bin/*; do tar cvzf $f.tar.gz $f; rm $f; done
22+ cp README.md bin/
23+ - name : upload artifacts
24+ uses : actions/upload-artifact@master
25+ with :
26+ name : binaries
27+ path : bin/
28+
29+ upload :
30+ name : Upload release assets
31+ runs-on : ubuntu-latest
32+ needs : [build]
33+ steps :
34+ - name : Download build artefacts
35+ uses : actions/download-artifact@v1
36+ with :
37+ name : binaries
38+ path : bin/
39+ - name : Upload release assets
40+ uses : skx/github-action-publish-binaries@9f2ea568baec5017a7d608f03ef143a57745cc5c
41+ env :
42+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
43+ with :
44+ args : ' ./bin/*'
Original file line number Diff line number Diff line change 22.PHONY : build test inttest
33
44build :
5- go build -o bin/gcov2lcov .
5+ GOOS=linux GOARCH=amd64 go build -o bin/gcov2lcov-linux-amd64 .
6+ GOOS=windows GOARCH=amd64 go build -o bin/gcov2lcov-win-amd64 .
7+ GOOS=darwin GOARCH=amd64 go build -o bin/gcov2lcov-darwin-amd64 .
68
79test :
810 go test ./... -coverprofile coverage.out
911 go tool cover -func coverage.out
1012
1113inttest : build
12- ./bin/gcov2lcov -infile testdata/coverage.out -outfile coverage.lcov
14+ ./bin/gcov2lcov-linux-amd64 -infile testdata/coverage.out -outfile coverage.lcov
1315 diff -y testdata/coverage_expected.lcov coverage.lcov
1416
17+ clean :
18+ rm -f bin/*
19+
20+
You can’t perform that action at this time.
0 commit comments