Update more files #3
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
# The file was created by Hexirp based on [1]. [1] is created by GitHub Inc. and many contributors. [1] is The MIT License. | |
# | |
# [1]: https://github.com/haskell-actions/setup/blob/dd344bc1cec854a369df8814ce17ef337d6e6170/README.md | |
name: build | |
on: | |
push: | |
jobs: | |
build: | |
name: GHC ${{ matrix.ghc-version }} | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
ghc-version: | |
- '9.4.8' | |
- '9.2.8' | |
- '9.0.2' | |
- '8.10.7' | |
- '8.8.4' | |
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 }} | |
cabal-version: 'latest' | |
cabal-update: true | |
- name: configure the build | |
run: | | |
cabal configure --enable-tests --enable-benchmarks --disable-documentation | |
cabal build all --dry-run | |
- name: restore cached dependencies | |
uses: actions/cache/restore@v4 | |
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 all --only-dependencies | |
- name: save cached dependencies | |
uses: actions/cache/save@v4 | |
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 all | |
- name: run tests | |
run: cabal test all | |
- name: check cabal file | |
run: cabal check | |
- name: build documentation | |
run: cabal haddock all |