Skip to content

Commit 719b6e5

Browse files
committed
Add Github Action workflow to support matrix builds
* support for building cf-java-client with Java 8, 11, 17, and 21
1 parent 32830ee commit 719b6e5

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/maven.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Java CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
java: [ 8, 11, 17, 21 ]
11+
name: Java ${{ matrix.java }} build
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Prepare multi-module build
15+
run: |
16+
git submodule update --init --recursive
17+
- name: Set up Java
18+
uses: actions/setup-java@v3
19+
with:
20+
distribution: liberica
21+
java-version: ${{ matrix.java }}
22+
- name: Cache Maven packages
23+
uses: actions/cache@v3
24+
with:
25+
path: ~/.m2
26+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
27+
restore-keys: ${{ runner.os }}-m2
28+
- name: Build with Maven
29+
run: ./mvnw clean install -Dgpg.skip
30+

0 commit comments

Comments
 (0)