Skip to content

Commit

Permalink
Create a cache action to cache HLS artifacts (#17)
Browse files Browse the repository at this point in the history
* Document `iog-full` input of `devx` action

* Create a `cache` action to cache HLS artifacts

This is used to speed up GitHub Codespaces bootstrapping
  • Loading branch information
yvan-sraka authored Apr 8, 2024
1 parent d0a90d0 commit 8e9d370
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ This GitHub Action let you run commands into [the slightly opinionated `devx` sh
| `compiler-nix-name` | Specifies the GHC version to use. The version should be provided without dots, for example, GHC 8.10.7 should be written as `ghc8107`. | `ghc961` |
| `minimal` | A Boolean input to decide whether to include `hlint` and HLS in the build. Set to `false` to include these tools. | `true` |
| `iog` | Another Boolean input that, when set to `true`, will include `libsodum`, `libsecp256k1`, and `libblst` in the build. | `false` |
| `iog-full` | Same than `-iog` bit also include `R` and `postgresql` | `false` |
| `iog-full` | Same than `iog` bit also include `R` and `postgresql` | `false` |

Here's how you might utilize this action in your workflow:

Expand Down
16 changes: 16 additions & 0 deletions cache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 'Cache HLS artifacts'
description: 'This is used to speed up GitHub Codespaces bootstrapping'
inputs:
ghc_version:
description: GHC version used (cache is per-commit and per-GHC version)
type: string

runs:
using: "composite"
steps:
- name: Cache build artifacts (used to speed up GitHub Codespaces bootstrapping)
uses: actions/upload-artifact@v4
with:
name: cache-${{ github.event.pull_request.head.sha }}-${{ inputs.ghc_version }}
path: |
./dist-newstyle

0 comments on commit 8e9d370

Please sign in to comment.