4b593b99fed343051aef93699b8bf988daa21319
[lsp-test.git] / .github / workflows / haskell.yml
1 name: Haskell CI
2
3 on: [push, pull_request]
4 jobs:
5   build:
6    
7     runs-on: ${{ matrix.os }}
8
9     env:
10       hieref: 8582a960dc1ca389734707f821b273b00bae54ab
11
12     strategy:
13       matrix:
14         ghc: ['8.6.5', '8.4.4']
15         os: [ubuntu-latest, macOS-latest]
16         exclude:
17           - os: macOS-latest
18             ghc: '8.4.4' # fails due to ghc panic
19
20     steps:
21     - uses: actions/checkout@v1
22     - uses: bubba/setup-haskell@macos-ghcup
23       with:
24         ghc-version: ${{ matrix.ghc }}
25         cabal-version: '3.0'
26     - run: cabal update
27
28     - name: Clone HIE
29       uses: actions/checkout@v1
30       with:
31         repository: haskell/haskell-ide-engine
32         submodules: recursive
33         ref: ${{ env.hieref }}
34         path: haskell-ide-engine
35
36     # - name: Cache Cabal
37     #   uses: actions/cache@v1
38     #   with:
39     #     path: ~/.cabal
40     #     key: ${{ runner.OS }}-${{ matrix.ghc }}-cabal-${{ hashFiles('../**/*.cabal') }}
41     #     restore-keys: |
42     #       ${{ runner.OS }}-${{ matrix.ghc }}-cabal
43
44     - name: Build HIE
45       run: |
46         # if [ -e $HOME/.cabal/bin/hie ]; then
47         #     echo "hie is already built"
48         #     exit 0
49         # fi
50         pushd ../haskell-ide-engine
51         cabal install hie
52         cabal install hoogle
53         hoogle generate
54         popd
55     - name: Install JS Language Server
56       run: npm install javascript-typescript-langserver
57     - name: Build
58       run: cabal build
59     - name: Test
60       run: |
61         echo $PATH
62         echo $(npm bin)
63         export PATH=$PATH:$(npm bin) 
64         cabal test