From d2a0fe2b60b6b20406ce7c02a553807b2ffdfc6e Mon Sep 17 00:00:00 2001 From: liangbowen Date: Wed, 8 Mar 2023 22:35:40 +0800 Subject: [PATCH] [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 Signed-off-by: liangbowen --- .github/actions/setup-mvnd/action.yaml | 5 ++--- .github/workflows/dep.yml | 2 +- .github/workflows/license.yml | 2 +- .github/workflows/master.yml | 16 ++++++++++++++++ .github/workflows/nightly.yml | 2 ++ .github/workflows/style.yml | 2 +- 6 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/actions/setup-mvnd/action.yaml b/.github/actions/setup-mvnd/action.yaml index 55c8139ff8b..dac05c02479 100644 --- a/.github/actions/setup-mvnd/action.yaml +++ b/.github/actions/setup-mvnd/action.yaml @@ -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 diff --git a/.github/workflows/dep.yml b/.github/workflows/dep.yml index 72f5c915da7..09197951a12 100644 --- a/.github/workflows/dep.yml +++ b/.github/workflows/dep.yml @@ -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 diff --git a/.github/workflows/license.yml b/.github/workflows/license.yml index a490def9161..e62605e7f09 100644 --- a/.github/workflows/license.yml +++ b/.github/workflows/license.yml @@ -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 diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index a70117826cc..4d48e5b3ba3 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -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 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 149da6d82b3..b53a7d29294 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 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 diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 717cbbc7041..bfaf22e2e1a 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -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