X-Git-Url: https://git.lukelau.me/?a=blobdiff_plain;f=.github%2Fworkflows%2Fhaskell.yml;h=9822af7bb3405772ba37414e81131c51f9bb3659;hb=ef676138a1f9dc64bc6e9724a772d9fd592b3abc;hp=e4cdf76e2a374e073f0bf41cd65a654514df1c8f;hpb=50a0c87ace126635ec152ad05fdce698a8dc0310;p=lsp-test.git diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index e4cdf76..9822af7 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -1,32 +1,35 @@ name: Haskell CI -on: [push] - +on: [push, pull_request] jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + ghc: ['8.10.1', '8.8.3', '8.6.5', '8.4.4'] + os: [ubuntu-latest, macOS-latest, windows-latest] + exclude: + - os: windows-latest + ghc: '8.8.3' # fails due to segfault steps: - uses: actions/checkout@v1 - - uses: actions/setup-haskell@v1 + - uses: actions/setup-haskell@v1.1 with: - ghc-version: '8.6.5' + ghc-version: ${{ matrix.ghc }} cabal-version: '3.0' - run: cabal update - - name: Install HIE - run: | - pushd $HOME - git clone https://github.com/haskell/haskell-ide-engine --recurse-submodules - cd haskell-ide-engine - cabal install hie - cabal install hoogle - export PATH=$PATH:$HOME/.cabal/bin - hoogle generate - popd + + - name: Cache Cabal + uses: actions/cache@v1.2.0 + with: + path: ~/.cabal + key: ${{ runner.OS }}-${{ matrix.ghc }}-cabal-0 + - name: Build run: cabal build - name: Test - run: | - export PATH=$PATH:$HOME/.cabal/bin - cabal test + run: cabal test