Skip to content
Merged
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

name: CI

on:
pull_request:
on:
pull_request:
branches:
- main
push:
Expand All @@ -20,7 +20,7 @@ concurrency:
jobs:
generate-matrix:
name: "Generate matrix from cabal"
outputs:
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
runs-on: ubuntu-latest
steps:
Expand All @@ -46,21 +46,23 @@ jobs:
id: setup
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: 'latest'
cabal-version: "latest"
cabal-update: true
- name: Configure the build
run: |
cabal configure --enable-tests --disable-documentation
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 }}-
key: v1-ghc-deps-${{ env.key }}-plan-${{ hashFiles('**/dist-newstyle/cache/plan.json') }}
restore-keys: v1-ghc-deps-${{ env.key }}-

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