From 005a9a353a04874c95586c7c734871d8955b1bfd Mon Sep 17 00:00:00 2001 From: Divyanshu Singh Date: Thu, 29 Oct 2026 16:03:13 +0530 Subject: [PATCH] ci(java): run Java 11 and 17 builds in parallel with matrix strategy Split the Java 17 workflow into a matrix for Java 11 and Java 17. Run Checkstyle once in a dedicated Java 17 job and skip the lifecycle-bound Checkstyle execution in the matrix builds to avoid redundant work. Closes #1331. --- .github/workflows/java.yml | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index 7739489cb..6140afbc5 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -28,9 +28,9 @@ permissions: contents: read jobs: - build-java: + style-check: runs-on: ubuntu-24.04 - name: Build + name: Style Check defaults: run: working-directory: ./java @@ -45,5 +45,24 @@ jobs: cache: "maven" - name: Java Style Check run: ./mvnw checkstyle:check + + build-java: + runs-on: ubuntu-24.04 + name: Build (Java ${{ matrix.java-version }}) + strategy: + matrix: + java-version: [11, 17] + defaults: + run: + working-directory: ./java + steps: + - name: Checkout repository + uses: actions/checkout@v6 + - name: Set up Java ${{ matrix.java-version }} + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: ${{ matrix.java-version }} + cache: "maven" - name: Build and install - run: ./mvnw clean install + run: ./mvnw clean install -Dcheckstyle.skip=true