Skip to content

Commit 2ccc52e

Browse files
twz123github-actions[bot]
authored andcommitted
Remove the caching of the Go modules cache
It only provides an approximate 20-second speed boost, while eating up a couple of 100MB per GitHub cache. We can add it back later on if we think it's really worth it. Signed-off-by: Tom Wieczorek <[email protected]> (cherry picked from commit 87336f0)
1 parent 75fb359 commit 2ccc52e

File tree

3 files changed

+0
-35
lines changed

3 files changed

+0
-35
lines changed

.github/workflows/build-k0s.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,6 @@ jobs:
8484
touch -t "$(TZ=UTC+24 date +%Y%m%d%H%M.%S)" build/cache/_cache_sentinel
8585
find build/cache/go/build -type f \( -name '*-a' -o -name '*-d' \) -exec touch -r build/cache/_cache_sentinel {} +
8686
87-
- name: "Cache :: GOMODCACHE"
88-
uses: actions/cache@v4
89-
with:
90-
key: build-k0s-gomodcache-${{ hashFiles('go.sum') }}
91-
path: build/cache/go/mod
92-
enableCrossOsArchive: true
93-
9487
- name: "Build :: k0s"
9588
run: |
9689
make bindata

.github/workflows/go.yml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,6 @@ jobs:
218218
path: |
219219
build/cache/go/build
220220
221-
- name: Cache GOMODCACHE
222-
uses: actions/cache@v4
223-
with:
224-
key: unittests-k0s-gomodcache-${{ hashFiles('go.sum') }}
225-
path: build/cache/go/mod
226-
enableCrossOsArchive: true
227-
228221
- name: Run unit tests
229222
env:
230223
CACHE_HIT_GOCACHE: "${{ steps.cache-gocache.outputs.cache-hit }}"
@@ -347,13 +340,6 @@ jobs:
347340
touch -t "$(TZ=UTC+24 date +%Y%m%d%H%M.%S)" build/cache/_cache_sentinel
348341
find build/cache/go/build -type f \( -name '*-a' -o -name '*-d' \) -exec touch -r build/cache/_cache_sentinel {} +
349342
350-
- name: Cache GOMODCACHE
351-
uses: actions/cache@v4
352-
with:
353-
key: ${{ runner.os }}-smoketest-arm-gomodcache-arm-${{ hashFiles('go.sum') }}
354-
path: |
355-
build/cache/go/mod
356-
357343
- name: Build
358344
run: |
359345
make bindata

.github/workflows/lint.yaml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,6 @@ jobs:
7979
build/cache/go/build
8080
build/cache/golangci-lint
8181
82-
- name: "Cache :: GOMODCACHE"
83-
uses: actions/cache/restore@v4
84-
with:
85-
key: build-k0s-gomodcache-${{ hashFiles('go.sum') }}
86-
path: build/cache/go/mod
87-
enableCrossOsArchive: true
88-
8982
- name: Run linter
9083
env:
9184
CACHE_HIT_GOLANGCI: "${{ steps.cache-golangci.outputs.cache-hit }}"
@@ -121,13 +114,6 @@ jobs:
121114
path: |
122115
build/cache/go/build
123116
124-
- name: "Cache :: GOMODCACHE"
125-
uses: actions/cache/restore@v4
126-
with:
127-
key: build-k0s-gomodcache-${{ hashFiles('go.sum') }}
128-
path: build/cache/go/mod
129-
enableCrossOsArchive: true
130-
131117
- name: Check go.mod/go.sum to be consistent
132118
run: make --always-make go.sum && git diff --exit-code
133119

0 commit comments

Comments
 (0)