Skip to content

Commit f541c72

Browse files
loserwang1024wuchong
authored andcommitted
support java 11 as default compile version.
1 parent e0e078a commit f541c72

File tree

4 files changed

+100
-15
lines changed

4 files changed

+100
-15
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
distribution: 'temurin'
4848
- name: Build
4949
run: |
50-
mvn -T 1C -B clean install -DskipTests
50+
mvn -T 1C -B clean install -DskipTests -Pjava8-target
5151
5252
build-on-jdk11:
5353
runs-on: self-hosted
@@ -65,7 +65,7 @@ jobs:
6565
distribution: 'temurin'
6666
- name: Build
6767
run: |
68-
mvn -T 1C -B clean install -DskipTests -Pjava11-target
68+
mvn -T 1C -B clean install -DskipTests
6969
- name: Test
7070
timeout-minutes: 60
7171
run: |

.github/workflows/daily.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
################################################################################
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
################################################################################
18+
name: Daily CI ON JDK 8
19+
on:
20+
schedule:
21+
# Run at 12:00 daily.
22+
- cron: "0 12 * * *"
23+
concurrency:
24+
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.number || github.run_id }}
25+
cancel-in-progress: true
26+
27+
jobs:
28+
build-on-jdk8:
29+
runs-on: self-hosted
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
module: [ core, flink ]
34+
steps:
35+
- name: Checkout code
36+
uses: actions/checkout@v2
37+
- name: Set up JDK 8
38+
uses: actions/setup-java@v4
39+
with:
40+
java-version: '8'
41+
distribution: 'temurin'
42+
- name: Build
43+
run: |
44+
mvn -T 1C -B clean install -DskipTests -Pjava8-target
45+
- name: Test
46+
timeout-minutes: 60
47+
run: |
48+
TEST_MODULES=$(./.github/workflows/stage.sh ${{ matrix.module }})
49+
echo "github ref: ${{ github.ref }}"
50+
echo "Start testing modules: $TEST_MODULES"
51+
mvn -B verify $TEST_MODULES -Ptest-coverage -Ptest-${{ matrix.module }} -Dlog.dir=${{ runner.temp }}/fluss-logs -Dlog4j.configurationFile=${{ github.workspace }}/tools/ci/log4j.properties -Pjava8-target
52+
env:
53+
MAVEN_OPTS: -Xmx4096m
54+
ARTIFACTS_OSS_ENDPOINT: ${{ secrets.ARTIFACTS_OSS_ENDPOINT }}
55+
ARTIFACTS_OSS_REGION: ${{ secrets.ARTIFACTS_OSS_REGION }}
56+
ARTIFACTS_OSS_BUCKET: ${{ secrets.ARTIFACTS_OSS_BUCKET }}
57+
ARTIFACTS_OSS_ACCESS_KEY: ${{ secrets.ARTIFACTS_OSS_ACCESS_KEY }}
58+
ARTIFACTS_OSS_SECRET_KEY: ${{ secrets.ARTIFACTS_OSS_SECRET_KEY }}
59+
ARTIFACTS_OSS_STS_ENDPOINT: ${{ secrets.ARTIFACTS_OSS_STS_ENDPOINT }}
60+
ARTIFACTS_OSS_ROLE_ARN: ${{ secrets.ARTIFACTS_OSS_ROLE_ARN }}
61+
- name: Upload build logs
62+
uses: actions/upload-artifact@v4
63+
if: ${{ failure() }}
64+
with:
65+
name: logs-test-${{ matrix.module }}-${{ github.run_number}}#${{ github.run_attempt }}
66+
path: ${{ runner.temp }}/fluss-logs/*
67+
- name: Upload JaCoCo coverage report
68+
uses: actions/upload-artifact@v4
69+
if: ${{ success() && github.ref == 'refs/heads/main' }}
70+
with:
71+
name: jacoco-report-${{ matrix.module }}-${{ github.run_number}}#${{ github.run_attempt }}
72+
path: ${{ github.workspace }}/fluss-test-coverage/target/site/jacoco-aggregate/*

.github/workflows/license-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Set JDK
3838
uses: actions/setup-java@v4
3939
with:
40-
java-version: 8
40+
java-version: 11
4141
distribution: 'temurin'
4242

4343
- name: Build

pom.xml

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
<properties>
8383
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
8484
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
85-
<target.java.version>1.8</target.java.version>
85+
<target.java.version>11</target.java.version>
8686
<maven.compiler.source>${target.java.version}</maven.compiler.source>
8787
<maven.compiler.target>${target.java.version}</maven.compiler.target>
8888
<test.unit.pattern>**/*Test.*</test.unit.pattern>
@@ -426,28 +426,25 @@
426426

