Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 13, 18:00 UTC
ci: Fix build caching on Windows (#4811)
* ci: Fix build caching on Windows I was getting tired of Windows being slow as molasses in our CI jobs, so I went to look at our trusty source of github actions + golang information, and found a somewhat recent commit that actually fixed it. See https://github.com/mvdan/github-actions-golang/commit/4b754729baa709da219a5889c459010d4eda1888 I'll do a 2nd empty commit to re-trigger CI shortly to confirm that it actually fixes it. * Retrigger CI
Francis Lavoie committed
May 25, 2022 at 13:56 UTC
ef0aaca0d6ca3f4aece20e4d97d546e0d48d17fe
3 files changed
+22
-6
.github/workflows/ci.yml
+10
-2
@@ -78,12 +78,20 @@ jobs:
78
printf "Git version: $(git version)\n\n"
79
# Calculate the short SHA1 hash of the git commit
80
echo "::set-output name=short_sha::$(git rev-parse --short HEAD)"
81
- echo "::set-output name=go_cache::$(go env GOCACHE)"
81
82
- name: Cache the build cache
83
uses: actions/cache@v2
84
with:
86
- path: ${{ steps.vars.outputs.go_cache }}
85
+ # In order:
86
+ # * Module download cache
87
+ # * Build cache (Linux)
88
+ # * Build cache (Mac)
89
+ # * Build cache (Windows)
90
+ path: |
91
+ ~/go/pkg/mod
92
+ ~/.cache/go-build
93
+ ~/Library/Caches/go-build
94
+ ~\AppData\Local\go-build
95
key: ${{ runner.os }}-${{ matrix.go }}-go-ci-${{ hashFiles('**/go.sum') }}
96
restore-keys: |
97
${{ runner.os }}-${{ matrix.go }}-go-ci
.github/workflows/cross-build.yml
+6
-2
@@ -42,12 +42,16 @@ jobs:
42
go env
43
printf "\n\nSystem environment:\n\n"
44
env
45
- echo "::set-output name=go_cache::$(go env GOCACHE)"
45
46
- name: Cache the build cache
47
uses: actions/cache@v2
48
with:
50
- path: ${{ steps.vars.outputs.go_cache }}
49
+ # In order:
50
+ # * Module download cache
51
+ # * Build cache (Linux)
52
+ path: |
53
+ ~/go/pkg/mod
54
+ ~/.cache/go-build
55
key: cross-build-go${{ matrix.go }}-${{ matrix.goos }}-${{ hashFiles('**/go.sum') }}
56
restore-keys: |
57
cross-build-go${{ matrix.go }}-${{ matrix.goos }}
.github/workflows/release.yml
+6
-2
@@ -56,7 +56,6 @@ jobs:
56
env
57
echo "::set-output name=version_tag::${GITHUB_REF/refs\/tags\//}"
58
echo "::set-output name=short_sha::$(git rev-parse --short HEAD)"
59
- echo "::set-output name=go_cache::$(go env GOCACHE)"
59
60
# Add "pip install" CLI tools to PATH
61
echo ~/.local/bin >> $GITHUB_PATH
@@ -91,7 +90,12 @@ jobs:
90
- name: Cache the build cache
91
uses: actions/cache@v2
92
with:
94
- path: ${{ steps.vars.outputs.go_cache }}
93
+ # In order:
94
+ # * Module download cache
95
+ # * Build cache (Linux)
96
+ path: |
97
+ ~/go/pkg/mod
98
+ ~/.cache/go-build
99
key: ${{ runner.os }}-go${{ matrix.go }}-release-${{ hashFiles('**/go.sum') }}
100
restore-keys: |
101
${{ runner.os }}-go${{ matrix.go }}-release