Skip to content

Commit

Permalink
ci: use cache to speed up haskell ci (#2792)
Browse files Browse the repository at this point in the history
  • Loading branch information
silver-ymz committed Aug 6, 2023
1 parent 900e476 commit d74df94
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/bindings_haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
13 changes: 13 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d74df94

Please sign in to comment.