Skip to content

Commit 276e17c

Browse files
authored
Cache Go builds on sdk/go.sum (#2483)
This is an unusual repository - go.sum changes all the time, while there are not so many parallel builds. This means that typically all PRs have cache misses because they edit some go.sum somewhere. It would be preferable to fetch the wrong build cache, hoping some parts of it still speed up the build, than it is to accept a cache miss. This PR relies on the fact that sdk/go.sum is fairly stable, and uses it as a key. This is less precise but might be preferable.
1 parent 5a053a7 commit 276e17c

File tree

8 files changed

+34
-34
lines changed

8 files changed

+34
-34
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
with:
4242
go-version: ${{matrix.goversion}}
4343
cache-dependency-path: |
44-
**/go.sum
44+
sdk/go.sum
4545
- name: Install pulumictl
4646
uses: jaxxstorm/[email protected]
4747
with:
@@ -153,7 +153,7 @@ jobs:
153153
with:
154154
go-version: ${{matrix.goversion}}
155155
cache-dependency-path: |
156-
**/go.sum
156+
sdk/go.sum
157157
- name: Install pulumictl
158158
uses: jaxxstorm/[email protected]
159159
with:
@@ -201,7 +201,7 @@ jobs:
201201
with:
202202
go-version: ${{matrix.goversion}}
203203
cache-dependency-path: |
204-
**/go.sum
204+
sdk/go.sum
205205
- name: Install pulumictl
206206
uses: jaxxstorm/[email protected]
207207
with:
@@ -271,7 +271,7 @@ jobs:
271271
with:
272272
go-version: ${{matrix.goversion}}
273273
cache-dependency-path: |
274-
**/go.sum
274+
sdk/go.sum
275275
- name: Install pulumictl
276276
uses: jaxxstorm/[email protected]
277277
with:
@@ -333,7 +333,7 @@ jobs:
333333
with:
334334
go-version: ${{matrix.goversion}}
335335
cache-dependency-path: |
336-
**/go.sum
336+
sdk/go.sum
337337
- name: Install pulumictl
338338
uses: jaxxstorm/[email protected]
339339
with:
@@ -394,7 +394,7 @@ jobs:
394394
with:
395395
go-version: ${{matrix.goversion}}
396396
cache-dependency-path: |
397-
**/go.sum
397+
sdk/go.sum
398398
- name: Install pulumictl
399399
uses: jaxxstorm/[email protected]
400400
with:
@@ -504,7 +504,7 @@ jobs:
504504
with:
505505
go-version: ${{matrix.goversion}}
506506
cache-dependency-path: |
507-
**/go.sum
507+
sdk/go.sum
508508
- name: Install pulumictl
509509
uses: jaxxstorm/[email protected]
510510
with:

.github/workflows/master.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
with:
4444
go-version: ${{matrix.goversion}}
4545
cache-dependency-path: |
46-
**/go.sum
46+
sdk/go.sum
4747
- name: Install pulumictl
4848
uses: jaxxstorm/[email protected]
4949
with:
@@ -157,7 +157,7 @@ jobs:
157157
with:
158158
go-version: ${{matrix.goversion}}
159159
cache-dependency-path: |
160-
**/go.sum
160+
sdk/go.sum
161161
- name: Install pulumictl
162162
uses: jaxxstorm/[email protected]
163163
with:
@@ -207,7 +207,7 @@ jobs:
207207
with:
208208
go-version: ${{matrix.goversion}}
209209
cache-dependency-path: |
210-
**/go.sum
210+
sdk/go.sum
211211
- name: Setup Node
212212
uses: actions/setup-node@v2
213213
with:
@@ -284,7 +284,7 @@ jobs:
284284
with:
285285
go-version: ${{matrix.goversion}}
286286
cache-dependency-path: |
287-
**/go.sum
287+
sdk/go.sum
288288
- name: Install pulumictl
289289
uses: jaxxstorm/[email protected]
290290
with:
@@ -347,7 +347,7 @@ jobs:
347347
with:
348348
go-version: ${{matrix.goversion}}
349349
cache-dependency-path: |
350-
**/go.sum
350+
sdk/go.sum
351351
- name: Install pulumictl
352352
uses: jaxxstorm/[email protected]
353353
with:
@@ -410,7 +410,7 @@ jobs:
410410
with:
411411
go-version: ${{matrix.goversion}}
412412
cache-dependency-path: |
413-
**/go.sum
413+
sdk/go.sum
414414
- name: Install pulumictl
415415
uses: jaxxstorm/[email protected]
416416
with:
@@ -521,7 +521,7 @@ jobs:
521521
with:
522522
go-version: ${{matrix.goversion}}
523523
cache-dependency-path: |
524-
**/go.sum
524+
sdk/go.sum
525525
- name: Install pulumictl
526526
uses: jaxxstorm/[email protected]
527527
with:

.github/workflows/nightly-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
with:
4444
go-version: ${{matrix.goversion}}
4545
cache-dependency-path: |
46-
**/go.sum
46+
sdk/go.sum
4747
- name: Install pulumictl
4848
uses: jaxxstorm/[email protected]
4949
with:
@@ -147,7 +147,7 @@ jobs:
147147
with:
148148
go-version: ${{matrix.goversion}}
149149
cache-dependency-path: |
150-
**/go.sum
150+
sdk/go.sum
151151
- name: Install pulumictl
152152
uses: jaxxstorm/[email protected]
153153
with:
@@ -250,7 +250,7 @@ jobs:
250250
with:
251251
go-version: ${{matrix.goversion}}
252252
cache-dependency-path: |
253-
**/go.sum
253+
sdk/go.sum
254254
- name: Install pulumictl
255255
uses: jaxxstorm/[email protected]
256256
with:

.github/workflows/prerelease.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
with:
4444
go-version: ${{matrix.goversion}}
4545
cache-dependency-path: |
46-
**/go.sum
46+
sdk/go.sum
4747
- name: Install pulumictl
4848
uses: jaxxstorm/[email protected]
4949
with:
@@ -147,7 +147,7 @@ jobs:
147147
with:
148148
go-version: ${{matrix.goversion}}
149149
cache-dependency-path: |
150-
**/go.sum
150+
sdk/go.sum
151151
- name: Setup Node
152152
uses: actions/setup-node@v2
153153
with:
@@ -224,7 +224,7 @@ jobs:
224224
with:
225225
go-version: ${{matrix.goversion}}
226226
cache-dependency-path: |
227-
**/go.sum
227+
sdk/go.sum
228228
- name: Install pulumictl
229229
uses: jaxxstorm/[email protected]
230230
with:
@@ -288,7 +288,7 @@ jobs:
288288
with:
289289
go-version: ${{matrix.goversion}}
290290
cache-dependency-path: |
291-
**/go.sum
291+
sdk/go.sum
292292
- name: Install pulumictl
293293
uses: jaxxstorm/[email protected]
294294
with:
@@ -351,7 +351,7 @@ jobs:
351351
with:
352352
go-version: ${{matrix.goversion}}
353353
cache-dependency-path: |
354-
**/go.sum
354+
sdk/go.sum
355355
- name: Install pulumictl
356356
uses: jaxxstorm/[email protected]
357357
with:
@@ -462,7 +462,7 @@ jobs:
462462
with:
463463
go-version: ${{matrix.goversion}}
464464
cache-dependency-path: |
465-
**/go.sum
465+
sdk/go.sum
466466
- name: Install pulumictl
467467
uses: jaxxstorm/[email protected]
468468
with:

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
with:
4444
go-version: ${{matrix.goversion}}
4545
cache-dependency-path: |
46-
**/go.sum
46+
sdk/go.sum
4747
- name: Install pulumictl
4848
uses: jaxxstorm/[email protected]
4949
with:
@@ -161,7 +161,7 @@ jobs:
161161
with:
162162
go-version: ${{matrix.goversion}}
163163
cache-dependency-path: |
164-
**/go.sum
164+
sdk/go.sum
165165
- name: Install pulumictl
166166
uses: jaxxstorm/[email protected]
167167
with:
@@ -238,7 +238,7 @@ jobs:
238238
with:
239239
go-version: ${{matrix.goversion}}
240240
cache-dependency-path: |
241-
**/go.sum
241+
sdk/go.sum
242242
- name: Install pulumictl
243243
uses: jaxxstorm/[email protected]
244244
with:
@@ -301,7 +301,7 @@ jobs:
301301
with:
302302
go-version: ${{matrix.goversion}}
303303
cache-dependency-path: |
304-
**/go.sum
304+
sdk/go.sum
305305
- name: Install pulumictl
306306
uses: jaxxstorm/[email protected]
307307
with:
@@ -364,7 +364,7 @@ jobs:
364364
with:
365365
go-version: ${{matrix.goversion}}
366366
cache-dependency-path: |
367-
**/go.sum
367+
sdk/go.sum
368368
- name: Install pulumictl
369369
uses: jaxxstorm/[email protected]
370370
with:
@@ -489,7 +489,7 @@ jobs:
489489
with:
490490
go-version: ${{matrix.goversion}}
491491
cache-dependency-path: |
492-
**/go.sum
492+
sdk/go.sum
493493
- name: Install pulumictl
494494
uses: jaxxstorm/[email protected]
495495
with:

.github/workflows/run-acceptance-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
with:
4848
go-version: ${{matrix.goversion}}
4949
cache-dependency-path: |
50-
**/go.sum
50+
sdk/go.sum
5151
- name: Install pulumictl
5252
uses: jaxxstorm/[email protected]
5353
with:
@@ -170,7 +170,7 @@ jobs:
170170
with:
171171
go-version: ${{matrix.goversion}}
172172
cache-dependency-path: |
173-
**/go.sum
173+
sdk/go.sum
174174
- name: Setup Node
175175
uses: actions/setup-node@v2
176176
with:
@@ -290,7 +290,7 @@ jobs:
290290
with:
291291
go-version: ${{matrix.goversion}}
292292
cache-dependency-path: |
293-
**/go.sum
293+
sdk/go.sum
294294
- name: Install pulumictl
295295
uses: jaxxstorm/[email protected]
296296
with:

.github/workflows/update-bridge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
with:
2222
go-version: ${{matrix.goversion}}
2323
cache-dependency-path: |
24-
**/go.sum
24+
sdk/go.sum
2525
- name: Install pulumictl
2626
uses: jaxxstorm/[email protected]
2727
with:

.github/workflows/update-upstream-provider.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
with:
4747
go-version: ${{matrix.goversion}}
4848
cache-dependency-path: |
49-
**/go.sum
49+
sdk/go.sum
5050
- name: Install pulumictl
5151
uses: jaxxstorm/[email protected]
5252
with:

0 commit comments

Comments
 (0)