Skip to content

chore: test more ghc versions #92

chore: test more ghc versions

chore: test more ghc versions #92

Workflow file for this run

name: Haskell CI
on:
push:
workflow_dispatch:
permissions:
contents: read
jobs:
fourmolu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: haskell-actions/run-fourmolu@v11
with:
version: "0.17.0.0"
build:
name: GHC ${{ matrix.ghc-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
ghc-version: ['9.14', '9.12', '9.10', '9.8', '9.6', '9.4', '9.2', '9.0']
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up GHC ${{ matrix.ghc-version }}
uses: haskell-actions/setup@v2
id: setup
with:
ghc-version: ${{ matrix.ghc-version }}
cabal-version: "3.16.0.0"
- name: Show toolchain versions
shell: bash
run: |
ghc --numeric-version
cabal --numeric-version
- name: Check cabal file
run: cabal check
- name: Update cabal package index
run: cabal update
- name: Configure the build
run: |
cabal configure --enable-tests --enable-benchmarks --disable-documentation
cabal build --dry-run
- name: Restore cabal store cache
uses: actions/cache/restore@v4
id: cache-restore
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ runner.os }}-ghc-${{ matrix.ghc-version }}-cabal-${{ hashFiles('**/plan.json') }}
restore-keys: |
${{ runner.os }}-ghc-${{ matrix.ghc-version }}-cabal-
- name: Build dependencies
run: cabal build --only-dependencies
- name: Save cabal store cache
uses: actions/cache/save@v4
if: steps.cache-restore.outputs.cache-hit != 'true'
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
- name: Build the package
run: cabal build all
- name: Run tests
run: cabal test all
- name: Build documentation
run: cabal haddock all --disable-documentation