diff --git a/.github/workflows/auto-jdk-matrix.yml b/.github/workflows/auto-jdk-matrix.yml
deleted file mode 100644
index 2fb44a079..000000000
--- a/.github/workflows/auto-jdk-matrix.yml
+++ /dev/null
@@ -1,75 +0,0 @@
-name: Auto JDK Matrix Test & Install
-
-on:
- push:
- branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
- pull_request:
- paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/LICENSE', '**/NOTICE' ]
- # The branches below must be a subset of the branches above
- branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
- workflow_dispatch:
-
-env:
- MAVEN_OPTS: -Xmx4g -Xms1g
-
-jobs:
- build:
- name: Build, Test, Install
- runs-on: ubuntu-latest
-
- strategy:
- fail-fast: false
- matrix:
- jdk: [ 25 ]
-
- env:
- JDK_VERSION: ${{ matrix.jdk }}
-
- steps:
- - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
- uses: actions/checkout@v5
- with:
- persist-credentials: false
-
- - name: Print Current workflow
- run: >
- cat .github/workflows/auto-jdk-matrix.yml
-
- - name: Cache local Maven repository
- uses: actions/cache@v4
- with:
- path: ~/.m2/repository
- key: build-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- restore-keys: build-${{ runner.os }}-maven-
-
- - name: Install Matrix JDK
- uses: actions/setup-java@v5
- with:
- java-version: ${{ matrix.jdk }}
- distribution: 'temurin'
- java-package: jdk
- architecture: x64
-
- - name: Echo Java Version
- run: >
- java -version
-
- - name: Test
- run: >
- mvn clean test -B
- -Dmaven.javadoc.skip=true
- -Dgpg.skip=true
-
- - name: Install
- run: >
- mvn clean install -B
- -DskipTests=true
- -Dgpg.skip=true
-
-# Architecture options: x86, x64, armv7, aarch64, ppc64le
-# setup-java@v5 has a "with cache" option
-# Lifecycle: validate, compile, test, package, verify, install, deploy
-# -B batch mode, never stops for user input
-# -V show Version without stopping
-# -X debug mode
-# -q quiet, only show errors
diff --git a/.github/workflows/auto-jdk-os-matrix.yml b/.github/workflows/auto-jdk-os-matrix.yml
new file mode 100644
index 000000000..79188c5a2
--- /dev/null
+++ b/.github/workflows/auto-jdk-os-matrix.yml
@@ -0,0 +1,92 @@
+name: JDK & OS Matrix Test
+
+on:
+ push:
+ paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/LICENSE', '**/NOTICE' ]
+ branches: [ 'main', '[0-9]+.[0-9]+.[Xx]', 'v[0-9]+.[0-9]+.[Xx]']
+ pull_request:
+ paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/LICENSE', '**/NOTICE' ]
+ branches: [ 'main', '[0-9]+.[0-9]+.[Xx]', 'v[0-9]+.[0-9]+.[Xx]']
+ workflow_dispatch:
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+permissions:
+ contents: read
+
+jobs:
+ # PHASE 1: Replicate command-line compilation exactly
+ build-artifacts:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout Source Code
+ uses: actions/checkout@v7
+
+ - name: Install Build JDKs for Subproject Toolchains
+ uses: actions/setup-java@v5
+ with:
+ java-version: |
+ 25
+ distribution: 'temurin'
+ cache: 'maven'
+
+ # Builds the isolated modules using their respective toolchains
+ - name: Package All Versioned JARs
+ run: mvn clean package -DskipTests=true -B
+
+ # Archive the compiled artifacts and skeletal structure for Phase 2 testing
+ - name: Archive Compiled Workspace
+ uses: actions/upload-artifact@v7
+ with:
+ name: compiled-jars
+ path: |
+ pom.xml
+ **/pom.xml
+ **/target/*.jar
+ **/src/test/resources/
+
+# PHASE 2: Run isolated target matrix tests against the JARs
+ matrix-test:
+ needs: build-artifacts # <--- THIS makes Phase 2 flow sequentially after Phase 1
+ strategy:
+ fail-fast: false
+ matrix:
+ jdk: [ '25' ]
+ os: [ windows-latest, ubuntu-latest, macos-latest ]
+ include:
+ - os: windows-latest
+ arch: x64
+ - os: ubuntu-latest
+ arch: x64
+ - os: macos-latest
+ arch: aarch64
+
+# - jdk: '17'
+# distribution: 'temurin'
+# jvm_args: >-
+# --add-exports java.base/jdk.internal.misc=ALL-UNNAMED
+# --add-exports java.base/jdk.internal.ref=ALL-UNNAMED
+
+# - jdk: '21'
+# distribution: 'temurin'
+# jvm_args: >-
+# --add-exports java.base/jdk.internal.misc=ALL-UNNAMED
+# --add-exports java.base/jdk.internal.ref=ALL-UNNAMED
+
+ - jdk: '25'
+ distribution: 'temurin'
+ jvm_args: ""
+# jvm_args: >-
+# --add-exports java.base/jdk.internal.misc=ALL-UNNAMED
+# --add-exports java.base/jdk.internal.ref=ALL-UNNAMED
+
+ # Reference your reusable workflow branch
+ uses: apache/datasketches-java/.github/workflows/reusable-jdk-os-matrix.yml@reusable_workflows
+ with:
+ jdk_version: ${{ matrix.jdk }}
+ os_type: ${{ matrix.os }}
+ cpu_arch: ${{ matrix.arch }}
+ jdk_distribution: ${{ matrix.distribution }}
+ jvm_args: ${{ matrix.jvm_args }}
diff --git a/.github/workflows/auto-os-matrix.yml b/.github/workflows/auto-os-matrix.yml
deleted file mode 100644
index 0cc35c951..000000000
--- a/.github/workflows/auto-os-matrix.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-name: Auto OS Matrix Test & Install
-
-on:
- push:
- paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/LICENSE', '**/NOTICE' ]
- branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
- pull_request:
- paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/LICENSE', '**/NOTICE' ]
- # The branches below must be a subset of the branches above
- branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
- workflow_dispatch:
-
-env:
- MAVEN_OPTS: -Xmx4g -Xms1g
-
-jobs:
- build:
- name: Build, Test, Install
-
- strategy:
- fail-fast: false
-
- matrix:
- jdk: [ 25 ]
- os: [ windows-latest, ubuntu-latest, macos-latest ]
- include:
- - os: windows-latest
- skip_javadoc: "`-Dmaven`.javadoc`.skip=true"
- skip_gpg: "`-Dgpg`.skip=true"
- - os: ubuntu-latest
- skip_javadoc: -Dmaven.javadoc.skip=true
- skip_gpg: -Dgpg.skip=true
- - os: macos-latest
- skip_javadoc: -Dmaven.javadoc.skip=true
- skip_gpg: -Dgpg.skip=true
-
- runs-on: ${{matrix.os}}
-
- env:
- JDK_VERSION: ${{ matrix.jdk }}
-
- steps:
- - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
- uses: actions/checkout@v5
- with:
- persist-credentials: false
-
- - name: Cache local Maven repository
- uses: actions/cache@v4
- with:
- path: ~/.m2/repository
- key: build-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- restore-keys: build-${{ runner.os }}-maven-
-
- - name: Install Matrix JDK
- uses: actions/setup-java@v5
- with:
- java-version: ${{ matrix.jdk }}
- distribution: 'temurin'
- java-package: jdk
- architecture: x64
-
- - name: Echo Java Version
- run: >
- java -version
-
- - name: Test
- run: >
- mvn clean test
- ${{matrix.os.skip_javadoc}}
- ${{matrix.os.skip_gpg}}
-
- - name: Install
- run: >
- mvn clean install -B
- ${{matrix.os.skip_javadoc}}
- -D skipTests=true
- ${{matrix.os.skip_gpg}}
-
-# Architecture options: x86, x64, armv7, aarch64, ppc64le
-# setup-java@v4 has a "with cache" option
-# Lifecycle: validate, compile, test, package, verify, install, deploy
-# -B batch mode
-# -V show Version without stopping
-# -q quiet, only show errors
diff --git a/pom.xml b/pom.xml
index db8026352..1e57fec8d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -150,6 +150,7 @@ under the License.
1.0.0
+
@@ -327,7 +328,7 @@ under the License.
maven-surefire-plugin
${maven-surefire-failsafe-plugins.version}
- @{argLine} @{jvm.args}
+ @{argLine} ${jvm.args}
false
false
false