-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (41 loc) · 1.2 KB
/
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
45
46
47
48
# vim:ai et ts=2 sts=2 sw=2:
name: Build
on:
pull_request:
push:
branches:
- 'master'
jobs:
build:
name: Build (Java ${{ matrix.java-version }})
runs-on: ubuntu-latest
strategy:
# We need multiple builds to run even if the 1st one is failing, because
# test failures may be Java-specific (or the tests themselves flaky).
fail-fast: false
matrix:
java-version: [ '8', '11', '17' ]
# A possible workaround for <https://github.com/dorny/test-reporter/issues/168>.
permissions:
checks: write
contents: write
pull-requests: write
statuses: write
steps:
- uses: actions/checkout@v3
- name: Set up Java ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ${{ matrix.java-version }}
java-package: jdk
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: maven-build-${{ hashFiles('**/pom.xml') }}
restore-keys: |
maven-build-
- name: Maven build
run: mvn -B -Dstyle.color=always clean package
shell: bash