From 15478656565d65e5e06ff7c2492995a307e9677b Mon Sep 17 00:00:00 2001 From: Abel Salgado Romero Date: Tue, 9 Apr 2024 21:06:41 +0200 Subject: [PATCH] Bump Maven v4 to alphs-13 in CI (#263) * Bump Maven v4 to alphs-13 in CI * Restrict Java version for Maven v4 --- .github/workflows/build-maven-4.yaml | 78 ++++++++++++++++++++++++++++ .github/workflows/build.yaml | 3 +- 2 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build-maven-4.yaml diff --git a/.github/workflows/build-maven-4.yaml b/.github/workflows/build-maven-4.yaml new file mode 100644 index 0000000..edcc8f5 --- /dev/null +++ b/.github/workflows/build-maven-4.yaml @@ -0,0 +1,78 @@ +name: Build +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + name: Build Maven 4 + strategy: + fail-fast: false + max-parallel: 16 + matrix: + os: + - ubuntu-latest + - windows-latest + - macos-latest + java: + - 17 + - 21 + maven: + - 4.0.0-alpha-13 + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + - uses: s4u/setup-maven-action@v1.12.0 + with: + java-distribution: 'temurin' + java-version: ${{ matrix.java }} + maven-version: ${{ matrix.maven }} + - name: Cache dependencies + uses: actions/cache@v4 + env: + java_version: ${{ matrix.java }} + with: + path: ~/.m2/repository + key: mvn-cache-${{ runner.os }}-${{ env.java_version }} + restore-keys: mvn-cache-${{ runner.os }}-${{ env.java_version }} + - name: Install Graphviz (Linux) + if: matrix.os == 'ubuntu-latest' + run: sudo apt install graphviz + - name: Install Graphviz (Win) + if: matrix.os == 'windows-latest' + run: choco install graphviz --no-progress + - name: Install Graphviz (macOS) + if: matrix.os == 'macos-latest' + run: brew install graphviz + - name: Environment + run: mvn -version + - name: Clean all modules + run: mvn -B clean + - name: Set MAVEN_HOME and Test (Windows) + if: matrix.os == 'windows-latest' + run: | + set MAVEN_HOME="$(which mvn)" + echo "MAVEN_HOME: $MAVEN_HOME" + mvn -B test -pl tests + - name: Set MAVEN_HOME and Test + if: matrix.os != 'windows-latest' + run: | + export MAVEN_HOME="$(which mvn)" + echo "MAVEN_HOME: $MAVEN_HOME" + mvn -B test -pl tests + - name: Upload test output + uses: actions/upload-artifact@v4 + env: + os_name: ${{ matrix.os }} + java_version: ${{ matrix.java }} + maven_version: ${{ matrix.maven }} + if: always() + with: + name: tests-output-${{ env.os_name }}-${{ env.java_version }}-${{ env.maven_version }} + path: tests/target/* diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7a066a4..de07760 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -9,7 +9,7 @@ on: jobs: build: - name: Build + name: Build Maven 3 strategy: fail-fast: false max-parallel: 16 @@ -24,7 +24,6 @@ jobs: - 21 maven: - 3.9.6 - - 4.0.0-alpha-12 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4