Update actions/checkout and actions/cache to the latest tags #16
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: Haskell CI | |
on: | |
push: | |
branches: [develop, main, master] | |
pull_request: | |
branches: [develop, main, master] | |
workflow_dispatch: # For manual triggering | |
schedule: | |
- cron: "3 14 15 * *" # 14:03 on the 15th of every month (UTC) | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ghc: ['8.8.4', '8.10.7', '9.0.2', '9.2.8', '9.4.8', '9.6.4', '9.8.2'] | |
fail-fast: false | |
name: Build with GHC ${{ matrix.ghc }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cache | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-cabal | |
with: | |
path: ~/.cabal | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Haskell setup | |
uses: haskell-actions/setup@main | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
- name: Install dependencies | |
run: | | |
cabal update | |
cabal build --enable-tests --enable-benchmarks -f werror --only-dependencies | |
- name: Build | |
run: | | |
cabal build --enable-tests --enable-benchmarks -f werror all | |
- name: Run tests | |
run: cabal test all |