Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
philderbeast committed May 20, 2024
1 parent 9b671ce commit a5811ec
Showing 1 changed file with 27 additions and 5 deletions.
32 changes: 27 additions & 5 deletions .github/workflows/cabal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,37 @@ jobs:
cabal-version: ${{ matrix.cabal }}
cabal-update: true

- uses: actions/cache@v4
name: cache ~/.cabal/store
- name: Install Dhall
run: cabal install dhall-1.42.1

- name: Configure the build
run: |
cabal configure --enable-tests --enable-benchmarks --disable-documentation
cabal build all --dry-run
- name: Restore cached dependencies
uses: actions/cache/restore@v4
id: cache
env:
key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }}
restore-keys: ${{ env.key }}-

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: cabal build all --only-dependencies

- name: Save cached dependencies
uses: actions/cache/save@v4
if: steps.cache.outputs.cache-hit != 'true'
with:
path: ~/.cabal/store
key: ${{ runner.os }}-cabal-${{ matrix.cabal }}-ghc-${{ matrix.vers.ghc }}
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ steps.cache.outputs.cache-primary-key }}

- name: build
run: |
cabal install dhall-1.42.1
GHC_VERSION=${{ matrix.vers.ghc }} STACKAGE_VERSION=${{ matrix.vers.stackage }} make -f project-files.mk
cabal build all --enable-tests
Expand Down

0 comments on commit a5811ec

Please sign in to comment.