From 4a3288ed8a3d8bb9f8553beb97ea6712402ce7f5 Mon Sep 17 00:00:00 2001 From: David Kornel Date: Tue, 14 May 2024 12:42:10 +0200 Subject: [PATCH] Run build in matrix mode with more java jdk versions Signed-off-by: David Kornel --- .github/workflows/build.yaml | 15 +++++++++------ .github/workflows/publish-release.yaml | 6 +++--- .github/workflows/publish-snapshot.yaml | 6 +++--- .github/workflows/verify.yaml | 4 ++-- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2c9714d..0f9cf56 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -9,21 +9,24 @@ on: jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + version: [17, 21] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: '17' + java-version: ${{ matrix.version }} - name: Cache m2 repo - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + key: ${{ runner.os }}-${{ matrix.version }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | - ${{ runner.os }}-maven- + ${{ runner.os }}-${{ matrix.version }}-maven- - name: Build run: mvn --batch-mode install diff --git a/.github/workflows/publish-release.yaml b/.github/workflows/publish-release.yaml index cb5a1c3..96acda7 100644 --- a/.github/workflows/publish-release.yaml +++ b/.github/workflows/publish-release.yaml @@ -9,9 +9,9 @@ jobs: publish-release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: '17' @@ -19,7 +19,7 @@ jobs: settings-path: ${{ github.workspace }} - name: Cache m2 repo - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/publish-snapshot.yaml b/.github/workflows/publish-snapshot.yaml index 1caa2f0..dc5a07b 100644 --- a/.github/workflows/publish-snapshot.yaml +++ b/.github/workflows/publish-snapshot.yaml @@ -8,9 +8,9 @@ jobs: publish-snapshot: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: '17' @@ -30,7 +30,7 @@ jobs: ]' - name: Cache m2 repo - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} diff --git a/.github/workflows/verify.yaml b/.github/workflows/verify.yaml index 809040e..0a86008 100644 --- a/.github/workflows/verify.yaml +++ b/.github/workflows/verify.yaml @@ -8,9 +8,9 @@ jobs: verify: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: '17'