53 lines
1.6 KiB
YAML
53 lines
1.6 KiB
YAML
name: Haskell CI
|
|
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
name: ghc ${{ matrix.ghc }}
|
|
runs-on: ubuntu-16.04
|
|
strategy:
|
|
matrix:
|
|
ghc: ["8.2.2", "8.4.4", "8.6.5", "8.8.3", "8.10.1", "9.0.1"]
|
|
cabal: ["latest"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
|
|
|
|
- uses: haskell/actions/setup@v1.1.8
|
|
name: Setup Haskell
|
|
with:
|
|
ghc-version: ${{ matrix.ghc }}
|
|
cabal-version: ${{ matrix.cabal }}
|
|
|
|
- uses: actions/cache@v1
|
|
name: Cache ~/.cabal/packages
|
|
with:
|
|
path: ~/.cabal/packages
|
|
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-packages
|
|
- uses: actions/cache@v1
|
|
name: Cache ~/.cabal/store
|
|
with:
|
|
path: ~/.cabal/store
|
|
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-store
|
|
- uses: actions/cache@v1
|
|
name: Cache dist-newstyle
|
|
with:
|
|
path: dist-newstyle
|
|
key: ${{ runner.os }}-${{ matrix.ghc }}-fused-effects-exceptions-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
|