0.0.0.1 #14
Workflow file for this run
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: | |
pull_request: | |
branches: | |
- "**" | |
push: | |
branches: | |
- "main" | |
jobs: | |
build: | |
name: ghc ${{ matrix.ghc }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ghc: ["8.2", "8.4", "8.6", "8.8", "8.10", "9.0", "9.2", "9.4", "9.6", "9.8", "9.10"] | |
steps: | |
- uses: actions/checkout@v2 | |
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main' | |
- uses: haskell-actions/setup@v2 | |
name: Setup Haskell | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
- uses: actions/cache@v2 | |
name: Cache ~/.cabal/packages | |
with: | |
path: ~/.cabal/packages | |
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-packages | |
- uses: actions/cache@v2 | |
name: Cache ~/.cabal/store | |
with: | |
path: ~/.cabal/store | |
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-store | |
- uses: actions/cache@v2 | |
name: Cache dist-newstyle | |
with: | |
path: dist-newstyle | |
key: ${{ runner.os }}-${{ matrix.ghc }}-repo-dist | |
- name: Install dependencies | |
run: | | |
cabal v2-update | |
cabal v2-configure --project-file=cabal.project.ci --enable-tests --write-ghc-environment-files=always -j2 | |
cabal v2-build --project-file=cabal.project.ci --only-dependencies all | |
- name: Build & test | |
run: | | |
cabal v2-build --project-file=cabal.project.ci | |
cabal v2-run --project-file=cabal.project.ci test | |
cabal v2-haddock --project-file=cabal.project.ci | |
cabal v2-sdist --project-file=cabal.project.ci | |
cabal check |