This is an automated email from the ASF dual-hosted git repository.
leerho pushed a commit to branch reusable_workflows
in repository https://gitbox.apache.org/repos/asf/datasketches-java.git
The following commit(s) were added to refs/heads/reusable_workflows by this
push:
new 7592d5d05 add reusable-jdk-os-matrix.yml
7592d5d05 is described below
commit 7592d5d05b6a6d6d808f5485efc71b12159516ae
Author: Lee Rhodes <[email protected]>
AuthorDate: Tue Mar 3 14:25:55 2026 -0800
add reusable-jdk-os-matrix.yml
---
.github/workflows/reusable-jdk-os-matrix.yml | 89 ++++++++++++++++++++++++++++
1 file changed, 89 insertions(+)
diff --git a/.github/workflows/reusable-jdk-os-matrix.yml
b/.github/workflows/reusable-jdk-os-matrix.yml
new file mode 100644
index 000000000..05be7b905
--- /dev/null
+++ b/.github/workflows/reusable-jdk-os-matrix.yml
@@ -0,0 +1,89 @@
+name: Reusable JDK OS Matrix Logic
+
+on:
+ workflow_call:
+ inputs:
+ jdk_version:
+ required: true
+ type: string
+ os_type:
+ required: true
+ type: string
+ java_arch:
+ required: true
+ type: string
+
+env:
+ MAVEN_OPTS: -Xmx4g -Xms1g
+ MAVEN_ARGS: "-B -Dmaven.javadoc.skip=true -Dgpg.skip=true"
+
+jobs:
+ build:
+ name: Build (${{ inputs.os_type }}, JDK ${{ inputs.jdk_version }}, ${{
inputs.java_arch }})
+ runs-on: ${{ inputs.os_type }}
+ steps:
+ - name: Checkout Source code
+ uses: actions/checkout@v4
+ with:
+ persist-credentials: false
+
+ - name: Checkout Workflow Logic (workflows branch)
+ uses: actions/checkout@v4
+ with:
+ ref: workflows
+ path: .github/workflow-logic
+
+ - name: Install Matrix JDK
+ uses: actions/setup-java@v4
+ with:
+ java-version: ${{ inputs.jdk_version }}
+ distribution: 'temurin'
+ java-package: jdk
+ architecture: ${{ inputs.java_arch }}
+ cache: 'maven'
+ overwrite-settings: true
+
+ - name: Verify Toolchain Configuration
+ shell: bash
+ run: |
+ if [ -f ~/.m2/toolchains.xml ]; then
+ cat ~/.m2/toolchains.xml
+ else
+ echo "toolchains.xml not found in ~/.m2/"
+ fi
+
+ - name: Echo Java & Maven Version
+ run: mvn -version
+
+ - name: Print Current Workflows
+ continue-on-error: true
+ run: |
+ echo "Checking for workflow files..."
+ echo "--- Reusable Workflow: ---"
+ cat
.github/workflow-logic/.github/workflows/reusable-jdk-os-matrix.yml || echo
"::warning::Could not find Reusable Workflow file."
+ echo "--- Caller Workflow: ---"
+ cat .github/workflows/auto-jdk-os-matrix.yml || echo
"::warning::Could not find Caller Workflow file."
+
+ - name: Test
+ run: mvn clean test
+
+ - name: Install
+ run: mvn clean install "-DskipTests=true"
"-Dmaven.clean.failOnError=false"
+
+ - name: Add Result to Summary
+ if: always()
+ shell: bash
+ run: |
+ # Define the header
+ HEADER="| OS | Arch | JDK | Status |"
+ SEP="|----|------|-----|--------|"
+
+ # Check if the header already exists in the summary file
+ if ! grep -q "$HEADER" "$GITHUB_STEP_SUMMARY"; then
+ echo "$HEADER" >> $GITHUB_STEP_SUMMARY
+ echo "$SEP" >> $GITHUB_STEP_SUMMARY
+ fi
+
+ # Append the specific job row
+ echo "| ${{ inputs.os_type }} | ${{ inputs.java_arch }} | ${{
inputs.jdk_version }} | ${{ job.status == 'success' && '✅' || '❌' }} |" >>
$GITHUB_STEP_SUMMARY
+
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]