.github/workflows: tidy go caches before uploading
Delete files from `$(go env GOCACHE)` and `$(go env GOMODCACHE)/cache` that have not been modified in >= 90 minutes as these files are not resulting in cache hits on the current branch. These deltions have resulted in the uploaded / downloaded compressed cache size to go down to ~1/3 of the original size in some instances with the extracted size being ~1/4 of the original extraced size. Updates https://github.com/tailscale/tailscale/issues/15238 Signed-off-by: Mario Minardi <mario@tailscale.com>
This commit is contained in:
parent
5177fd2ccb
commit
5ce8cd5fec
26
.github/workflows/test.yml
vendored
26
.github/workflows/test.yml
vendored
@ -139,7 +139,11 @@ jobs:
|
|||||||
echo "Build/test created untracked files in the repo (file names above)."
|
echo "Build/test created untracked files in the repo (file names above)."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
- name: Tidy cache
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
find $(go env GOCACHE) -type f -mmin +90 -delete
|
||||||
|
find $(go env GOMODCACHE)/cache -type f -mmin +90 -delete
|
||||||
windows:
|
windows:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
steps:
|
steps:
|
||||||
@ -176,6 +180,11 @@ jobs:
|
|||||||
# Somewhere in the layers (powershell?)
|
# Somewhere in the layers (powershell?)
|
||||||
# the equals signs cause great confusion.
|
# the equals signs cause great confusion.
|
||||||
run: go test ./... -bench . -benchtime 1x -run "^$"
|
run: go test ./... -bench . -benchtime 1x -run "^$"
|
||||||
|
- name: Tidy cache
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
find $(go env GOCACHE) -type f -mmin +90 -delete
|
||||||
|
find $(go env GOMODCACHE)/cache -type f -mmin +90 -delete
|
||||||
|
|
||||||
privileged:
|
privileged:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
@ -283,6 +292,11 @@ jobs:
|
|||||||
GOOS: ${{ matrix.goos }}
|
GOOS: ${{ matrix.goos }}
|
||||||
GOARCH: ${{ matrix.goarch }}
|
GOARCH: ${{ matrix.goarch }}
|
||||||
CGO_ENABLED: "0"
|
CGO_ENABLED: "0"
|
||||||
|
- name: Tidy cache
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
find $(go env GOCACHE) -type f -mmin +90 -delete
|
||||||
|
find $(go env GOMODCACHE)/cache -type f -mmin +90 -delete
|
||||||
|
|
||||||
ios: # similar to cross above, but iOS can't build most of the repo. So, just
|
ios: # similar to cross above, but iOS can't build most of the repo. So, just
|
||||||
#make it build a few smoke packages.
|
#make it build a few smoke packages.
|
||||||
@ -342,6 +356,11 @@ jobs:
|
|||||||
GOARCH: ${{ matrix.goarch }}
|
GOARCH: ${{ matrix.goarch }}
|
||||||
GOARM: ${{ matrix.goarm }}
|
GOARM: ${{ matrix.goarm }}
|
||||||
CGO_ENABLED: "0"
|
CGO_ENABLED: "0"
|
||||||
|
- name: Tidy cache
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
find $(go env GOCACHE) -type f -mmin +90 -delete
|
||||||
|
find $(go env GOMODCACHE)/cache -type f -mmin +90 -delete
|
||||||
|
|
||||||
android:
|
android:
|
||||||
# similar to cross above, but android fails to build a few pieces of the
|
# similar to cross above, but android fails to build a few pieces of the
|
||||||
@ -394,6 +413,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
./tool/go run ./cmd/tsconnect --fast-compression build
|
./tool/go run ./cmd/tsconnect --fast-compression build
|
||||||
./tool/go run ./cmd/tsconnect --fast-compression build-pkg
|
./tool/go run ./cmd/tsconnect --fast-compression build-pkg
|
||||||
|
- name: Tidy cache
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
find $(go env GOCACHE) -type f -mmin +90 -delete
|
||||||
|
find $(go env GOMODCACHE)/cache -type f -mmin +90 -delete
|
||||||
|
|
||||||
tailscale_go: # Subset of tests that depend on our custom Go toolchain.
|
tailscale_go: # Subset of tests that depend on our custom Go toolchain.
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
Loading…
Reference in New Issue
Block a user