Use new hie
[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: caf72237f596255eef3e614330db353c15b6c46b
11
12     strategy:
13       matrix:
14         ghc: ['8.8.1', '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
27     - name: Clone HIE
28       uses: actions/checkout@v1
29       with:
30         repository: haskell/haskell-ide-engine
31         submodules: recursive
32         ref: ${{ env.hieref }}
33         path: haskell-ide-engine
34
35     - name: Cache Cabal
36       uses: actions/cache@v1.1.0
37       with:
38         path: ~/.cabal
39         key: ${{ runner.OS }}-${{ matrix.ghc }}-cabal-${{ env.hieref }}
40
41     - name: Cache Hoogle
42       uses: actions/cache@v1.1.0
43       with:
44         path: ~/.hoogle
45         key: ${{ runner.OS }}-${{ matrix.ghc }}-hoogle-${{ env.hieref }}
46
47     - run: cabal update
48
49     - name: Build HIE
50       run: |
51         pushd ../haskell-ide-engine
52         cabal install hie
53         cabal install hoogle
54         popd
55     - name: Generate hoogle database
56       run: |
57         if [ -d $HOME/.hoogle ]; then
58            echo "hoogle database already built"
59            exit 0
60         fi
61         hoogle generate
62     - name: Install JS Language Server
63       run: npm install javascript-typescript-langserver
64     - name: Build
65       run: cabal build
66     - name: Test
67       run: |
68         export PATH=$PATH:$(npm bin) 
69         cabal test