From a100ee256d3cbc85a38863301f1fba7498bf1e74 Mon Sep 17 00:00:00 2001 From: Tesla <1394466835@qq.com> Date: Fri, 11 Oct 2024 15:28:45 +0800 Subject: [PATCH 1/3] ci: add package cache for build-haskell-doc --- .github/workflows/docs.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d02e63dfa284..d85a1ca4e624 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -212,12 +212,23 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Setup Haskell toolchain (ghc-9.2.8) - run: | - curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh - ghcup install ghc 9.2.8 --set - ghcup install cabal --set - cabal update + - name: Setup Haskell toolchain + uses: haskell/actions/setup@v2 + with: + ghc-version: '9.6.5' + cabal-version: '3.10.1.0' + + - name: Setup cache + uses: actions/cache@v3 + env: + cache-name: cache-cabal + with: + path: ~/.cabal + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- - name: Setup Rust toolchain uses: ./.github/actions/setup From dfc8d925d04a0203a42b2885f80a9d6f9dfec1a7 Mon Sep 17 00:00:00 2001 From: Tesla <1394466835@qq.com> Date: Fri, 11 Oct 2024 15:38:13 +0800 Subject: [PATCH 2/3] ci: revert setup haskell toolchain --- .github/workflows/docs.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d85a1ca4e624..06317438bfbe 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -212,11 +212,12 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Setup Haskell toolchain - uses: haskell/actions/setup@v2 - with: - ghc-version: '9.6.5' - cabal-version: '3.10.1.0' + - name: Setup Haskell toolchain (ghc-9.2.8) + run: | + curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh + ghcup install ghc 9.2.8 --set + ghcup install cabal --set + cabal update - name: Setup cache uses: actions/cache@v3 From 08204045c5495ac95dde5ed8b0171b4144966994 Mon Sep 17 00:00:00 2001 From: Tesla <1394466835@qq.com> Date: Fri, 11 Oct 2024 15:49:51 +0800 Subject: [PATCH 3/3] ci: add parallel for cabal --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 06317438bfbe..4f46987a8e11 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -237,7 +237,7 @@ jobs: - name: Build Docs working-directory: "bindings/haskell" run: | - cabal haddock --haddock-html --haddock-quickjump --haddock-hyperlink-source + cabal haddock --haddock-html --haddock-quickjump --haddock-hyperlink-source -j find dist-newstyle -path '**/build/**/doc' -exec cp -r {}/html/opendal/ doc \; - name: Upload docs