@@ -52,31 +52,31 @@ jobs:
52
52
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
53
53
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
54
54
- name : Cache Go Modules
55
+ id : module-cache
55
56
uses : actions/cache@v2
56
57
env :
57
58
cache-name : cache-go-modules
58
59
with :
59
60
path : /home/runner/go/pkg/mod
60
- key : go-pkg-mod-${{ runner.os }}-${{ hashFiles('./go.mod') }}
61
- - name : Restore tools binaries
61
+ key : go-pkg-mod-${{ runner.os }}-${{ hashFiles('**/go.mod') }}
62
+ - name : Download dependencies
63
+ if : steps.module-cache.outputs.cache-hit != 'true'
64
+ run : go mod download
65
+ - name : Cache Tools
62
66
id : tool-cache
63
67
uses : actions/cache@v2
64
68
env :
65
69
cache-name : cache-tool-binaries
66
70
with :
67
71
path : /home/runner/go/bin
68
- key : tools-${{ runner.os }}-${{ hashFiles('./internal/tools/go.mod') }}
69
- - name : Install tools
72
+ key : tools-${{ runner.os }}-${{ hashFiles('./internal/tools/go.mod', './cmd/mdatagen/go.mod', './cmd/mdatagen/*.go' ) }}
73
+ - name : Install Tools
70
74
if : steps.tool-cache.outputs.cache-hit != 'true'
71
75
run : make install-tools
72
76
- name : Split Loadtest Jobs
73
77
id : splitloadtest
74
78
run : ./.github/workflows/scripts/setup_load_tests.sh
75
- - name : Upload Tool Binaries
76
- uses : actions/upload-artifact@v1
77
- with :
78
- name : tool-binaries
79
- path : /home/runner/go/bin
79
+
80
80
lint :
81
81
runs-on : ubuntu-latest
82
82
needs : [setup-environment]
@@ -98,13 +98,14 @@ jobs:
98
98
with :
99
99
path : /home/runner/go/pkg/mod
100
100
key : go-pkg-mod-${{ runner.os }}-${{ hashFiles('./go.mod') }}
101
- - name : Download Tool Binaries
102
- uses : actions/download-artifact@v1
101
+ - name : Cache Tools
102
+ id : tool-cache
103
+ uses : actions/cache@v2
104
+ env :
105
+ cache-name : cache-tool-binaries
103
106
with :
104
- name : tool-binaries
105
107
path : /home/runner/go/bin
106
- - name : Add Permissions to Tool Binaries
107
- run : chmod -R +x /home/runner/go/bin
108
+ key : tools-${{ runner.os }}-${{ hashFiles('./internal/tools/go.mod') }}
108
109
- name : Lint
109
110
run : make -j4 gochecklicense goimpi golint gomisspell
110
111
- name : Gen Metadata
@@ -136,13 +137,14 @@ jobs:
136
137
with :
137
138
path : /home/runner/go/pkg/mod
138
139
key : go-pkg-mod-${{ runner.os }}-${{ hashFiles('./go.mod') }}
139
- - name : Download Tool Binaries
140
- uses : actions/download-artifact@v1
140
+ - name : Cache Tools
141
+ id : tool-cache
142
+ uses : actions/cache@v2
143
+ env :
144
+ cache-name : cache-tool-binaries
141
145
with :
142
- name : tool-binaries
143
146
path : /home/runner/go/bin
144
- - name : Add Permissions to Tool Binaries
145
- run : chmod -R +x /home/runner/go/bin
147
+ key : tools-${{ runner.os }}-${{ hashFiles('./internal/tools/go.mod') }}
146
148
- name : Build Collector for All Architectures
147
149
run : grep ^binaries-all-sys Makefile|fmt -w 1|tail -n +2|xargs make
148
150
- name : Create Collector Binaries Archive
@@ -176,13 +178,14 @@ jobs:
176
178
with :
177
179
path : /home/runner/go/pkg/mod
178
180
key : go-pkg-mod-${{ runner.os }}-${{ hashFiles('./go.mod') }}
179
- - name : Download Tool Binaries
180
- uses : actions/download-artifact@v1
181
+ - name : Cache Tools
182
+ id : tool-cache
183
+ uses : actions/cache@v2
184
+ env :
185
+ cache-name : cache-tool-binaries
181
186
with :
182
- name : tool-binaries
183
187
path : /home/runner/go/bin
184
- - name : Add Permissions to Tool Binaries
185
- run : chmod -R +x /home/runner/go/bin
188
+ key : tools-${{ runner.os }}-${{ hashFiles('./internal/tools/go.mod') }}
186
189
- name : Install fluentbit
187
190
if : ${{ contains(matrix.test, 'Log10kDPS') }}
188
191
run : |
@@ -231,13 +234,14 @@ jobs:
231
234
with :
232
235
path : /home/runner/go/pkg/mod
233
236
key : go-pkg-mod-${{ runner.os }}-${{ hashFiles('./go.mod') }}
234
- - name : Download Tool Binaries
235
- uses : actions/download-artifact@v1
237
+ - name : Cache Tools
238
+ id : tool-cache
239
+ uses : actions/cache@v2
240
+ env :
241
+ cache-name : cache-tool-binaries
236
242
with :
237
- name : tool-binaries
238
243
path : /home/runner/go/bin
239
- - name : Add Permissions to Tool Binaries
240
- run : chmod -R +x /home/runner/go/bin
244
+ key : tools-${{ runner.os }}-${{ hashFiles('./internal/tools/go.mod') }}
241
245
- name : Loadtest
242
246
run : make testbed-correctness
243
247
- name : GitHub Issue Generator
@@ -271,13 +275,14 @@ jobs:
271
275
ruby-version : ' 2.6'
272
276
- name : Install fpm
273
277
run : gem install --no-document fpm -v 1.11.0
274
- - name : Download Tool Binaries
275
- uses : actions/download-artifact@v1
278
+ - name : Cache Tools
279
+ id : tool-cache
280
+ uses : actions/cache@v2
281
+ env :
282
+ cache-name : cache-tool-binaries
276
283
with :
277
- name : tool-binaries
278
284
path : /home/runner/go/bin
279
- - name : Add Permissions to Tool Binaries
280
- run : chmod -R +x /home/runner/go/bin
285
+ key : tools-${{ runner.os }}-${{ hashFiles('./internal/tools/go.mod') }}
281
286
- name : Download Collector Binaries
282
287
uses : actions/download-artifact@v1
283
288
with :
@@ -362,13 +367,14 @@ jobs:
362
367
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
363
368
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
364
369
mkdir bin/ dist/
365
- - name : Download Tool Binaries
366
- uses : actions/download-artifact@v1
370
+ - name : Cache Tools
371
+ id : tool-cache
372
+ uses : actions/cache@v2
373
+ env :
374
+ cache-name : cache-tool-binaries
367
375
with :
368
- name : tool-binaries
369
376
path : /home/runner/go/bin
370
- - name : Add Permissions to Tool Binaries
371
- run : chmod -R +x /home/runner/go/bin
377
+ key : tools-${{ runner.os }}-${{ hashFiles('./internal/tools/go.mod') }}
372
378
- name : Download Binaries
373
379
uses : actions/download-artifact@v1
374
380
with :
@@ -421,13 +427,14 @@ jobs:
421
427
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
422
428
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
423
429
mkdir bin/ dist/
424
- - name : Download Tool Binaries
425
- uses : actions/download-artifact@v1
430
+ - name : Cache Tools
431
+ id : tool-cache
432
+ uses : actions/cache@v2
433
+ env :
434
+ cache-name : cache-tool-binaries
426
435
with :
427
- name : tool-binaries
428
436
path : /home/runner/go/bin
429
- - name : Add Permissions to Tool Binaries
430
- run : chmod -R +x /home/runner/go/bin
437
+ key : tools-${{ runner.os }}-${{ hashFiles('./internal/tools/go.mod') }}
431
438
- name : Download Binaries
432
439
uses : actions/download-artifact@v1
433
440
with :
0 commit comments