Skip to content

Commit

Permalink
additional label to distinguish matrix artifacts
Browse files Browse the repository at this point in the history
Otherwise, now with Java 21 used in all configurations, we would have
conflicts for caches and uploaded artifacts
  • Loading branch information
LorenzoBettini committed Nov 26, 2024
1 parent a0c6825 commit 32d6c61
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ jobs:
os: ['ubuntu-22.04', 'macos-14', 'windows-2022']
java: [ 21 ]
additional-maven-args: ['']
additional-label: ['']
include:
- os: ubuntu-22.04
java: 21
additional-maven-args: -Pstrict-jdk-21
additional-label: -strict
fail-fast: false
runs-on: ${{ matrix.os }}

Expand All @@ -37,7 +39,7 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ matrix.java }}-${{ hashFiles('**/pom.xml', '**/*.target') }}
key: ${{ runner.os }}-m2-${{ matrix.java }}${{ matrix.additional-label }}-${{ hashFiles('**/pom.xml', '**/*.target') }}

- name: Set Maven Home environment variable
run: echo "MAVEN_WRAPPER_HOME=$(./mvnw --version | grep "Maven home:" | cut -c 13-)" >> "$GITHUB_ENV"
Expand All @@ -61,13 +63,13 @@ jobs:
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-${{ runner.os }}-${{ matrix.java }}
name: test-results-${{ runner.os }}-${{ matrix.java }}${{ matrix.additional-label }}
path: '**/*.tests/target/surefire-reports'
- name: Archive Logs
uses: actions/upload-artifact@v4
if: ${{ failure() || cancelled() }}
with:
name: logs-${{ runner.os }}-${{ matrix.java }}
name: logs-${{ runner.os }}-${{ matrix.java }}${{ matrix.additional-label }}
path: '**/*.tests/target/**/*.log'

build-maven-artifacts:
Expand Down

0 comments on commit 32d6c61

Please sign in to comment.