Skip to content

lsp-types-1.6.0.1: update Haskell CI to latest GHCs; just for ubuntu #727

lsp-types-1.6.0.1: update Haskell CI to latest GHCs; just for ubuntu

lsp-types-1.6.0.1: update Haskell CI to latest GHCs; just for ubuntu #727

Workflow file for this run

name: Haskell CI
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ghc: ['9.8', '9.6', '9.4', '9.2', '9.0.2', '8.10.7', '8.8.4', '8.6.5']
os: [ubuntu-latest]
ospath: [true, false]
exclude:
# newer 'entropy' doesn't work with old 'unix', and it doesn't have a correct version bound.
- ospath: true
ghc: '8.6.5'
# "cabal build" always timeout
- ospath: true
ghc: '8.8.4'
os: windows-latest
include:
- os: macOS-latest
ghc: '9.8'
ospath: true
- os: macOS-latest
ghc: '9.8'
ospath: false
- os: windows-latest
ghc: '9.8'
ospath: true
- os: windows-latest
ghc: '9.8'
ospath: false
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
id: setup
with:
ghc-version: ${{ matrix.ghc }}
cabal-update: true
- name: Cabal cache
uses: actions/cache@v3
env:
cache-name: cabal
with:
path: ~/.cabal
key: ${{ runner.os }}-build-${{ env.cache-name }}-ghc-${{ steps.setup.outputs.ghc-version}}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-ghc-${{ steps.setup.outputs.ghc-version}}-
- name: Stack cache
uses: actions/cache@v3
env:
cache-name: stack
with:
path: ~/.stack
key: ${{ runner.os }}-build-${{ env.cache-name }}-ghc-${{ steps.setup.outputs.ghc-version}}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/stack.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-ghc-${{ steps.setup.outputs.ghc-version}}-
- name: Cabal configure
shell: bash
run: |
if [ ${{ matrix.ospath }} = "true" ]; then
cabal configure --flags="force-ospath"
fi
- name: Build using cabal
run: cabal build all
- name: Test
run: cabal test all
# stack build uses stack.yaml which actually uses ghc-8.10.7
- if: matrix.ghc == '8.10.7' && runner.os == 'Linux'
name: Build using stack
run: stack build
haskell_post_job:
runs-on: ubuntu-latest
needs: [ build ]
steps:
- run: |
echo "jobs info: ${{ toJSON(needs) }}"
- if: contains(needs.*.result, 'failure')
run: exit 1
- if: contains(needs.*.result, 'cancelled') && needs.pre_job.outputs.should_skip != 'true'
run: exit 1