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

lzljs3620320 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-paimon-trino.git


The following commit(s) were added to refs/heads/main by this push:
     new 85684a1  Support jdk17 ci (#48)
85684a1 is described below

commit 85684a18ce21c1168f651e40c7479e21f8b74e83
Author: shidayang <[email protected]>
AuthorDate: Mon Dec 18 14:30:27 2023 +0800

    Support jdk17 ci (#48)
---
 .github/workflows/ci-jdk17.yml | 49 ++++-----------------------------------
 paimon-trino-393/pom.xml       | 52 ++++++++++++++++++++++++++----------------
 paimon-trino-422/pom.xml       | 52 ++++++++++++++++++++++++++----------------
 3 files changed, 69 insertions(+), 84 deletions(-)

diff --git a/.github/workflows/ci-jdk17.yml b/.github/workflows/ci-jdk17.yml
index 803ba0a..b2f36ad 100644
--- a/.github/workflows/ci-jdk17.yml
+++ b/.github/workflows/ci-jdk17.yml
@@ -13,60 +13,21 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-name: Java CI
+name: Java 17 Build
 
 on: [push, pull_request]
 
 jobs:
   build:
-    strategy:
-      matrix:
-        os: [ubuntu-latest]
-        java: [17]
-      fail-fast: false
-    runs-on: ${{ matrix.os }}
+    runs-on: ubuntu-latest
 
     steps:
       - name: Checkout code
         uses: actions/checkout@v2
-      - name: Set up cache for ~./m2/repository
-        uses: actions/[email protected]
-        with:
-          path: ~/.m2/repository
-          key: maven-${{ matrix.os }}-java${{ matrix.java }}-${{ 
hashFiles('**/pom.xml') }}
-          restore-keys: |
-            maven-${{ matrix.os }}-java${{ matrix.java }}-
-            maven-${{ matrix.os }}-
-      - name: Install Toolchain JDK
-        if: ${{ matrix.java == '17' }}
-        uses: actions/setup-java@v2
-        with:
-          java-version: 17
-          distribution: adopt
-      - name: Set up Toolchain
-        if: ${{ matrix.java == '17' }}
-        shell: bash
-        run: |
-            mkdir -p $HOME/.m2 \
-            && cat << EOF > $HOME/.m2/toolchains.xml
-            <?xml version="1.0" encoding="UTF8"?>
-            <toolchains>
-            <toolchain>
-             <type>jdk</type>
-               <provides>
-                 <version>17</version>
-                 <vendor>adopt</vendor>
-               </provides>
-               <configuration>
-                 <jdkHome>${{ env.JAVA_HOME }}</jdkHome>
-               </configuration>
-            </toolchain>
-            </toolchains>
-            EOF
-      - name: Set up JDK
+      - name: Set up JDK 17
         uses: actions/setup-java@v1
         with:
-          java-version: ${{ matrix.java }}
+          java-version: 17
       - name: Build
         run: |
-          mvn clean install -DskipTests -pl 
paimon-trino-common,paimon-trino-393,paimon-trino-422
+          mvn clean install -P '!toolchain' -pl 
paimon-trino-common,paimon-trino-393,paimon-trino-422
diff --git a/paimon-trino-393/pom.xml b/paimon-trino-393/pom.xml
index d5fc15f..0a14b82 100644
--- a/paimon-trino-393/pom.xml
+++ b/paimon-trino-393/pom.xml
@@ -153,26 +153,6 @@ under the License.
 
     <build>
         <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-toolchains-plugin</artifactId>
-                <version>${maven.toolchains.plugin.version}</version>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>toolchain</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <toolchains>
-                        <jdk>
-                            <version>${jdk.test.version}</version>
-                        </jdk>
-                    </toolchains>
-                </configuration>
-            </plugin>
-
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
@@ -216,4 +196,36 @@ under the License.
         </plugins>
     </build>
 
+    <profiles>
+        <profile>
+            <id>toolchain</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-toolchains-plugin</artifactId>
+                        <version>${maven.toolchains.plugin.version}</version>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>toolchain</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <configuration>
+                            <toolchains>
+                                <jdk>
+                                    <version>${jdk.test.version}</version>
+                                </jdk>
+                            </toolchains>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>
\ No newline at end of file
diff --git a/paimon-trino-422/pom.xml b/paimon-trino-422/pom.xml
index c00e577..356a927 100644
--- a/paimon-trino-422/pom.xml
+++ b/paimon-trino-422/pom.xml
@@ -153,26 +153,6 @@ under the License.
 
     <build>
         <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-toolchains-plugin</artifactId>
-                <version>${maven.toolchains.plugin.version}</version>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>toolchain</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <toolchains>
-                        <jdk>
-                            <version>${jdk.test.version}</version>
-                        </jdk>
-                    </toolchains>
-                </configuration>
-            </plugin>
-
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
@@ -216,4 +196,36 @@ under the License.
         </plugins>
     </build>
 
+    <profiles>
+        <profile>
+            <id>toolchain</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-toolchains-plugin</artifactId>
+                        <version>${maven.toolchains.plugin.version}</version>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>toolchain</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <configuration>
+                            <toolchains>
+                                <jdk>
+                                    <version>${jdk.test.version}</version>
+                                </jdk>
+                            </toolchains>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>

Reply via email to