Skip to content

Commit edbd88a

Browse files
committed
feat: improve go caching in CI pipeline
See actions/setup-go#515
1 parent fa88295 commit edbd88a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ defaults:
1919
run:
2020
shell: pwsh
2121

22+
env:
23+
# Fix slow Go compile and cache restore
24+
# See https://github.com/actions/setup-go/pull/515
25+
GOCACHE: D:\gocache
26+
GOMODCACHE: D:\gomodcache
27+
GOTMPDIR: D:\gotmp
28+
2229
jobs:
2330
audit:
2431
name: Audit
@@ -33,6 +40,10 @@ jobs:
3340
with:
3441
fetch-depth: 0
3542

43+
# Go requires gotmp to be present
44+
- run: mkdir D:\gotmp
45+
shell: pwsh
46+
3647
- uses: actions/setup-go@v5
3748
with:
3849
go-version: "1.24"
@@ -83,6 +94,10 @@ jobs:
8394
with:
8495
fetch-depth: 0
8596

97+
# Go requires gotmp to be present
98+
- run: mkdir D:\gotmp
99+
shell: pwsh
100+
86101
- name: Set up Go
87102
uses: actions/setup-go@v5
88103
with:

0 commit comments

Comments
 (0)