diff --git a/.github/workflows/bindings_haskell.yml b/.github/workflows/bindings_haskell.yml index 9639ce81097..740085ac12d 100644 --- a/.github/workflows/bindings_haskell.yml +++ b/.github/workflows/bindings_haskell.yml @@ -51,8 +51,19 @@ jobs: cabal update - name: Setup Rust toolchain uses: ./.github/actions/setup + - name: Restore haskell cache + uses: actions/cache/restore@v3 + with: + key: ${{ runner.os }}-haskell-${{ hashFiles('**/*.cabal') }} + path: ~/.cabal/store + restore-keys: ${{ runner.os }}-haskell- - name: Build & Test working-directory: "bindings/haskell" run: | cargo build LIBRARY_PATH=../../target/debug LD_LIBRARY_PATH=../../target/debug cabal test + - name: Save haskell cache + uses: actions/cache/save@v3 + with: + key: ${{ runner.os }}-haskell-${{ hashFiles('**/*.cabal') }} + path: ~/.cabal/store diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 978b3e61da8..3290e34563a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -200,12 +200,25 @@ jobs: - name: Setup Rust toolchain uses: ./.github/actions/setup + - name: Restore haskell cache + uses: actions/cache/restore@v3 + with: + key: ${{ runner.os }}-haskell-${{ hashFiles('**/*.cabal') }} + path: ~/.cabal/store + restore-keys: ${{ runner.os }}-haskell- + - name: Build Docs working-directory: "bindings/haskell" run: | cargo build LIBRARY_PATH=../../target/debug cabal haddock --haddock-html --haddock-quickjump --haddock-hyperlink-source find dist-newstyle -path '**/build/**/doc' -exec cp -r {}/html/opendal-hs/ doc \; + + - name: Save haskell cache + uses: actions/cache/save@v3 + with: + key: ${{ runner.os }}-haskell-${{ hashFiles('**/*.cabal') }} + path: ~/.cabal/store - name: Upload docs uses: actions/upload-artifact@v3