[KYUUBI #4481] Setup and use cached maven in CI jobs

### _Why are the changes needed?_

- Setup and use cached `build/mvn` in CI jobs, to prevent repeatedly downloading mvn 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

- [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #4481 from bowenliang123/setup-maven.

Closes #4481

3906430da [liangbowen] ignore occasional mvnd failure
366806256 [liangbowen] setup cached build/maven

Authored-by: liangbowen <liangbowen@gf.com.cn>
Signed-off-by: liangbowen <liangbowen@gf.com.cn>
This commit is contained in:
liangbowen 2023-03-08 22:35:40 +08:00
parent 17466ea41a
commit d2a0fe2b60
6 changed files with 23 additions and 6 deletions

View File

@ -16,8 +16,7 @@
#
name: 'setup-mvnd'
description: 'Setup the maven daemon'
continue-on-error: true
description: 'Setup Maven and Mvnd'
runs:
using: composite
steps:
@ -32,5 +31,5 @@ runs:
run: build/mvn -v
shell: bash
- name: Check Mvnd
run: build/mvnd -v
run: build/mvnd -v || true
shell: bash

View File

@ -45,7 +45,7 @@ jobs:
java-version: 8
cache: 'maven'
check-latest: false
- name: Setup Mvnd
- name: Setup Maven and Mvnd
uses: ./.github/actions/setup-mvnd
- name: Check kyuubi modules available
id: modules-check

View File

@ -42,7 +42,7 @@ jobs:
java-version: 8
cache: 'maven'
check-latest: false
- name: Setup Mvnd
- name: Setup Maven and Mvnd
uses: ./.github/actions/setup-mvnd
- run: >-
build/mvnd org.apache.rat:apache-rat-plugin:check

View File

@ -77,6 +77,8 @@ jobs:
java-version: ${{ matrix.java }}
cache: 'maven'
check-latest: false
- name: Setup Maven and Mvnd
uses: ./.github/actions/setup-mvnd
- name: Cache Engine Archives
uses: ./.github/actions/cache-engine-archives
- name: Setup Python
@ -131,6 +133,8 @@ jobs:
java-version: ${{ matrix.java }}
cache: 'maven'
check-latest: false
- name: Setup Maven and Mvnd
uses: ./.github/actions/setup-mvnd
- name: Cache Engine Archives
uses: ./.github/actions/cache-engine-archives
- name: Build and test Kyuubi AuthZ with supported Spark versions
@ -182,6 +186,8 @@ jobs:
java-version: ${{ matrix.java }}
cache: 'maven'
check-latest: false
- name: Setup Maven and Mvnd
uses: ./.github/actions/setup-mvnd
- name: Cache Engine Archives
uses: ./.github/actions/cache-engine-archives
- name: Build Flink with maven w/o linters
@ -228,6 +234,8 @@ jobs:
java-version: ${{ matrix.java }}
cache: 'maven'
check-latest: false
- name: Setup Maven and Mvnd
uses: ./.github/actions/setup-mvnd
- name: Cache Engine Archives
uses: ./.github/actions/cache-engine-archives
- name: Build and test Hive with maven w/o linters
@ -265,6 +273,8 @@ jobs:
java-version: ${{ matrix.java }}
cache: 'maven'
check-latest: false
- name: Setup Maven and Mvnd
uses: ./.github/actions/setup-mvnd
- name: Cache Engine Archives
uses: ./.github/actions/cache-engine-archives
- name: Build and test JDBC with maven w/o linters
@ -302,6 +312,8 @@ jobs:
java-version: ${{ matrix.java }}
cache: 'maven'
check-latest: false
- name: Setup Maven and Mvnd
uses: ./.github/actions/setup-mvnd
- name: Cache Engine Archives
uses: ./.github/actions/cache-engine-archives
- name: Build and test Trino with maven w/o linters
@ -334,6 +346,8 @@ jobs:
java-version: 8
cache: 'maven'
check-latest: false
- name: Setup Maven and Mvnd
uses: ./.github/actions/setup-mvnd
- name: Cache Engine Archives
uses: ./.github/actions/cache-engine-archives
- name: Run TPC-DS Tests
@ -471,6 +485,8 @@ jobs:
java-version: ${{ matrix.java }}
cache: 'maven'
check-latest: false
- name: Setup Maven and Mvnd
uses: ./.github/actions/setup-mvnd
- name: Cache Engine Archives
uses: ./.github/actions/cache-engine-archives
- name: zookeeper integration tests

View File

@ -43,6 +43,8 @@ jobs:
java-version: 8
cache: 'maven'
check-latest: false
- name: Setup Maven and Mvnd
uses: ./.github/actions/setup-mvnd
- name: Build with Maven
run: ./build/mvn clean install ${{ matrix.profiles }} -Dmaven.javadoc.skip=true -V
- name: Upload test logs

View File

@ -45,7 +45,7 @@ jobs:
java-version: 8
cache: 'maven'
check-latest: false
- name: Setup Mvnd
- name: Setup Maven and Mvnd
uses: ./.github/actions/setup-mvnd
- name: Setup Python 3
uses: actions/setup-python@v4