Support ghc 9.12 #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cabal CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
ghc: ['8.0', '8.2', '8.4', '8.6', '8.8', '8.10', '9.0', '9.2', '9.4', '9.6', '9.8', '9.10', '9.12'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: haskell-actions/setup@v2 | |
id: setup | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
cabal-version: latest | |
cabal-update: true | |
- name: Restore cached dependencies | |
uses: actions/cache/restore@v4 | |
id: cache | |
env: | |
key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }} | |
with: | |
path: ${{ steps.setup.outputs.cabal-store }} | |
key: ${{ env.key }}-cabal-${{ steps.setup.outputs.cabal-version }}-sha-${{ github.sha }} | |
restore-keys: | | |
${{ env.key }}-cabal-${{ steps.setup.outputs.cabal-version }}- | |
${{ env.key }}- | |
- name: Install dependencies | |
run: cabal build --only-dependencies --enable-tests --enable-benchmarks | |
- name: Build | |
run: cabal build --enable-tests --enable-benchmarks | |
- name: Run tests | |
run: cabal test | |
- name: Cache dependencies | |
uses: actions/cache/save@v4 | |
if: always() && steps.cache.outputs.cache-hit != 'true' | |
with: | |
path: ${{ steps.setup.outputs.cabal-store }} | |
key: ${{ steps.cache.outputs.cache-primary-key }} |