Skip to content

Commit

Permalink
Bump Maven v4 to alphs-13 in CI (#263)
Browse files Browse the repository at this point in the history
* Bump Maven v4 to alphs-13 in CI
* Restrict Java version for Maven v4
  • Loading branch information
abelsromero authored Apr 9, 2024
1 parent 02c4a89 commit 1547865
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 2 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/build-maven-4.yaml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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/*
3 changes: 1 addition & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
build:
name: Build
name: Build Maven 3
strategy:
fail-fast: false
max-parallel: 16
Expand All @@ -24,7 +24,6 @@ jobs:
- 21
maven:
- 3.9.6
- 4.0.0-alpha-12
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit 1547865

Please sign in to comment.