Merge pull request #11 from andreasabel/ghc-9.8 #13
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: | |
push: | |
branches: | |
- master | |
- ci-* | |
pull_request: | |
branches: | |
- master | |
- ci-* | |
jobs: | |
stack: | |
name: Stack GHC ${{ matrix.plan.ghc }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
plan: | |
- ghc: '9.8.2' | |
resolver: 'nightly-2024-03-08' | |
allow-fail: false | |
flags: '' | |
- ghc: '9.6.4' | |
resolver: 'lts-22.12' | |
- ghc: '9.4.8' | |
resolver: 'lts-21.25' | |
- ghc: '9.2.8' | |
resolver: 'lts-20.26' | |
- ghc: '9.0.2' | |
resolver: 'lts-19.33' | |
- ghc: '8.10.7' | |
resolver: 'lts-18.28' | |
- ghc: '8.8.4' | |
resolver: 'lts-16.31' | |
- ghc: '8.6.5' | |
resolver: 'lts-14.27' | |
- ghc: '8.4.4' | |
resolver: 'lts-12.26' | |
- ghc: '8.2.2' | |
resolver: 'lts-11.22' | |
# Stack 2.15 dropped support for GHC 8.0 and lower | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.plan.allow-fail == true }} | |
env: | |
STACK: stack --no-terminal --system-ghc --resolver ${{ matrix.plan.resolver }} | |
FLAGS: ${{ matrix.plan.flags }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: haskell-actions/setup@v2 | |
id: cabal-setup-haskell | |
with: | |
ghc-version: ${{ matrix.plan.ghc }} | |
enable-stack: true | |
- name: Get stack version | |
run: | | |
STACK_VERSION=$(stack --numeric-version) | |
echo "STACK_VERSION=${STACK_VERSION}" >> "${GITHUB_ENV}" | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.stack | |
key: ${{ runner.os }}-stack-${{ env.STACK_VERSION }}-ghc-${{ matrix.plan.ghc }}-resolver-${{ matrix.plan.resolver }} | |
- name: Configure | |
run: | | |
set -ex | |
echo "resolver: ${{ matrix.plan.resolver }}" > stack.yaml | |
rm -f stack.yaml.lock | |
$STACK clean | |
- name: Install dependencies | |
run: $STACK test --bench --only-dependencies $FLAGS | |
- name: Build | |
run: $STACK build --bench --haddock --no-haddock-deps $FLAGS | |
- name: Test | |
run: $STACK -j 1 test --bench --no-run-benchmarks --haddock --no-haddock-deps $FLAGS | |
cabal: | |
name: Cabal GHC ${{ matrix.plan.ghc }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
plan: | |
- ghc: '9.8' | |
allow-fail: true | |
- ghc: '9.6' | |
- ghc: '9.4' | |
- ghc: '9.2' | |
- ghc: '9.0' | |
- ghc: '8.10' | |
- ghc: '8.8' | |
- ghc: '8.6' | |
- ghc: '8.4' | |
- ghc: '8.2' | |
- ghc: '8.0' | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.plan.allow-fail == true }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: haskell-actions/setup@v2 | |
id: cabal-setup-haskell | |
with: | |
ghc-version: ${{ matrix.plan.ghc }} | |
cabal-update: true | |
- name: Configure and freeze | |
run: | | |
set -ex | |
rm -f cabal.project.freeze | |
cabal v2-configure --enable-tests --enable-benchmarks --test-show-details streaming | |
cabal v2-freeze | |
test -f cabal.project.freeze | |
- uses: actions/cache@v4 | |
env: | |
key: ${{ runner.os }}-cabal-${{ steps.cabal-setup-haskell.outputs.cabal-version }}-ghc-${{ steps.cabal-setup-haskell.outputs.ghc-version }} | |
with: | |
path: ${{ steps.cabal-setup-haskell.outputs.cabal-store }} | |
key: ${{ env.key }}-freeze-${{ hashFiles('cabal.project.freeze') }} | |
restore-keys: ${{ env.key }}- | |
- name: Install dependencies | |
run: cabal v2-build --only-dependencies all | |
- name: Build | |
run: cabal v2-build all | |
- name: Haddock | |
run: cabal v2-haddock all | |
continue-on-error: true | |
- name: Test | |
run: cabal v2-test --jobs=1 all |