Skip to content

Contraint base

Contraint base #7

Workflow file for this run

name: Test on multiple GHC versions
on:
pull_request:
push:
branches:
- master
jobs:
generate-matrix:
name: "Generate matrix from cabal"
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
runs-on: ubuntu-latest
steps:
- name: Extract the tested GHC versions
id: set-matrix
uses: kleidukos/[email protected]
with:
cabal-file: polytyped.cabal
ubuntu-version: "latest"
version: 0.1.7.1
tests:
name: ${{ matrix.ghc }} on ${{ matrix.os }}
needs: generate-matrix
runs-on: ${{ matrix.os }}
strategy:
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
id: setup-haskell-cabal
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: 'latest'
- name: Configure
run: |
cabal configure --enable-tests --test-show-details=direct
- name: Cache
uses: actions/cache@v4
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}/dist-newstyle
key: ${{ runner.os }}-ghc-${{ matrix.ghc }}-cabal-${{ hashFiles('**/plan.json') }}
restore-keys: ${{ runner.os }}-ghc-${{ matrix.ghc }}-
- name: Build
run: |
cabal build all
- name: Test
run: |
cabal test all
- name: Save cache
uses: actions/cache/save@v4
with:
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}/dist-newstyle
key: ${{ runner.os }}-ghc-${{ matrix.ghc }}-cabal-${{ hashFiles('./.plan.json') }}