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

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


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

commit 8c0b1d562f1992c0eafa0b790fee94718bc4bc96
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
    
    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";>
    
    v4 is the latest version of setup-java
    
    GitHub Actions workflow.
    
    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 358d1a8d9..c9b980966 100644
--- a/.github/workflows/build_and_test.yml
+++ b/.github/workflows/build_and_test.yml
@@ -69,18 +69,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
@@ -158,10 +152,11 @@ jobs:
     - name: Checkout
       uses: actions/checkout@v2
     - name: Install Java 8
-      uses: actions/setup-java@v3
+      uses: actions/setup-java@v4
       with:
         distribution: temurin
         java-version: 8
+        cache: 'maven'
     - name: "javadoc"
       run: |
         mkdir -p ~/.m2

Reply via email to