Skip to content

CI: switch to haskell-actions/setup@v2, add new LTS and GHC #97

CI: switch to haskell-actions/setup@v2, add new LTS and GHC

CI: switch to haskell-actions/setup@v2, add new LTS and GHC #97

Workflow file for this run

name: CI
on:
- push
- pull_request
jobs:
nix-build:
name: Nix build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v16
- name: Build dependencies
run: nix develop --command ghc --version
- name: Build PKGNAME
run: nix build -L
- name: Build PKGNAME shell
run: nix build -L '.#devShells.x86_64-linux.default'
stack-build:
name: Stack ${{ matrix.resolver }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
resolver: [ nightly, lts-22, lts-21, lts-20, lts-19, lts-18, lts-17, lts-16, lts-15, lts-14 ]
os: [ macos-latest, ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: haskell-actions/setup@v2
with:
enable-stack: true
## For some reason, stack caching seems to be very brittle, and cause a lot of build failures.
## I haven't investigated very thoroughly what to best do about this, but for now, I'm just not caching stack builds.
- run: stack init --resolver ${{ matrix.resolver }}
- run: stack build --resolver ${{ matrix.resolver }} --only-dependencies
- run: stack build --resolver ${{ matrix.resolver }}
- run: stack build --resolver ${{ matrix.resolver }} --haddock --test --bench --no-run-benchmarks
cabal-build:
name: Cabal with GHC ${{ matrix.ghc }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ghc: [ '8.6', '8.8', '8.10', '9.0', '9.2', '9.4', '9.6' ]
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
- uses: actions/cache@v2
with:
path: |
~/.cabal
dist-newstyle
key: cabal-cache-${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal') }}
- run: cabal new-build --only-dependencies
- run: cabal new-build
- run: cabal new-test --test-show-details=direct