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

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


The following commit(s) were added to refs/heads/main by this push:
     new 16278bc51 feat(ci): add maven cache to ci for faster build (#2751)
16278bc51 is described below

commit 16278bc514d5ff3a429cf211d4968dc3b5c1a036
Author: Shawn Yang <[email protected]>
AuthorDate: Sun Oct 12 22:56:41 2025 +0530

    feat(ci): add maven cache to ci for faster build (#2751)
    
    ## Why?
    
    <!-- Describe the purpose of this PR. -->
    
    ## What does this PR do?
    
    add maven cache to ci for faster build
    
    ## Related issues
    
    <!--
    Is there any related issue? If this PR closes them you say say
    fix/closes:
    
    - #xxxx0
    - #xxxx1
    - Fixes #xxxx2
    -->
    
    ## Does this PR introduce any user-facing change?
    
    <!--
    If any user-facing interface changes, please [open an
    issue](https://github.com/apache/fory/issues/new/choose) describing the
    need to do so and update the document if necessary.
    
    Delete section if not applicable.
    -->
    
    - [ ] Does this PR introduce any public API change?
    - [ ] Does this PR introduce any binary protocol compatibility change?
    
    ## Benchmark
    
    <!--
    When the PR has an impact on performance (if you don't know whether the
    PR will have an impact on performance, you can submit the PR first, and
    if it will have impact on performance, the code reviewer will explain
    it), be sure to attach a benchmark data here.
    
    Delete section if not applicable.
    -->
---
 .github/workflows/ci.yml | 64 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index aebf651b6..f30db015a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -54,6 +54,14 @@ jobs:
         with:
           java-version: ${{ matrix.java-version }}
           distribution: "temurin"
+      - name: Restore Maven Repos
+        id: restore-maven-cache
+        uses: actions/cache/restore@v3
+        with:
+          path: ~/.m2/repository
+          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+          restore-keys: |
+            ${{ runner.os }}-maven-
       - name: Set up Python3.8
         uses: actions/setup-python@v5
         with:
@@ -89,6 +97,14 @@ jobs:
         with:
           java-version: ${{ matrix.java-version }}
           distribution: "adopt-openj9"
+      - name: Restore Maven Repos
+        id: restore-maven-cache
+        uses: actions/cache/restore@v3
+        with:
+          path: ~/.m2/repository
+          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+          restore-keys: |
+            ${{ runner.os }}-maven-
       - name: Set up Python3.8
         uses: actions/setup-python@v5
         with:
@@ -117,6 +133,14 @@ jobs:
         with:
           java-version: ${{ matrix.java-version }}
           distribution: "temurin"
+      - name: Restore Maven Repos
+        id: restore-maven-cache
+        uses: actions/cache/restore@v3
+        with:
+          path: ~/.m2/repository
+          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+          restore-keys: |
+            ${{ runner.os }}-maven-
       - name: Set up Python 3.8
         uses: actions/setup-python@v5
         with:
@@ -139,6 +163,14 @@ jobs:
           distribution: "graalvm"
           github-token: ${{ secrets.GITHUB_TOKEN }}
           native-image-job-reports: "true"
+      - name: Restore Maven Repos
+        id: restore-maven-cache
+        uses: actions/cache/restore@v3
+        with:
+          path: ~/.m2/repository
+          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+          restore-keys: |
+            ${{ runner.os }}-maven-
       - name: Set up Python3.8
         uses: actions/setup-python@v5
         with:
@@ -162,6 +194,14 @@ jobs:
         with:
           java-version: ${{ matrix.java-version }}
           distribution: "temurin"
+      - name: Restore Maven Repos
+        id: restore-maven-cache
+        uses: actions/cache/restore@v3
+        with:
+          path: ~/.m2/repository
+          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+          restore-keys: |
+            ${{ runner.os }}-maven-
       - name: Set up Python 3.8
         uses: actions/setup-python@v5
         with:
@@ -182,6 +222,14 @@ jobs:
           java-version: 11
           distribution: "temurin"
           cache: sbt
+      - name: Restore Maven Repos
+        id: restore-maven-cache
+        uses: actions/cache/restore@v3
+        with:
+          path: ~/.m2/repository
+          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+          restore-keys: |
+            ${{ runner.os }}-maven-
       - uses: sbt/setup-sbt@v1
       - name: Install fory java
         run: cd java && mvn -T10 --no-transfer-progress clean install 
-DskipTests && cd -
@@ -199,6 +247,14 @@ jobs:
         with:
           java-version: 11
           distribution: "temurin"
+      - name: Restore Maven Repos
+        id: restore-maven-cache
+        uses: actions/cache/restore@v3
+        with:
+          path: ~/.m2/repository
+          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+          restore-keys: |
+            ${{ runner.os }}-maven-
       - name: Set up Python 3.8
         uses: actions/setup-python@v5
         with:
@@ -253,6 +309,14 @@ jobs:
         with:
           java-version: 11
           distribution: temurin
+      - name: Restore Maven Repos
+        id: restore-maven-cache
+        uses: actions/cache/restore@v3
+        with:
+          path: ~/.m2/repository
+          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+          restore-keys: |
+            ${{ runner.os }}-maven-
       - name: Run Rust CI
         run: python ./ci/run_ci.py rust
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to