Skip to content

Move from GHC 9.4.7 to 9.4.8 in CI #51

Move from GHC 9.4.7 to 9.4.8 in CI

Move from GHC 9.4.7 to 9.4.8 in CI #51

Workflow file for this run

# SPDX-FileCopyrightText: 2022 Severen Redwood <[email protected]>
# SPDX-License-Identifier: CC0-1.0
# Adapted from https://markkarpov.com/post/github-actions-for-haskell-ci.html,
# and then later the 'Model cabal workflow with caching' example from
# haskell-actions/setup.
name: CI
on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ghc-version: ["9.4.8", "9.6.3"]
steps:
- uses: actions/checkout@v4
- name: Set up GHC ${{ matrix.ghc-version }}
uses: haskell-actions/setup@v2
id: setup
with:
ghc-version: ${{ matrix.ghc-version }}
- name: Configure the build
run: |
cabal configure --enable-tests --enable-benchmarks --disable-documentation
cabal build --dry-run
- name: Restore cached dependencies
uses: actions/cache/restore@v3
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 --only-dependencies
# Cache dependencies here so that we do not have to rebuild them should
# the subsequent steps fail.
- name: Cache dependencies
uses: actions/cache/save@v3
# If we had an exact cache hit, trying to save the cache would error
# because of key clash.
if: steps.cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ steps.cache.outputs.cache-primary-key }}
- name: Build
run: cabal build
- name: Run tests
run: cabal test