Skip to content

Commit 1f37c2f

Browse files
Add GitHub Actions build.yml to run Maven in CI
1 parent 328bbd2 commit 1f37c2f

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/build.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
java: [8, 11, 14]
11+
os: [ubuntu-latest, macos-latest, windows-latest]
12+
name: Java ${{ matrix.java }}
13+
steps:
14+
- uses: actions/checkout@v2
15+
with:
16+
submodules: true
17+
- name: Set up java
18+
uses: actions/setup-java@v1
19+
with:
20+
java-version: ${{ matrix.java }}
21+
- name: Cache Maven packages
22+
uses: actions/cache@v2
23+
with:
24+
path: ~/.m2
25+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
26+
restore-keys: ${{ runner.os }}-m2
27+
- name: Build with Maven
28+
run: mvn -B package

0 commit comments

Comments
 (0)