fused-effects-exceptions/.github/workflows/ci.yml

59 lines
1.7 KiB
YAML
Raw Normal View History

2019-10-29 16:41:52 +00:00
name: Haskell CI
on:
pull_request:
branches:
- "**"
push:
branches:
- "master"
2019-10-29 16:41:52 +00:00
jobs:
build:
name: ghc ${{ matrix.ghc }}
runs-on: ubuntu-16.04
strategy:
matrix:
2021-04-07 22:29:22 +00:00
ghc: ["8.2.2", "8.4.4", "8.6.5", "8.8.3", "8.10.1", "9.0.1"]
2020-07-13 15:11:33 +00:00
cabal: ["latest"]
2019-10-29 16:41:52 +00:00
steps:
2020-07-13 15:15:11 +00:00
- uses: actions/checkout@v2
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
2019-10-29 16:41:52 +00:00
2021-04-07 22:29:22 +00:00
- uses: haskell/actions/setup@v1.1.8
2019-10-29 16:41:52 +00:00
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
2020-07-13 15:15:11 +00:00
- 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
2019-10-29 16:41:52 +00:00
- name: Install dependencies
run: |
cabal v2-update
2020-07-13 15:15:11 +00:00
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
2019-10-29 16:41:52 +00:00
- name: Build & test
run: |
2020-07-13 15:15:11 +00:00
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
2019-10-29 16:41:52 +00:00
cabal check