Skip to content

Commit 087d73d

Browse files
committed
Update auto-jdk-matrix.yml workflow.
Add A_BeforeSuite to tests. Update pom to disable "requireJavaVersion".
1 parent 0bc9c15 commit 087d73d

File tree

3 files changed

+46
-18
lines changed

3 files changed

+46
-18
lines changed

.github/workflows/auto-jdk-matrix.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: Auto JDK Matrix Test & Install
22

33
on:
4-
# push:
5-
# paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/LICENSE', '**/NOTICE' ]
6-
# branches: [ 'main', '[0-9]+.[0-9]+.[Xx]', 'v[0-9]+.[0-9]+.[Xx]' ]
7-
# pull_request:
8-
# paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/LICENSE', '**/NOTICE' ]
9-
# # The branches below must be a subset of the branches above
10-
# branches: [ 'main', '[0-9]+.[0-9]+.[Xx]', 'v[0-9]+.[0-9]+.[Xx]' ]
4+
push:
5+
paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/LICENSE', '**/NOTICE' ]
6+
branches: [ 'main', '[0-9]+.[0-9]+.[Xx]', 'v[0-9]+.[0-9]+.[Xx]' ]
7+
pull_request:
8+
paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/LICENSE', '**/NOTICE' ]
9+
# The branches below must be a subset of the branches above
10+
branches: [ 'main', '[0-9]+.[0-9]+.[Xx]', 'v[0-9]+.[0-9]+.[Xx]' ]
1111
workflow_dispatch:
1212

1313
env:
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
jdk: [ 21 ] # LTS versions only
23+
jdk: [ 25 ] # LTS versions only
2424
os: [ ubuntu-latest ]
2525
include:
2626
# - os: windows-latest

pom.xml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ under the License.
6060
</scm>
6161

6262
<issueManagement>
63-
<!-- <system>jira</system>
64-
<url>https://issues.apache.org/jira/browse/DATASKETCHES</url> -->
6563
<system>GitHub</system>
6664
<url>https://github.com/apache/${project.artifactId}/issues</url>
6765
</issueManagement>
@@ -84,8 +82,7 @@ under the License.
8482
<maven.version>3.6.3</maven.version>
8583
<java.version>25</java.version>
8684
<jvm-arguments></jvm-arguments>
87-
<maven.compiler.source>${java.version}</maven.compiler.source>
88-
<maven.compiler.target>${java.version}</maven.compiler.target>
85+
<maven.compiler.release>${java.version}</maven.compiler.release>
8986
<argLine>-Xmx4g -Duser.language=en -Duser.country=US -Dfile.encoding=UTF-8 ${jvm-arguments}</argLine>
9087
<charset.encoding>UTF-8</charset.encoding>
9188
<project.build.sourceEncoding>${charset.encoding}</project.build.sourceEncoding>
@@ -95,9 +92,9 @@ under the License.
9592

9693
<!-- org.apache.maven plugins -->
9794
<maven-assembly-plugin.version>3.7.1</maven-assembly-plugin.version>
98-
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
95+
<maven-compiler-plugin.version>3.15.0</maven-compiler-plugin.version>
9996
<maven-deploy-plugin.version>3.1.3</maven-deploy-plugin.version>
100-
<maven-enforcer-plugin.version>3.5.0</maven-enforcer-plugin.version>
97+
<maven-enforcer-plugin.version>3.6.2</maven-enforcer-plugin.version>
10198
<maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
10299
<maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
103100
<maven-javadoc-plugin.version>3.11.2</maven-javadoc-plugin.version>
@@ -145,6 +142,7 @@ under the License.
145142
<artifactId>maven-compiler-plugin</artifactId>
146143
<version>${maven-compiler-plugin.version}</version>
147144
<configuration>
145+
<fork>true</fork>
148146
<compilerArgs>
149147
<arg>${jvm-arguments}</arg>
150148
</compilerArgs>
@@ -171,9 +169,14 @@ under the License.
171169
</goals>
172170
<configuration>
173171
<rules>
174-
<requireJavaVersion>
175-
<version>[22,)</version> <!-- java.version -->
176-
</requireJavaVersion>
172+
<!-- The normal Java enforcer rule out of the box is toolchain unaware
173+
and is really only usefull for checking what java version is available
174+
via the users shell environment. It does not check that the java compiler
175+
version is sane or matches the java command version.
176+
In the context of toolchains this rule is useless.
177+
See: https://github.com/paulmoloney/maven-enforcer-toolchain-rules
178+
<requireJavaVersion> ... </requireJavaVersion>
179+
-->
177180
<requireMavenVersion>
178181
<version>[${maven.version},4.0.0)</version>
179182
</requireMavenVersion>
@@ -269,9 +272,12 @@ under the License.
269272
<version>${maven-surefire-failsafe-plugins.version}</version>
270273
<configuration>
271274
<argLine>${jvm-arguments}</argLine>
275+
<jdkToolchain>
276+
<version>${java.version}</version>
277+
</jdkToolchain>
272278
<trimStackTrace>false</trimStackTrace>
273279
<useManifestOnlyJar>false</useManifestOnlyJar>
274-
<redirectTestOutputToFile>true</redirectTestOutputToFile>
280+
<redirectTestOutputToFile>false</redirectTestOutputToFile>
275281
<reportsDirectory>${project.build.directory}/test-output/${maven.build.timestamp}</reportsDirectory>
276282
</configuration>
277283
</plugin>
@@ -372,6 +378,14 @@ under the License.
372378
</plugins>
373379
</pluginManagement>
374380
<plugins>
381+
<plugin>
382+
<groupId>org.apache.maven.plugins</groupId>
383+
<artifactId>maven-assembly-plugin</artifactId>
384+
</plugin>
385+
<plugin>
386+
<groupId>org.apache.maven.plugins</groupId>
387+
<artifactId>maven-compiler-plugin</artifactId>
388+
</plugin>
375389
<plugin>
376390
<groupId>org.apache.maven.plugins</groupId>
377391
<artifactId>maven-deploy-plugin</artifactId>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package org.apache.datasketches.memory.internal;
2+
3+
import org.testng.annotations.BeforeSuite;
4+
5+
public class A_BeforeSuite {
6+
7+
@BeforeSuite
8+
public void printTestEnvironment() {
9+
System.out.println("====================================================");
10+
System.out.println("TEST JDK: " + System.getProperty("java.version"));
11+
System.out.println("TEST JDK HOME: " + System.getProperty("java.home"));
12+
System.out.println("=====================================================");
13+
}
14+
}

0 commit comments

Comments
 (0)