Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 14, 05:15 UTC
ci: Cache the GOCACHE directory to speed up builds and tests (#3273)
* ci: Let's see if caching GOCACHE helps... * ci: Use GOCACHE env instead (fixes windows), remove build -a * ci: Hack to pull the GOCACHE env up to CI vars * ci: Change cache key (mainly to wipe cache now)
Francis Lavoie committed
Apr 17, 2020 at 13:54 UTC
6963a72a63bf2905e85be170d54371da4b3c5b8b
1 file changed
+10
-1
.github/workflows/ci.yml
+10
-1
@@ -66,6 +66,15 @@ jobs:
66
env
67
# Calculate the short SHA1 hash of the git commit
68
echo "::set-output name=short_sha::$(git rev-parse --short HEAD)"
69
+ echo "::set-output name=go_cache::$(go env GOCACHE)"
70
+
71
+ - name: Cache the build cache
72
+ uses: actions/cache@v1
73
+ with:
74
+ path: ${{ steps.vars.outputs.go_cache }}
75
+ key: ${{ runner.os }}-go-gocache-${{ hashFiles('**/go.sum') }}
76
+ restore-keys: |
77
+ ${{ runner.os }}-go-
78
79
- name: Get dependencies
80
run: |
@@ -77,7 +86,7 @@ jobs:
86
env:
87
CGO_ENABLED: 0
88
run: |
80
- go build -trimpath -a -ldflags="-w -s" -v
89
+ go build -trimpath -ldflags="-w -s" -v
90
91
- name: Publish Build Artifact
92
uses: actions/upload-artifact@v1