-
Notifications
You must be signed in to change notification settings - Fork 819
45 lines (38 loc) · 1.49 KB
/
maven_build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
branches: [ main, mqtt5_development ]
pull_request:
branches: [ main, mqtt5_development ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-latest]
java: [11, 17]
arch: [x64] # when ARM will be present add aarch64
fail-fast: false
max-parallel: 4
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Cache maven repository
uses: actions/cache@v2
with:
path: |
~/.m2/repository
key: ${{ matrix.arch }}-${{ runner.os }}-maven-${{ matrix.java }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ matrix.arch }}-${{ runner.os }}-maven-${{ matrix.java }}
${{ matrix.arch }}-${{ runner.os }}-maven
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
architecture: ${{ matrix.arch }}
- name: Test with Maven
run: mvn verify -B --file pom.xml