Skip to content

Commit 812c2ab

Browse files
authored
ci: add github actions build matrix (#25)
Signed-off-by: Sam Spycher <samspycher@users.noreply.github.com>
1 parent 231f826 commit 812c2ab

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

.github/workflows/mvn.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on: [push]
55
jobs:
66
build:
77
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: true
10+
matrix:
11+
java: [8, 16] # Define matrix for Java versions
12+
813
steps:
914
- uses: actions/checkout@v4
1015
with:
@@ -22,22 +27,22 @@ jobs:
2227
key: ${{ runner.os }}-parsec_docker_cache-${{ github.sha }}
2328
restore-keys: |
2429
${{ runner.os }}-parsec_docker_cache-
25-
- name: Set up JDK 16
26-
uses: actions/setup-java@v4
27-
with:
28-
java-version: "16"
29-
distribution: "zulu"
30-
architecture: x64
31-
cache: maven
32-
- name: Build with Maven
33-
# still needs work to get tests running on java 16
34-
run: ./mvnw --batch-mode clean verify -DskipTests=true
35-
- name: Set up JDK 8
30+
31+
# Use the matrix variable to set up the correct JDK
32+
- name: Set up JDK ${{ matrix.java }}
3633
uses: actions/setup-java@v4
3734
with:
38-
java-version: "8"
35+
java-version: ${{ matrix.java }}
3936
distribution: "zulu"
4037
architecture: x64
4138
cache: maven
42-
- name: Build with Maven
39+
40+
# Run tests only for Java 8
41+
- name: Maven build with Java 8 - includes tests
42+
if: matrix.java == '8'
4343
run: ./mvnw --batch-mode clean verify
44+
45+
# Skip tests for Java 16
46+
- name: Maven build with Java 16 - skips tests
47+
if: matrix.java == '16'
48+
run: ./mvnw --batch-mode clean verify -DskipTests=true # still needs work to get tests running on java 16

0 commit comments

Comments
 (0)