8
8
branches :
9
9
- " *"
10
10
11
+ concurrency :
12
+ # Cancel any previous workflows if they are from a PR or push.
13
+ group : ${{ github.event.pull_request.number || github.ref }}
14
+ cancel-in-progress : true
15
+
16
+ defaults :
17
+ run :
18
+ shell : bash
19
+
11
20
env :
12
21
# If you change this value, please change it in the following files as well:
13
22
# /Dockerfile
29
38
30
39
steps :
31
40
- name : git checkout
32
- uses : actions/checkout@v3
41
+ uses : actions/checkout@v4
33
42
with :
34
43
fetch-depth : 0
35
44
68
77
69
78
steps :
70
79
- name : git checkout
71
- uses : actions/checkout@v3
80
+ uses : actions/checkout@v4
72
81
with :
73
82
fetch-depth : 0
74
83
88
97
- name : build CLI binaries
89
98
run : make go-install-cli
90
99
100
+ # #######################
101
+ # cross compilation
102
+ # #######################
103
+ cross-compile :
104
+ name : cross compilation
105
+ runs-on : ubuntu-latest
106
+ strategy :
107
+ fail-fast : true
108
+ matrix :
109
+ # Please keep this list in sync with make/release_flags.mk!
110
+ include :
111
+ - name : i386
112
+ sys : linux-386
113
+ - name : amd64
114
+ sys : darwin-amd64 linux-amd64 windows-amd64
115
+ - name : arm
116
+ sys : darwin-arm64 linux-armv6 linux-armv7 linux-arm64
117
+ steps :
118
+ - name : cleanup space
119
+ run : rm -rf /opt/hostedtoolcache
120
+
121
+ - name : git checkout
122
+ uses : actions/checkout@v4
123
+
124
+ - name : setup go ${{ env.GO_VERSION }}
125
+ uses : ./.github/actions/setup-go
126
+ with :
127
+ go-version : ' ${{ env.GO_VERSION }}'
128
+ key-prefix : cross-compile
129
+ use-build-cache : ' no'
130
+
131
+ - name : build release for all architectures (skip app build)
132
+ run : make go-release sys="${{ matrix.sys }}"
133
+
91
134
# #######################
92
135
# proto compile check
93
136
# #######################
96
139
runs-on : ubuntu-latest
97
140
steps :
98
141
- name : git checkout
99
- uses : actions/checkout@v3
142
+ uses : actions/checkout@v4
100
143
with :
101
144
fetch-depth : 0
102
145
@@ -132,7 +175,7 @@ jobs:
132
175
runs-on : ubuntu-latest
133
176
steps :
134
177
- name : git checkout
135
- uses : actions/checkout@v3
178
+ uses : actions/checkout@v4
136
179
with :
137
180
fetch-depth : 0
138
181
@@ -160,7 +203,7 @@ jobs:
160
203
runs-on : ubuntu-latest
161
204
steps :
162
205
- name : git checkout
163
- uses : actions/checkout@v3
206
+ uses : actions/checkout@v4
164
207
with :
165
208
fetch-depth : 0
166
209
@@ -173,7 +216,7 @@ jobs:
173
216
run : mkdir -p app/build; touch app/build/index.html
174
217
175
218
- name : run check
176
- run : make lint mod-check
219
+ run : make mod-check && make lint
177
220
178
221
# #######################
179
222
# unit tests
@@ -190,7 +233,7 @@ jobs:
190
233
- unit
191
234
steps :
192
235
- name : git checkout
193
- uses : actions/checkout@v3
236
+ uses : actions/checkout@v4
194
237
with :
195
238
fetch-depth : 0
196
239
@@ -210,7 +253,7 @@ jobs:
210
253
runs-on : ubuntu-latest
211
254
steps :
212
255
- name : git checkout
213
- uses : actions/checkout@v3
256
+ uses : actions/checkout@v4
214
257
with :
215
258
fetch-depth : 0
216
259
@@ -253,7 +296,7 @@ jobs:
253
296
if : ' !contains(github.event.pull_request.labels.*.name, '' no-changelog'' )'
254
297
steps :
255
298
- name : git checkout
256
- uses : actions/checkout@v3
299
+ uses : actions/checkout@v4
257
300
258
301
- name : release notes check
259
302
run : scripts/check-release-notes.sh
0 commit comments