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

dongjoon pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/orc.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 6de61d6a3 ORC-1709: Upgrade GitHub Action `setup-java` to v4 and use 
built-in cache feature
6de61d6a3 is described below

commit 6de61d6a33dbf609fca082fb6548a345f10f17bd
Author: sullis <[email protected]>
AuthorDate: Wed Aug 7 10:15:28 2024 -0700

    ORC-1709: Upgrade GitHub Action `setup-java` to v4 and use built-in cache 
feature
    
    ### What changes were proposed in this pull request?
    
    upgrade GitHub Action setup-java from v3 to v4
    
    Also:  setup-java supports a "cache" attribute.  This allows us to remove 
the "cache" action from the workflow.
    
    The "cache" attribute is documented in the setup-java README:
    https://github.com/actions/setup-java/blob/main/README.md
    
    <img width="783" alt="image" 
src="https://github.com/apache/orc/assets/30938/8cfa4a66-7539-4f43-8e37-4f6a202629cb";>
    
    ### Why are the changes needed?
    
    v4 is the latest version of setup-java
    
    ### How was this patch tested?
    
    GitHub Actions workflow.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #1925 from sullis/setup-java-v4.
    
    Authored-by: sullis <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
    (cherry picked from commit bfc1d8e5e71fa4bc06e37ef59f878c3ec03eefe3)
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 .github/workflows/build_and_test.yml | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/build_and_test.yml 
b/.github/workflows/build_and_test.yml
index 25b35e304..1849abaf1 100644
--- a/.github/workflows/build_and_test.yml
+++ b/.github/workflows/build_and_test.yml
@@ -66,18 +66,12 @@ jobs:
     steps:
     - name: Checkout
       uses: actions/checkout@v2
-    - name: Cache Maven local repository
-      uses: actions/cache@v2
-      with:
-        path: ~/.m2/repository
-        key: ${{ matrix.java }}-maven-${{ hashFiles('**/pom.xml') }}
-        restore-keys: |
-          ${{ matrix.java }}-maven-
     - name: Install Java ${{ matrix.java }}
-      uses: actions/setup-java@v3
+      uses: actions/setup-java@v4
       with:
         distribution: zulu
         java-version: ${{ matrix.java }}
+        cache: 'maven'
     - name: "Test"
       run: |
         mkdir -p ~/.m2
@@ -155,10 +149,11 @@ jobs:
     - name: Checkout
       uses: actions/checkout@v2
     - name: Install Java 17
-      uses: actions/setup-java@v3
+      uses: actions/setup-java@v4
       with:
         distribution: zulu
         java-version: 17
+        cache: 'maven'
     - name: "javadoc"
       run: |
         mkdir -p ~/.m2

Reply via email to