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

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


The following commit(s) were added to refs/heads/main by this push:
     new 60a90e578a [CELEBORN-2488] Cache Maven distribution in CI workflows
60a90e578a is described below

commit 60a90e578a0cf0c439adf3dd70061fe22fa099cc
Author: yew1eb <[email protected]>
AuthorDate: Tue Oct 20 11:03:02 2026 +0800

    [CELEBORN-2488] Cache Maven distribution in CI workflows
    
    ### What changes were proposed in this pull request?
    
    Each job in `maven.yml` re-downloads the Maven distribution from 
`archive.apache.org` via `build/mvn` (~25s typical, 1m49s observed on a slow 
network), even though `~/.m2` is already cached by `setup-java`. This PR adds 
an `actions/cachev4` step for the extracted Maven install under `build/`, so 
`build/mvn` reuses the cached binary — its `install_app` already skips the 
download when `apache-maven-<version>/bin/mvn` exists.
    
    This mirrors the sbt launcher caching added for `sbt.yml` in CELEBORN-2432.
    
    ### Why are the changes needed?
    
    Save ~25s–2min per job; ~10–40 minutes of total machine time per CI run.
    
    ### Does this PR resolve a correctness bug?
    
    - [ ] Yes
    
    ### Does this PR introduce _any_ user-facing change?
    
    - [ ] No
    
    ### How was this patch tested?
    
    Verified locally that `build/mvn` skips the download when 
`build/apache-maven-<version>/bin/mvn` is present. CI on this branch shows the 
cache step restoring and no `curl` download of the Maven tarball.
    
    Closes #3880 from yew1eb/CELEBORN-2488.
    
    Authored-by: yew1eb <[email protected]>
    Signed-off-by: zhengtao <[email protected]>
    
    AI-Contributed/Feature: 0/36
    AI-Contributed/UT: 0/0
---
 .github/workflows/maven.yml | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index e7fd0a42ec..17c9cfc442 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -36,6 +36,12 @@ jobs:
         java-version: ${{ matrix.java }}
         cache: maven
         check-latest: false
+    - name: Cache Maven distribution
+      uses: actions/cache@v4
+      with:
+        path: build/apache-maven-*
+        key: maven-distribution-${{ runner.os }}-${{ hashFiles('pom.xml') }}
+        restore-keys: maven-distribution-${{ runner.os }}-
     - name: Test Service with Maven
       run: build/mvn -Pgoogle-mirror test
     - name: Upload test log
@@ -98,6 +104,12 @@ jobs:
         java-version: ${{ matrix.java }}
         cache: maven
         check-latest: false
+    - name: Cache Maven distribution
+      uses: actions/cache@v4
+      with:
+        path: build/apache-maven-*
+        key: maven-distribution-${{ runner.os }}-${{ hashFiles('pom.xml') }}
+        restore-keys: maven-distribution-${{ runner.os }}-
     - name: Test with Maven
       run: |
         SPARK_BINARY_VERSION=${{ matrix.spark }}
@@ -138,6 +150,12 @@ jobs:
           java-version: ${{ matrix.java }}
           cache: maven
           check-latest: false
+      - name: Cache Maven distribution
+        uses: actions/cache@v4
+        with:
+          path: build/apache-maven-*
+          key: maven-distribution-${{ runner.os }}-${{ hashFiles('pom.xml') }}
+          restore-keys: maven-distribution-${{ runner.os }}-
       - name: Test with Maven
         run: |
           SPARK_BINARY_VERSION=${{ matrix.spark }}
@@ -177,6 +195,12 @@ jobs:
           java-version: ${{ matrix.java }}
           cache: maven
           check-latest: false
+      - name: Cache Maven distribution
+        uses: actions/cache@v4
+        with:
+          path: build/apache-maven-*
+          key: maven-distribution-${{ runner.os }}-${{ hashFiles('pom.xml') }}
+          restore-keys: maven-distribution-${{ runner.os }}-
       - name: Test with Maven
         run: |
           PROFILES="-Pgoogle-mirror,flink-${{ matrix.flink }}"
@@ -214,6 +238,12 @@ jobs:
           java-version: ${{ matrix.java }}
           cache: maven
           check-latest: false
+      - name: Cache Maven distribution
+        uses: actions/cache@v4
+        with:
+          path: build/apache-maven-*
+          key: maven-distribution-${{ runner.os }}-${{ hashFiles('pom.xml') }}
+          restore-keys: maven-distribution-${{ runner.os }}-
       - name: Test with Maven
         run: |
           PROFILES="-Pgoogle-mirror,flink-${{ matrix.flink }}"
@@ -246,6 +276,12 @@ jobs:
           java-version: ${{ matrix.java }}
           cache: maven
           check-latest: false
+      - name: Cache Maven distribution
+        uses: actions/cache@v4
+        with:
+          path: build/apache-maven-*
+          key: maven-distribution-${{ runner.os }}-${{ hashFiles('pom.xml') }}
+          restore-keys: maven-distribution-${{ runner.os }}-
       - name: Test with Maven
         run: |
           PROFILES="-Pgoogle-mirror,mr"

Reply via email to