Use more standard haskell-actions setup (rather than neil) #242
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
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 3 * * 6' # 3am Saturday | |
workflow_dispatch: | |
jobs: | |
build: | |
name: ghc ${{ matrix.ghc }} ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
ghc: | |
- "8.6.5" | |
- "8.8.3" | |
- "8.10.7" | |
- "9.0.2" | |
- "9.2.4" | |
- "9.4.7" | |
- "9.6.3" | |
- "9.8.1" | |
- "9.10.1" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: haskell-actions/[email protected] | |
id: setup-haskell-cabal | |
name: Setup Haskell | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
cabal-version: ${{ matrix.cabal }} | |
- name: Configure | |
run: | | |
# At some point we probably want to --enable-benchmarks, but | |
# the Bench/Main.hs has bitrotted. | |
cabal configure --enable-tests --enable-documentation --test-show-details=direct --write-ghc-environment-files=always | |
- name: Freeze | |
run: | | |
cabal freeze | |
- uses: actions/cache@v3 | |
name: Cache ~/.cabal/3tore | |
with: | |
path: ${{ steps.setup-haskell.outputs.cabal-store }} | |
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} | |
- name: Install dependencies | |
run: | | |
cabal build all --only-dependencies | |
- name: Build | |
run: | | |
cabal build all | |
- name: Test | |
run: | | |
cabal test all | |
# - name: Documentation | |
# run: | | |
# cabal haddock all |