Squashed commit of the following:
authorLuke Lau <luke_lau@icloud.com>
Tue, 21 Jan 2020 10:40:46 +0000 (10:40 +0000)
committerLuke Lau <luke_lau@icloud.com>
Tue, 21 Jan 2020 10:40:46 +0000 (10:40 +0000)
commit e182b6f35a5f729dddfefcc0dab79d2ee6fafa22
Author: Luke Lau <luke_lau@icloud.com>
Date:   Tue Jan 21 10:20:29 2020 +0000

    Remove hie binary check (main slowdown was Hoogle)

commit 78e3a657fd66255c93e845adf4b1da48f6313d37
Author: Luke Lau <luke_lau@icloud.com>
Date:   Tue Jan 21 10:16:48 2020 +0000

    Cache hoogle db

commit 89eeebae8dc7730cbac4bb56320e307c6aab9f18
Author: Luke Lau <luke_lau@icloud.com>
Date:   Tue Jan 21 10:11:08 2020 +0000

    Check for hie already existing

commit 9c14e02fa30ce94a9635854d032294692578e02e
Author: Luke Lau <luke_lau@icloud.com>
Date:   Sun Jan 19 22:12:11 2020 +0000

    Hash based on hieref

commit 0e0f5c819ca9514567bfbb7897bc40f7c0a9a3b3
Author: Luke Lau <luke_lau@icloud.com>
Date:   Mon Jan 6 19:56:36 2020 +0000

    Try caching now that v1.1 is out

.github/workflows/haskell.yml

index 4b593b99fed343051aef93699b8bf988daa21319..06086160c15dc9edb78f3c39a7b2f82b493bd097 100644 (file)
@@ -33,32 +33,38 @@ jobs:
         ref: ${{ env.hieref }}
         path: haskell-ide-engine
 
-    # - name: Cache Cabal
-    #   uses: actions/cache@v1
-    #   with:
-    #     path: ~/.cabal
-    #     key: ${{ runner.OS }}-${{ matrix.ghc }}-cabal-${{ hashFiles('../**/*.cabal') }}
-    #     restore-keys: |
-    #       ${{ runner.OS }}-${{ matrix.ghc }}-cabal
+    - name: Cache Cabal
+      uses: actions/cache@v1.1.0
+      with:
+        path: ~/.cabal
+        key: ${{ runner.OS }}-${{ matrix.ghc }}-cabal-${{ env.hieref }}
+        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
-        hoogle generate
         popd
+    - name: Generate hoogle database
+      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