forked from Vilsol/go-mlog
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (56 loc) · 1.59 KB
/
build.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
name: build
on: [push, pull_request]
jobs:
build:
name: Build for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
file: go-mlog-linux-amd64
args: --best --lzma
strip: true
cgo: 0
- os: windows-latest
file: go-mlog-win-amd64.exe
args: -9
strip: false
cgo: 1
- os: macos-latest
file: go-mlog-osx-amd64
args: --best
strip: false
cgo: 1
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.16
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Build
run: go build -ldflags="-s -w" -v -o ${{ matrix.file }} .
env:
CGO_ENABLED: ${{ matrix.cgo }}
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.16
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Test
run: |
go test -v -coverprofile=coverage.txt -covermode=atomic -coverpkg=./... github.com/Vilsol/go-mlog/tests/runtime \
&& go test -v -coverprofile=coverage.txt -covermode=atomic -coverpkg=./... github.com/Vilsol/go-mlog/tests/transpiler
env:
CGO_ENABLED: 0
- name: Codecov
uses: codecov/codecov-action@v1