427427
<profiles>
428428
<profile>
429-
<id>java11-target</id>
429+
<id>java8-target</id>
430430
<build>
431431
<plugins>
432432
<plugin>
433433
<groupId>org.apache.maven.plugins</groupId>
434434
<artifactId>maven-compiler-plugin</artifactId>
435435
<configuration>
436-
<source>11</source>
437-
<target>11</target>
438-
<compilerArgs combine.children="append">
439-
<arg>--add-exports=java.base/sun.net.util=ALL-UNNAMED</arg>
440-
<arg>--add-exports=java.management/sun.management=ALL-UNNAMED</arg>
441-
<arg>--add-exports=java.rmi/sun.rmi.registry=ALL-UNNAMED</arg>
442-
<arg>--add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED</arg>
443-
<arg>--add-exports=java.base/sun.nio.ch=ALL-UNNAMED</arg>
436+
<source>8</source>
437+
<target>8</target>
438+
<useIncrementalCompilation>false</useIncrementalCompilation>
439+
<compilerArgs >
440+
<!-- Prevents recompilation due to missing package-info.class, see MCOMPILER-205 -->
441+
<arg>-Xpkginfo:always</arg>
444442
</compilerArgs>
445443
</configuration>
446444
</plugin>
447445
</plugins>
448446
</build>
449447
</profile>
450-
451448
<profile>
452449
<id>test-coverage</id>
453450
<properties>
@@ -533,6 +530,22 @@
533530
<plugin>
534531
<groupId>org.apache.maven.plugins</groupId>
535532
<artifactId>maven-compiler-plugin</artifactId>
533+
<version>3.8.0</version>
534+
<configuration>
535+
<source>${target.java.version}</source>
536+
<target>${target.java.version}</target>
537+
<!-- The semantics of this option are reversed, see MCOMPILER-209. -->
538+
<useIncrementalCompilation>false</useIncrementalCompilation>
539+
<compilerArgs >
540+
<arg>--add-exports=java.base/sun.net.util=ALL-UNNAMED</arg>
541+
<arg>--add-exports=java.management/sun.management=ALL-UNNAMED</arg>
542+
<arg>--add-exports=java.rmi/sun.rmi.registry=ALL-UNNAMED</arg>
543+
<arg>--add-exports=java.security.jgss/sun.security.krb5=ALL-UNNAMED</arg>
544+
<arg>--add-exports=java.base/sun.nio.ch=ALL-UNNAMED</arg>
545+
<!-- Prevents recompilation due to missing package-info.class, see MCOMPILER-205 -->
546+
<arg>-Xpkginfo:always</arg>
547+
</compilerArgs>
548+
</configuration>
536549
</plugin>
537550

538551
<plugin>
@@ -719,7 +732,7 @@
719732
<version>[3.1.1,)</version>
720733
</requireMavenVersion>
721734
<requireJavaVersion>
722-
<version>${target.java.version}</version>
735+
<version>[1.8,)</version>
723736
</requireJavaVersion>
724737
</rules>
725738
</configuration>

0 commit comments

Comments
 (0)