Skip to content

Commit 5302119

Browse files
committed
Switch to Revapi and Matrix JDK builds for all current LTS
1 parent 4168dd1 commit 5302119

File tree

3 files changed

+94
-39
lines changed

3 files changed

+94
-39
lines changed

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "maven"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"
7+
groups:
8+
dependencies:
9+
patterns:
10+
- "*"
11+
12+
- package-ecosystem: "github-actions"
13+
directory: "/"
14+
schedule:
15+
interval: "monthly"
16+
groups:
17+
actions:
18+
patterns:
19+
- "*"

.github/workflows/maven.yml

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This workflow is designed to build PRs for AHC. Note that it does not actually publish AHC, just builds and test it.
1+
# This workflow builds and tests PRs for AHC.
22
# Docs: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
33

44
name: Build PR
@@ -17,39 +17,51 @@ on:
1717
default: 'Github Actions'
1818

1919
jobs:
20-
RunOnLinux:
20+
compile-and-check:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- uses: actions/checkout@v4
24-
- name: Grant Permission
25-
run: sudo chmod +x ./mvnw
2624
- uses: actions/setup-java@v4
2725
with:
2826
distribution: 'corretto'
2927
java-version: '11'
30-
- name: Run Tests (force Docker tests)
31-
run: ./mvnw -B -ntp clean test -Ddocker.tests=true
32-
33-
RunOnMacOs:
34-
runs-on: macos-latest
35-
steps:
36-
- uses: actions/checkout@v4
3728
- name: Grant Permission
38-
run: sudo chmod +x ./mvnw
39-
- uses: actions/setup-java@v4
40-
with:
41-
distribution: 'corretto'
42-
java-version: '11'
43-
- name: Run Tests (force Docker tests)
44-
run: ./mvnw -B -ntp clean test -Ddocker.tests=true
29+
run: chmod +x ./mvnw
30+
- name: Compile and API compatibility check
31+
run: ./mvnw -B -ntp clean verify -DskipTests -Dgpg.skip=true
4532

46-
RunOnWindows:
47-
runs-on: windows-latest
33+
test:
34+
needs: compile-and-check
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
os: [ubuntu-latest, macos-latest, windows-latest]
39+
jdk: [11, 17, 21, 25]
40+
include:
41+
- jdk: 11
42+
distribution: corretto
43+
- jdk: 17
44+
distribution: corretto
45+
- jdk: 21
46+
distribution: corretto
47+
- jdk: 25
48+
distribution: corretto
49+
runs-on: ${{ matrix.os }}
4850
steps:
4951
- uses: actions/checkout@v4
5052
- uses: actions/setup-java@v4
5153
with:
52-
distribution: 'corretto'
53-
java-version: '11'
54-
- name: Run Tests
55-
run: ./mvnw.cmd -B -ntp clean test
54+
distribution: ${{ matrix.distribution }}
55+
java-version: ${{ matrix.jdk }}
56+
- name: Grant Permission
57+
if: runner.os != 'Windows'
58+
run: chmod +x ./mvnw
59+
- name: Run Tests (Linux)
60+
if: runner.os == 'Linux'
61+
run: ./mvnw -B -ntp clean test -Ddocker.tests=true
62+
- name: Run Tests (macOS)
63+
if: runner.os == 'macOS'
64+
run: ./mvnw -B -ntp clean test -Dno.docker.tests=true
65+
- name: Run Tests (Windows)
66+
if: runner.os == 'Windows'
67+
run: ./mvnw.cmd -B -ntp clean test -Dno.docker.tests=true

pom.xml

Lines changed: 39 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -429,26 +429,50 @@
429429
</plugin>
430430

431431
<plugin>
432-
<groupId>com.github.siom79.japicmp</groupId>
433-
<artifactId>japicmp-maven-plugin</artifactId>
434-
<version>0.23.1</version>
432+
<groupId>org.revapi</groupId>
433+
<artifactId>revapi-maven-plugin</artifactId>
434+
<version>0.15.0</version>
435+
<dependencies>
436+
<dependency>
437+
<groupId>org.revapi</groupId>
438+
<artifactId>revapi-java</artifactId>
439+
<version>0.28.1</version>
440+
</dependency>
441+
</dependencies>
435442
<configuration>
436-
<version>
437-
<old>RELEASE</old>
438-
<new>${project.version}</new>
439-
</version>
440-
<parameter>
441-
<onlyModified>true</onlyModified>
442-
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
443-
<breakBuildOnSourceIncompatibleModifications>true</breakBuildOnSourceIncompatibleModifications>
444-
<includeSynthetic>false</includeSynthetic>
445-
<accessModifier>public</accessModifier>
446-
</parameter>
443+
<oldArtifacts>
444+
<artifact>org.asynchttpclient:async-http-client:RELEASE</artifact>
445+
</oldArtifacts>
446+
<newArtifacts>
447+
<artifact>${project.groupId}:${project.artifactId}:${project.version}</artifact>
448+
</newArtifacts>
449+
<analysisConfiguration>
450+
<![CDATA[
451+
[
452+
{
453+
"extension": "revapi.differences",
454+
"configuration": {
455+
"ignore": true,
456+
"differences": [
457+
{
458+
"code": "java.class.externalClassExposedInAPI",
459+
"justification": "Netty types are part of the public API by design"
460+
},
461+
{
462+
"code": "java.class.nonPublicPartOfAPI",
463+
"justification": "Internal classes exposed via public methods are intentional"
464+
}
465+
]
466+
}
467+
}
468+
]
469+
]]>
470+
</analysisConfiguration>
447471
</configuration>
448472
<executions>
449473
<execution>
450474
<goals>
451-
<goal>cmp</goal>
475+
<goal>check</goal>
452476
</goals>
453477
<phase>verify</phase>
454478
</execution>

0 commit comments

Comments
 (0)