-
Notifications
You must be signed in to change notification settings - Fork 116
120 lines (104 loc) · 2.58 KB
/
build.yml
File metadata and controls
120 lines (104 loc) · 2.58 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Build on Push
on:
push:
paths-ignore:
- docs/**
- README.md
pull_request:
branches:
- main
paths-ignore:
- docs/**
- README.md
permissions:
contents: read
jobs:
test:
name: Test
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
deployments: read
packages: none
env:
GO111MODULE: on
steps:
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: "go.mod"
cache: false
- name: Run tests
run: make test
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2
build-linux-and-windows:
name: Build Linux and Windows
runs-on: ubuntu-latest
needs: test
steps:
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: "go.mod"
cache: false
- name: Build Linux AMD64
run: make
env:
GOOS: linux
GOARCH: amd64
CGO_ENABLED: 0
- name: Build Linux ARM64
run: make
env:
GOOS: linux
GOARCH: arm64
CGO_ENABLED: 0
- name: Build Linux ARMv7
run: make
env:
GOOS: linux
GOARCH: arm
GOARM: "7"
CGO_ENABLED: 0
- name: Build Windows AMD64
run: make
env:
GOOS: windows
GOARCH: amd64
CGO_ENABLED: 0
- name: Build Windows ARM64
run: make
env:
GOOS: windows
GOARCH: arm64
CGO_ENABLED: 0
build-macos:
name: Build macOS
runs-on: macos-latest
needs: test
steps:
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: "go.mod"
cache: false
- name: Build macOS AMD64
run: make
env:
GOOS: darwin
GOARCH: amd64
CGO_ENABLED: 1
- name: Build macOS ARM64
run: make
env:
GOOS: darwin
GOARCH: arm64
CGO_ENABLED: 1