You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uniffle.apache.org by ro...@apache.org on 2022/07/30 03:46:51 UTC

[incubator-uniffle] branch master updated: [CI] Test compile in Java 11 and Java 17 (#105)

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

roryqi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git


The following commit(s) were added to refs/heads/master by this push:
     new deb7fe4  [CI] Test compile in Java 11 and Java 17 (#105)
deb7fe4 is described below

commit deb7fe4035abb7d7f8dc3b2da9e89c68739b5f8e
Author: Kaijie Chen <ch...@kaijie.org>
AuthorDate: Sat Jul 30 11:46:45 2022 +0800

    [CI] Test compile in Java 11 and Java 17 (#105)
    
    ### What changes were proposed in this pull request?
    
    1. Add dependency `javax.annotation-api`.
    2. Add Java 11 and Java 17 build in CI, `mvn package -DskipTests` only.
    3. Rename jobs and workflows in CI.
    4. Only check main profiles in sequential workflow, just enough to cover all modules.
    
    ### Why are the changes needed?
    
    Support build in Java 11 and Java 17.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    https://github.com/kaijchen/incubator-uniffle/actions/runs/2760618905
---
 .github/workflows/build.yml      | 18 ++++++++++++++++--
 .github/workflows/parallel.yml   | 11 ++++++-----
 .github/workflows/sequential.yml | 12 +++++++-----
 pom.xml                          |  6 ++++++
 proto/pom.xml                    |  4 ++++
 5 files changed, 39 insertions(+), 12 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index b29b860..46a8661 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -17,7 +17,7 @@
 # This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
 # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
 
-name: CI
+name: build
 
 on: [push, pull_request]
 
@@ -37,8 +37,22 @@ jobs:
     uses: ./.github/workflows/sequential.yml
     with:
       maven-args: test-compile spotbugs:check
+  
+  java-11:
+    name: 'compile'
+    uses: ./.github/workflows/sequential.yml
+    with:
+      maven-args: package -DskipTests
+      java-version: '11'
+
+  java-17:
+    name: 'compile'
+    uses: ./.github/workflows/sequential.yml
+    with:
+      maven-args: package -DskipTests
+      java-version: '17'
 
-  build:
+  package:
     uses: ./.github/workflows/parallel.yml
     with:
       maven-args: package
diff --git a/.github/workflows/parallel.yml b/.github/workflows/parallel.yml
index c2387f2..e684303 100644
--- a/.github/workflows/parallel.yml
+++ b/.github/workflows/parallel.yml
@@ -17,7 +17,7 @@
 # This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
 # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
 
-name: Java CI with Maven
+name: All Profiles in Parallel
 
 on:
   workflow_call:
@@ -41,7 +41,7 @@ on:
         default: 'test-reports'
         required: false
         type: string
-      jdk-version:
+      java-version:
         default: '8'
         required: false
         type: string
@@ -51,7 +51,7 @@ on:
         type: string
 
 jobs:
-  mvn:
+  maven:
     runs-on: ubuntu-20.04
     strategy:
       matrix:
@@ -63,13 +63,14 @@ jobs:
           - spark3.2
           - mr
       fail-fast: false
+    name: -P${{ matrix.profile }}
     steps:
     - name: Checkout project
       uses: actions/checkout@v2
-    - name: Set up JDK ${{ inputs.jdk-version }}
+    - name: Set up JDK ${{ inputs.java-version }}
       uses: actions/setup-java@v2
       with:
-        java-version: ${{ inputs.jdk-version }}
+        java-version: ${{ inputs.java-version }}
         distribution: ${{ inputs.jdk-distro }}
         cache: maven
     - name: Execute maven with -P${{ matrix.profile }}
diff --git a/.github/workflows/sequential.yml b/.github/workflows/sequential.yml
index 14d6ff1..dd713c9 100644
--- a/.github/workflows/sequential.yml
+++ b/.github/workflows/sequential.yml
@@ -17,7 +17,7 @@
 # This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
 # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
 
-name: Java CI with Maven
+name: Main Profiles in Sequential
 
 on:
   workflow_call:
@@ -41,7 +41,7 @@ on:
         default: 'test-reports'
         required: false
         type: string
-      jdk-version:
+      java-version:
         default: '8'
         required: false
         type: string
@@ -54,14 +54,16 @@ jobs:
   maven:
     runs-on: ubuntu-20.04
     env:
-      PROFILE: 'spark2 spark2.3 spark3.0 spark3 spark3.2 mr'
+      # check main profiles only, just enough to cover all modules.
+      PROFILE: 'spark2 spark3 mr'
+    name: java ${{ inputs.java-version }}
     steps:
     - name: Checkout project
       uses: actions/checkout@v2
-    - name: Set up JDK ${{ inputs.jdk-version }}
+    - name: Set up JDK ${{ inputs.java-version }}
       uses: actions/setup-java@v2
       with:
-        java-version: ${{ inputs.jdk-version }}
+        java-version: ${{ inputs.java-version }}
         distribution: ${{ inputs.jdk-distro }}
         cache: maven
     - name: Execute maven with ${{ env.PROFILE }}
diff --git a/pom.xml b/pom.xml
index e0ecfdf..c0f16a2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -51,6 +51,7 @@
     <httpclient.version>4.5.3</httpclient.version>
     <httpcore.version>4.4.4</httpcore.version>
     <java.version>1.8</java.version>
+    <javax.annotation.version>1.3.2</javax.annotation.version>
     <jetty.version>9.3.24.v20180605</jetty.version>
     <junit.jupiter.version>5.8.2</junit.jupiter.version>
     <junit.platform.version>1.8.2</junit.platform.version>
@@ -217,6 +218,11 @@
         <version>${metrics.version}</version>
       </dependency>
 
+      <dependency>
+        <groupId>javax.annotation</groupId>
+        <artifactId>javax.annotation-api</artifactId>
+        <version>${javax.annotation.version}</version>
+      </dependency>
 
       <dependency>
         <groupId>org.apache.uniffle</groupId>
diff --git a/proto/pom.xml b/proto/pom.xml
index bdccb11..9cefba9 100644
--- a/proto/pom.xml
+++ b/proto/pom.xml
@@ -45,6 +45,10 @@
       <groupId>io.grpc</groupId>
       <artifactId>grpc-stub</artifactId>
     </dependency>
+    <dependency>
+      <groupId>javax.annotation</groupId>
+      <artifactId>javax.annotation-api</artifactId>
+    </dependency>
   </dependencies>
 
   <build>