Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit afc669e

Browse files
authored
Merge pull request #819 from mpilgrem/haskell-stack-example
Adapt existing Haskell Stack example for Windows
2 parents a0efc56 + d25c51b commit afc669e

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

examples.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,8 @@ We cache the elements of the Cabal store separately, as the entirety of `~/.caba
223223

224224
## Haskell - Stack
225225

226+
### Linux or macOS
227+
226228
```yaml
227229
- uses: actions/cache@v3
228230
name: Cache ~/.stack
@@ -240,6 +242,27 @@ We cache the elements of the Cabal store separately, as the entirety of `~/.caba
240242
${{ runner.os }}-stack-work-
241243
```
242244

245+
### Windows
246+
247+
```yaml
248+
- uses: actions/cache@v3
249+
name: Cache %APPDATA%\stack %LOCALAPPDATA%\Programs\stack
250+
with:
251+
path: |
252+
~\AppData\Roaming\stack
253+
~\AppData\Local\Programs\stack
254+
key: ${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}
255+
restore-keys: |
256+
${{ runner.os }}-stack-global-
257+
- uses: actions/cache@v3
258+
name: Cache .stack-work
259+
with:
260+
path: .stack-work
261+
key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}-${{ hashFiles('**/*.hs') }}
262+
restore-keys: |
263+
${{ runner.os }}-stack-work-
264+
```
265+
243266
## Java - Gradle
244267

245268
>Note: Ensure no Gradle daemons are running anymore when your workflow completes. Creating the cache package might fail due to locks being held by Gradle. Refer to the [Gradle Daemon documentation](https://docs.gradle.org/current/userguide/gradle_daemon.html) on how to disable or stop the Gradle Daemons.

0 commit comments

Comments
 (0)