1
1
mirror of https://github.com/anoma/juvix.git synced 2025-01-05 22:46:08 +03:00

Cache .hie directory in CI (#2490)

We use the options in `package.yaml`.

```
         - -fhide-source-paths
         - -fwrite-ide-info -hiedir=.hie
```
If a previously available .hie directory is missing then GHC will
rebuild the whole project with reason: `[HIE file is missing]`. So we
need to cache it to take advantage of incremental builds.
This commit is contained in:
Paul Cadman 2023-11-01 13:15:53 +00:00 committed by GitHub
parent 21d5034e60
commit 7f009ce14c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,6 +118,20 @@ jobs:
cd main
make runtime
# We use the options:
# - -fhide-source-paths
# - -fwrite-ide-info -hiedir=.hie
# in package.yaml.
#
# If a previously available .hie directory is missing then GHC will rebuild the whole project.
# with reason: HIE file is missing. So we need to cache it.
- name: Cache .hie
id: cache-hie
uses: actions/cache@v3
with:
path: main/.hie
key: ${{ runner.os }}-stack-hie
- name: Stack setup
id: stack
uses: freckle/stack-action@v4
@ -252,6 +266,20 @@ jobs:
cd main
make CC=$CC LIBTOOL=$LIBTOOL runtime
# We use the options:
# - -fhide-source-paths
# - -fwrite-ide-info -hiedir=.hie
# in package.yaml.
#
# If a previously available .hie directory is missing then GHC will rebuild the whole project.
# with reason: HIE file is missing. So we need to cache it.
- name: Cache .hie
id: cache-hie
uses: actions/cache@v3
with:
path: main/.hie
key: ${{ runner.os }}-stack-hie
- name: Stack setup
id: stack
uses: freckle/stack-action@v4