Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
Add 'cabal: true' option to enable caching
Browse files Browse the repository at this point in the history
  * Support both cabal and stack

  * Copy `hashFiles` until exposed exposed in the actions/cache API

  * Saving cache as a post-script

  * Additional action inputs: `cache-paths` and `cache-keys`

  * Add `output.stack-root` in `action.yml`
  • Loading branch information
omelkonian committed Dec 22, 2020
1 parent 6744967 commit 7861316
Show file tree
Hide file tree
Showing 20 changed files with 123,788 additions and 10,260 deletions.
15 changes: 15 additions & 0 deletions setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ inputs:
stack-setup-ghc:
required: false
description: 'If specified, enable-stack must be set. Will run stack setup to install the specified GHC'
cache:
required: false
description: 'If specified, automatically caches cabal/stack-related directories.'
cache-keys:
required: false
description: 'List of caching keys, where the first is the "primary" key and the rest are "restore" keys to fall back on.'
default: 'The default primary key is `$os-$ghc$hash(cabal.project.freeze|stack.yaml.lock)-$github-sha`, and the restores keys are its prefixes.'
cache-paths:
required: false
description: 'List of directories to cache.'
default: 'For cabal: `outputs.cabal-store` and `dist-newstyle`. For stack: `outputs.stack-root`.'
outputs:
ghc-path:
description: 'The path of the ghc executable _directory_'
Expand All @@ -32,6 +43,8 @@ outputs:
description: 'The path of the stack executable _directory_'
cabal-store:
description: 'The path to the cabal store'
stack-root:
description: 'The path to the stack root'
ghc-exe:
description: 'The path of the ghc _executable_'
cabal-exe:
Expand All @@ -41,3 +54,5 @@ outputs:
runs:
using: 'node12'
main: 'dist/index.js'
post: 'dist/save-cache.js'
post-if: success()
15 changes: 15 additions & 0 deletions setup/dist/action.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7861316

Please sign in to comment.