Remove hie binary check (main slowdown was Hoogle)
[lsp-test.git] / .github / workflows / haskell.yml
index f7e11706f6197c33cdab48287a7cb7d2ce51c403..06086160c15dc9edb78f3c39a7b2f82b493bd097 100644 (file)
@@ -41,25 +41,30 @@ jobs:
         restore-keys: |
           ${{ runner.OS }}-${{ matrix.ghc }}-cabal
 
+    - name: Cache Hoogle
+      uses: actions/cache@v1.1.0
+      with:
+        path: ~/.hoogle
+        key: ${{ runner.OS }}-${{ matrix.ghc }}-hoogle-${{ env.hieref }}
+
     - name: Build HIE
       run: |
-        if [ -e $HOME/.cabal/bin/hie ]; then
-            echo "hie is already built"
-            exit 0
-        fi
         pushd ../haskell-ide-engine
         cabal install hie
         cabal install hoogle
         popd
     - name: Generate hoogle database
-      run: hoogle generate
+      run: |
+        if [ -d $HOME/.hoogle ]; then
+           echo "hoogle database already built"
+           exit 0
+        fi
+        hoogle generate
     - name: Install JS Language Server
       run: npm install javascript-typescript-langserver
     - name: Build
       run: cabal build
     - name: Test
       run: |
-        echo $PATH
-        echo $(npm bin)
         export PATH=$PATH:$(npm bin) 
         cabal test