Skip to content

Commit

Permalink
[KYUUBI #4481] Setup and use cached maven in CI jobs
Browse files Browse the repository at this point in the history
### _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

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

Authored-by: liangbowen <[email protected]>
Signed-off-by: liangbowen <[email protected]>
  • Loading branch information
bowenliang123 committed Mar 8, 2023
1 parent 17466ea commit d2a0fe2
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 6 deletions.
5 changes: 2 additions & 3 deletions .github/actions/setup-mvnd/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d2a0fe2

Please sign in to comment.