mirror of
https://github.com/actions/cache.git
synced 2025-03-13 11:47:00 +00:00
Broke out the Golang caching examples into Linux/macOS/Windows variants
This commit is contained in:
parent
faf5a26a65
commit
9c0250e7d5
1 changed files with 28 additions and 0 deletions
28
examples.md
28
examples.md
|
@ -115,6 +115,8 @@ steps:
|
||||||
|
|
||||||
## Go - Modules
|
## Go - Modules
|
||||||
|
|
||||||
|
### Linux
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
|
@ -126,6 +128,32 @@ steps:
|
||||||
${{ runner.os }}-go-
|
${{ runner.os }}-go-
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### macOS
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/Library/Caches/go-build
|
||||||
|
~/go/pkg/mod
|
||||||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-go-
|
||||||
|
```
|
||||||
|
|
||||||
|
### Windows
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
%LocalAppData%\go-build
|
||||||
|
~/go/pkg/mod
|
||||||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-go-
|
||||||
|
```
|
||||||
|
|
||||||
## Haskell - Cabal
|
## Haskell - Cabal
|
||||||
|
|
||||||
We cache the elements of the Cabal store separately, as the entirety of `~/.cabal` can grow very large for projects with many dependencies.
|
We cache the elements of the Cabal store separately, as the entirety of `~/.cabal` can grow very large for projects with many dependencies.
|
||||||
|
|
Loading…
Add table
Reference in a new issue