Add support for GHC 9.10 (#26) #115
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: CI | ||
# Trigger the workflow on push or pull request, but only for the master branch | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
concurrency: | ||
group: ${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
jobs: | ||
# TODO: Not sure how to cache this one.. cachix? | ||
nix: | ||
name: nix build | ||
runs-on: ubuntu-latest | ||
container: | ||
image: 'nixos/nix:2.3.6' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build | ||
run: | | ||
nix-build | ||
cabal: | ||
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
cabal: ["3.6"] | ||
ghc: | ||
- "8.6.5" | ||
- "8.10.7" | ||
- "9.0.2" | ||
- "9.2.8" | ||
- "9.4.8" | ||
- "9.6.4" | ||
- "9.8.2" | ||
- "9.10.1" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master' | ||
- uses: haskell-actions/setup@v2 | ||
id: setup-haskell-cabal | ||
name: Setup Haskell | ||
with: | ||
ghc-version: ${{ matrix.ghc }} | ||
cabal-version: ${{ matrix.cabal }} | ||
# This can be dropped once | ||
# https://github.com/clash-lang/clash-compiler/pull/2790 is merged. | ||
- name: Apply GHC-9.10 cabal project configuration | ||
if: matrix.ghc == "9.10.1" | ||
run: | | ||
mv cabal.ghc-9.10.project cabal.project | ||
- name: Freeze | ||
run: | | ||
cabal update | ||
cabal freeze | ||
- uses: actions/cache@v1 | ||
name: Cache ~/.cabal/store | ||
with: | ||
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} | ||
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze', 'cabal.project') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ matrix.ghc }}- | ||
- name: Build | ||
run: | | ||
cabal build all --write-ghc-environment-files=always | ||
ghc -Wall -Werror -iexample Example | ||
ghc -Wall -Werror -iexample Testing | ||
- name: Test | ||
run: | | ||
cabal test all |