From b593cb3ab5d4d37160366659ff3c5eb699f7e493 Mon Sep 17 00:00:00 2001 From: Johannes Link Date: Sun, 12 Nov 2023 11:57:35 +0100 Subject: [PATCH] Ensure that each enumerated java version is used once per GH build action --- .github/workflows/gradle.yml | 2 +- .github/workflows/matrix.js | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 33ba97a88..32c712f9a 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -23,7 +23,7 @@ jobs: outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} env: - MATRIX_JOBS: 4 + MATRIX_JOBS: 5 steps: - uses: actions/checkout@v4 - id: set-matrix diff --git a/.github/workflows/matrix.js b/.github/workflows/matrix.js index fc5b7fb9a..e4b781ccb 100644 --- a/.github/workflows/matrix.js +++ b/.github/workflows/matrix.js @@ -91,10 +91,12 @@ matrix.exclude({java_distribution: 'microsoft', java_version: '20'}); matrix.exclude({java_distribution: 'oracle', java_version: ['8', '11', '19']}); // Ensure there will be at least one job with minimal supported Java -matrix.generateRow({java_version: matrix.axisByName.java_version.values[0]}); - +// matrix.generateRow({java_version: matrix.axisByName.java_version.values[0]}); // Ensure there will be at least one job with the latest Java -matrix.generateRow({java_version: matrix.axisByName.java_version.values.slice(-1)[0]}); +// matrix.generateRow({java_version: matrix.axisByName.java_version.values.slice(-1)[0]}); + +// Ensure there will be at least one job with all enumerated Java versions +matrix.axisByName.java_version.values.forEach(v => matrix.generateRow({java_version: v})); // Ensure at least one Windows and at least one Linux job is present (macOS is almost the same as Linux) matrix.generateRow({os: 'windows-latest'});