Skip to content

Commit

Permalink
Force to build on JDK 17+
Browse files Browse the repository at this point in the history
  • Loading branch information
linghengqian committed Aug 10, 2024
1 parent c17a3e5 commit 1cc9ce8
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/graalvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ on:

jobs:
build:
if: github.repository == 'apache/shardingsphere-elasticjob'
strategy:
matrix:
java: [ '22.0.2' ]
Expand Down
37 changes: 31 additions & 6 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,22 @@ on:

jobs:
build:
if: github.repository == 'apache/shardingsphere-elasticjob'
strategy:
matrix:
java: [ 8, 17, 21, 22 ]
java: [ 17, 21, 22 ]
os: [ 'windows-latest', 'macos-latest', 'ubuntu-latest' ]

runs-on: ${{ matrix.os }}

steps:
- name: Configure Git
if: matrix.os == 'windows-latest'
run: |
git config --global core.longpaths true
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Build with Maven in Windows
Expand All @@ -60,3 +59,29 @@ jobs:
file: '**/target/site/jacoco/jacoco.xml'
- name: Build Examples with Maven
run: ./mvnw clean package -B -f examples/pom.xml -T1C
ci-jdk8:
if: github.repository == 'apache/shardingsphere-elasticjob'
name: CI - JDK 8 on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
steps:
- name: Support Long Paths in Windows
if: matrix.os == 'windows-latest'
run: git config --global core.longpaths true
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'maven'
- name: Build prod with Maven
run: ./mvnw clean install -DskipTests -B -e -T1C
- name: Setup JDK 8 for Test
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 8
- name: Run Tests with JDK 8
run: ./mvnw test -B -e -T1C
3 changes: 3 additions & 0 deletions .github/workflows/required-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ concurrency:

jobs:
check-checkstyle:
if: github.repository == 'apache/shardingsphere-elasticjob'
name: Check - CheckStyle
runs-on: ubuntu-latest
timeout-minutes: 10
Expand All @@ -37,6 +38,7 @@ jobs:
run: ./mvnw checkstyle:check -Pcheck -T1C

check-spotless:
if: github.repository == 'apache/shardingsphere-elasticjob'
name: Check - Spotless
runs-on: ubuntu-latest
timeout-minutes: 10
Expand All @@ -46,6 +48,7 @@ jobs:
run: ./mvnw spotless:check -Pcheck -T1C

check-license:
if: github.repository == 'apache/shardingsphere-elasticjob'
name: Check - License
runs-on: ubuntu-latest
timeout-minutes: 10
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -755,14 +755,14 @@
<activation>
<jdk>[11,)</jdk>
</activation>
<properties>
<maven.compiler.release>8</maven.compiler.release>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>@{argLine} --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED</argLine>
</configuration>
</plugin>
</plugins>
</pluginManagement>
Expand Down

0 comments on commit 1cc9ce8

Please sign in to comment.