From ea5981db97a19600eb6067502417b319723fe2ea Mon Sep 17 00:00:00 2001 From: Malo Bourgon Date: Mon, 3 Feb 2020 15:55:17 -0800 Subject: [PATCH 1/2] Add example for Haskell Stack --- README.md | 1 + examples.md | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/README.md b/README.md index a0180c3..98be465 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,7 @@ See [Examples](examples.md) for a list of `actions/cache` implementations for us - [Elixir - Mix](./examples.md#elixir---mix) - [Go - Modules](./examples.md#go---modules) - [Haskell - Cabal](./examples.md#haskell---cabal) +- [Haskell - Stack](./examples.md#haskell---stack) - [Java - Gradle](./examples.md#java---gradle) - [Java - Maven](./examples.md#java---maven) - [Node - npm](./examples.md#node---npm) diff --git a/examples.md b/examples.md index 15da4e3..17b153a 100644 --- a/examples.md +++ b/examples.md @@ -6,6 +6,7 @@ - [Elixir - Mix](#elixir---mix) - [Go - Modules](#go---modules) - [Haskell - Cabal](#haskell---cabal) + - [Haskell - Stack](#haskell---stack) - [Java - Gradle](#java---gradle) - [Java - Maven](#java---maven) - [Node - npm](#node---npm) @@ -130,6 +131,25 @@ We cache the elements of the Cabal store separately, as the entirety of `~/.caba key: ${{ runner.os }}-${{ matrix.ghc }} ``` +## Haskell - Stack + +```yaml +- uses: actions/cache@v2 + name: Cache ~/.stack + with: + path: ~/.stack + key: ${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }} + restore-keys: | + ${{ runner.os }}-stack-global- +- uses: actions/cache@v2 + name: Cache .stack-work + with: + path: .stack-work + key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}-${{ hashFiles('**/*.hs') }} + restore-keys: | + ${{ runner.os }}-stack-work- +``` + ## Java - Gradle ```yaml From 669e7536d9d7f814487469a7bb832ed71dd3b601 Mon Sep 17 00:00:00 2001 From: Vipul Date: Tue, 22 Feb 2022 12:17:37 +0530 Subject: [PATCH 2/2] Revert "Add example for Haskell Stack" --- README.md | 1 - examples.md | 20 -------------------- 2 files changed, 21 deletions(-) diff --git a/README.md b/README.md index 98be465..a0180c3 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,6 @@ See [Examples](examples.md) for a list of `actions/cache` implementations for us - [Elixir - Mix](./examples.md#elixir---mix) - [Go - Modules](./examples.md#go---modules) - [Haskell - Cabal](./examples.md#haskell---cabal) -- [Haskell - Stack](./examples.md#haskell---stack) - [Java - Gradle](./examples.md#java---gradle) - [Java - Maven](./examples.md#java---maven) - [Node - npm](./examples.md#node---npm) diff --git a/examples.md b/examples.md index 17b153a..15da4e3 100644 --- a/examples.md +++ b/examples.md @@ -6,7 +6,6 @@ - [Elixir - Mix](#elixir---mix) - [Go - Modules](#go---modules) - [Haskell - Cabal](#haskell---cabal) - - [Haskell - Stack](#haskell---stack) - [Java - Gradle](#java---gradle) - [Java - Maven](#java---maven) - [Node - npm](#node---npm) @@ -131,25 +130,6 @@ We cache the elements of the Cabal store separately, as the entirety of `~/.caba key: ${{ runner.os }}-${{ matrix.ghc }} ``` -## Haskell - Stack - -```yaml -- uses: actions/cache@v2 - name: Cache ~/.stack - with: - path: ~/.stack - key: ${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }} - restore-keys: | - ${{ runner.os }}-stack-global- -- uses: actions/cache@v2 - name: Cache .stack-work - with: - path: .stack-work - key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}-${{ hashFiles('**/*.hs') }} - restore-keys: | - ${{ runner.os }}-stack-work- -``` - ## Java - Gradle ```yaml