X-Git-Url: https://git.lukelau.me/?a=blobdiff_plain;f=.github%2Fworkflows%2Fhaskell.yml;h=2fb86aa0d3bce37b3aac1f3e4395dd017edf21c3;hb=6efe5549544a507cbb4928d6714d908a2881d36c;hp=32c54b90c649ce802d73806751cd3a0c55d68e61;hpb=100a827c557ab534b4f67cdac6bee88e3cf00999;p=lsp-test.git diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 32c54b9..2fb86aa 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -1,26 +1,34 @@ 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 - - name: Install dependencies - run: cabal install --only-dependencies --enable-tests - - name: Install HIE - run: | - pushd $HOME - git clone https://github.com/haskell/haskell-ide-engine --recurse-submodules - cd haskell-ide-engine - cabal v2-install hie - cabal v2-install hoogle - hoogle generate - popd + - uses: actions/checkout@v2 + - uses: actions/setup-haskell@v1.1.4 + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: '3.2' + + - name: Cache Cabal + uses: actions/cache@v1.2.0 + with: + path: ~/.cabal + key: ${{ runner.OS }}-${{ matrix.ghc }}-cabal-0 + - name: Build - run: cabal v2-build - - name: Run tests - run: cabal v2-test + run: cabal build + - name: Test + run: cabal test