You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2023/04/23 01:52:46 UTC

[kyuubi] branch master updated: [KYUUBI #4747] [INFRA] Install and cache build/mvn in CI builds

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

chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new 83c4bed07 [KYUUBI #4747] [INFRA] Install and cache build/mvn in CI builds
83c4bed07 is described below

commit 83c4bed076ee5b95a66c83ff31244315eba25bac
Author: liangbowen <li...@gf.com.cn>
AuthorDate: Sun Apr 23 09:52:34 2023 +0800

    [KYUUBI #4747] [INFRA] Install and cache build/mvn in CI builds
    
    ### _Why are the changes needed?_
    
    - introduce a custom action for installing and caching Maven, to prevent repeatedly downloading Maven binary from remote.
    
    ### _How was this patch tested?_
    - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
    
    - [ ] Add screenshots for manual tests if appropriate
    
    - [ ] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request
    
    Closes #4747 from bowenliang123/cache-maven.
    
    Closes #4747
    
    bbd9e1f4c [liangbowen] fix cache path
    dc342180e [liangbowen] add action for caching maven in ci builds
    
    Authored-by: liangbowen <li...@gf.com.cn>
    Signed-off-by: Cheng Pan <ch...@apache.org>
---
 .github/actions/setup-maven/action.yaml | 30 ++++++++++++++++++++++++++++++
 .github/workflows/dep.yml               |  2 ++
 .github/workflows/master.yml            | 16 ++++++++++++++++
 .github/workflows/nightly.yml           |  2 ++
 .github/workflows/style.yml             |  2 ++
 5 files changed, 52 insertions(+)

diff --git a/.github/actions/setup-maven/action.yaml b/.github/actions/setup-maven/action.yaml
new file mode 100644
index 000000000..4aabd401f
--- /dev/null
+++ b/.github/actions/setup-maven/action.yaml
@@ -0,0 +1,30 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: setup-maven
+description: 'Install and cache maven'
+runs:
+  using: composite
+  steps:
+    - name: Restore cached Maven
+      uses: actions/cache@v3
+      with:
+        path: build/apache-maven-*
+        key: setup-maven-${{ hashFiles('pom.xml') }}
+    - name: Install Maven
+      shell: bash
+      run: build/mvn -v
diff --git a/.github/workflows/dep.yml b/.github/workflows/dep.yml
index 47e0d7023..f39e5e6a2 100644
--- a/.github/workflows/dep.yml
+++ b/.github/workflows/dep.yml
@@ -44,6 +44,8 @@ jobs:
           java-version: 8
           cache: 'maven'
           check-latest: false
+      - name: Setup Maven
+        uses: ./.github/actions/setup-maven
       - name: Check kyuubi modules available
         id: modules-check
         run: >-
diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml
index 6bafea0dc..f8febf9ed 100644
--- a/.github/workflows/master.yml
+++ b/.github/workflows/master.yml
@@ -79,6 +79,8 @@ jobs:
           check-latest: false
       - name: Cache Engine Archives
         uses: ./.github/actions/cache-engine-archives
+      - name: Setup Maven
+        uses: ./.github/actions/setup-maven
       - name: Setup Python
         uses: actions/setup-python@v4
         with:
@@ -131,6 +133,8 @@ jobs:
           java-version: ${{ matrix.java }}
           cache: 'maven'
           check-latest: false
+      - name: Setup Maven
+        uses: ./.github/actions/setup-maven
       - name: Cache Engine Archives
         uses: ./.github/actions/cache-engine-archives
       - name: Build and test Kyuubi AuthZ with supported Spark versions
@@ -177,6 +181,8 @@ jobs:
           java-version: ${{ matrix.java }}
           cache: 'maven'
           check-latest: false
+      - name: Setup Maven
+        uses: ./.github/actions/setup-maven
       - name: Cache Engine Archives
         uses: ./.github/actions/cache-engine-archives
       - name: Build Flink with maven w/o linters
@@ -223,6 +229,8 @@ jobs:
           java-version: ${{ matrix.java }}
           cache: 'maven'
           check-latest: false
+      - name: Setup Maven
+        uses: ./.github/actions/setup-maven
       - name: Cache Engine Archives
         uses: ./.github/actions/cache-engine-archives
       - name: Build and test Hive with maven w/o linters
@@ -260,6 +268,8 @@ jobs:
           java-version: ${{ matrix.java }}
           cache: 'maven'
           check-latest: false
+      - name: Setup Maven
+        uses: ./.github/actions/setup-maven
       - name: Cache Engine Archives
         uses: ./.github/actions/cache-engine-archives
       - name: Build and test JDBC with maven w/o linters
@@ -297,6 +307,8 @@ jobs:
           java-version: ${{ matrix.java }}
           cache: 'maven'
           check-latest: false
+      - name: Setup Maven
+        uses: ./.github/actions/setup-maven
       - name: Cache Engine Archives
         uses: ./.github/actions/cache-engine-archives
       - name: Build and test Trino with maven w/o linters
@@ -329,6 +341,8 @@ jobs:
           java-version: 8
           cache: 'maven'
           check-latest: false
+      - name: Setup Maven
+        uses: ./.github/actions/setup-maven
       - name: Cache Engine Archives
         uses: ./.github/actions/cache-engine-archives
       - name: Run TPC-DS Tests
@@ -466,6 +480,8 @@ jobs:
           java-version: ${{ matrix.java }}
           cache: 'maven'
           check-latest: false
+      - name: Setup Maven
+        uses: ./.github/actions/setup-maven
       - name: Cache Engine Archives
         uses: ./.github/actions/cache-engine-archives
       - name: zookeeper integration tests
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
index 149da6d82..5ff634da6 100644
--- a/.github/workflows/nightly.yml
+++ b/.github/workflows/nightly.yml
@@ -43,6 +43,8 @@ jobs:
           java-version: 8
           cache: 'maven'
           check-latest: false
+      - name: Setup Maven
+        uses: ./.github/actions/setup-maven
       - name: Build with Maven
         run: ./build/mvn clean install ${{ matrix.profiles }} -Dmaven.javadoc.skip=true -V
       - name: Upload test logs
diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml
index 78cbe655a..b045de397 100644
--- a/.github/workflows/style.yml
+++ b/.github/workflows/style.yml
@@ -47,6 +47,8 @@ jobs:
           java-version: 8
           cache: 'maven'
           check-latest: false
+      - name: Setup Maven
+        uses: ./.github/actions/setup-maven
       - name: Setup Python 3
         uses: actions/setup-python@v4
         with: