From d1991bb4c552e5ea8208312537c8b93c5a0886fb Mon Sep 17 00:00:00 2001 From: Flavio Corpa Date: Fri, 10 Jan 2020 23:07:52 +0100 Subject: [PATCH] Add Haskell - Cabal example (#148) * Add Haskell - Cabal example * Add link in main readme.md --- README.md | 1 + examples.md | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/README.md b/README.md index 8772244..510dbaf 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,7 @@ See [Examples](examples.md) for a list of `actions/cache` implementations for us - [C# - Nuget](./examples.md#c---nuget) - [Elixir - Mix](./examples.md#elixir---mix) - [Go - Modules](./examples.md#go---modules) +- [Haskell - Cabal](./examples.md#haskell---cabal) - [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 948179c..6b16320 100644 --- a/examples.md +++ b/examples.md @@ -3,6 +3,7 @@ - [C# - NuGet](#c---nuget) - [Elixir - Mix](#elixir---mix) - [Go - Modules](#go---modules) +- [Haskell - Cabal](#haskell---cabal) - [Java - Gradle](#java---gradle) - [Java - Maven](#java---maven) - [Node - npm](#node---npm) @@ -62,6 +63,28 @@ steps: ${{ runner.os }}-go- ``` +## 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. + +```yaml +- uses: actions/cache@v1 + name: Cache ~/.cabal/packages + with: + path: ~/.cabal/packages + key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-packages +- uses: actions/cache@v1 + name: Cache ~/.cabal/store + with: + path: ~/.cabal/store + key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-store +- uses: actions/cache@v1 + name: Cache dist-newstyle + with: + path: dist-newstyle + key: ${{ runner.os }}-${{ matrix.ghc }}-dist-newstyle +``` + ## Java - Gradle ```yaml