Skip to content

Haskell CI

Haskell CI #75

Workflow file for this run

name: Haskell CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: ghc-${{ matrix.ghc }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ghc:
- '9.10'
- '9.8'
- '9.6'
- '9.4'
- '9.2'
- '9.0'
- '8.10'
- '8.8'
- '8.6'
steps:
- uses: actions/checkout@v3
- uses: haskell/actions/setup@v2
id: setup
with:
ghc-version: ${{ matrix.ghc }}
- name: Restore cache
uses: actions/cache/restore@v3
id: cache
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ runner.os }}-build-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal', '/.github/workflows/*.yml') }}
restore-keys: |
${{ runner.os }}-build-${{ matrix.ghc }}-
- name: Install dependencies
run: |
cabal build --project-file=cabal_no_viewer.project --only-dependencies --enable-tests --enable-benchmarks all
- name: Save cache
uses: actions/cache/save@v3
if: ${{ steps.cache.outputs.cache-primary-key != steps.cache.outputs.cache-matched-key }}
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ steps.cache.outputs.cache-primary-key }}
- name: Build
run: cabal build --project-file=cabal_no_viewer.project --enable-tests --enable-benchmarks all
- name: Run tests
run: cabal test --project-file=cabal_no_viewer.project all