This is an automated email from the ASF dual-hosted git repository.

psiace pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git


The following commit(s) were added to refs/heads/main by this push:
     new 66646805ee ci: add cache action for ci_bindings_ocaml & build-ocaml-doc
66646805ee is described below

commit 66646805ee0409d37b4b9bd47fd747cd4ad30cac
Author: xmchx <[email protected]>
AuthorDate: Sat Oct 12 13:23:42 2024 +0800

    ci: add cache action for ci_bindings_ocaml & build-ocaml-doc
---
 .github/workflows/ci_bindings_ocaml.yml | 18 ++++++++++++++++++
 .github/workflows/docs.yml              | 18 ++++++++++++++++++
 2 files changed, 36 insertions(+)

diff --git a/.github/workflows/ci_bindings_ocaml.yml 
b/.github/workflows/ci_bindings_ocaml.yml
index 1d10a9f0cf..7160ac6b9e 100644
--- a/.github/workflows/ci_bindings_ocaml.yml
+++ b/.github/workflows/ci_bindings_ocaml.yml
@@ -40,6 +40,24 @@ jobs:
       - name: Checkout PR
         uses: actions/checkout@v4
 
+      - name: Cache OPAM dependencies
+        uses: actions/cache@v3
+        with:
+          path: ~/.opam
+          key: ${{ runner.os }}-opam-${{ 
hashFiles('bindings/ocaml/dune-project') }}
+          restore-keys: |
+            ${{ runner.os }}-opam-
+            ${{ runner.os }}-opam-doc-
+
+      - name: Cache Dune build artifacts
+        uses: actions/cache@v3
+        with:
+          path: bindings/ocaml/_build
+          key: ${{ runner.os }}-dune-${{ 
hashFiles('bindings/ocaml/**/*.{ml,mli,opam}') }}
+          restore-keys: |
+            ${{ runner.os }}-dune-
+            ${{ runner.os }}-dune-doc-
+
       - name: Setup OCaml toolchain
         uses: ./.github/actions/setup-ocaml
         with:
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 4f46987a8e..8a6af98547 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -281,6 +281,24 @@ jobs:
     steps:
       - uses: actions/checkout@v4
 
+      - name: Cache OPAM dependencies
+        uses: actions/cache@v3
+        with:
+          path: ~/.opam
+          key: ${{ runner.os }}-opam-doc-${{ 
hashFiles('bindings/ocaml/dune-project') }}
+          restore-keys: |
+            ${{ runner.os }}-opam-doc-
+            ${{ runner.os }}-opam-
+
+      - name: Cache Dune build artifacts
+        uses: actions/cache@v3
+        with:
+          path: bindings/ocaml/_build
+          key: ${{ runner.os }}-dune-doc-${{ 
hashFiles('bindings/ocaml/**/*.{ml,mli,opam}') }}
+          restore-keys: |
+            ${{ runner.os }}-dune-doc-
+            ${{ runner.os }}-dune-
+
       - name: Setup Rust toolchain
         uses: ./.github/actions/setup
         with:

Reply via email to