-
Notifications
You must be signed in to change notification settings - Fork 10
60 lines (60 loc) · 2.18 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
49
50
51
52
53
54
55
56
57
58
59
60
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
# We test against Java releases:
# - greater than 7
# AND
# - with LTS and in "Premier Support" phase
# OR
# - not succeeded by any other release
# No Oracle JDK >11, see
# https://blogs.oracle.com/java-platform-group/oracle-jdk-releases-for-java-11-and-later
# https://www.oracle.com/technetwork/java/java-se-support-roadmap.html
java:
# LTS and in "Premier Support" as of 2019-03 (until 2022-03)
- 8
# LTS and in "Premier Support" as of 2019-03 (until 2023-09)
- 11
# LTS as of 2021-11 (until 2029)
- 17
os: [ubuntu, windows]
env:
# We only post coverage data for exactly one build to coveralls.
# To pick that build from the build matrix, we designate one
# Java version to be the "main" one.
MAIN_JAVA: 11
# We only post coverage data for exactly one build to coveralls.
# To pick that build from the build matrix, we designate one
# OS to be the "main" one.
MAIN_OS: ubuntu
steps:
# See https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
# See https://github.com/marketplace/actions/gradle-wrapper-validation
- uses: gradle/wrapper-validation-action@v1
# See https://github.com/marketplace/actions/setup-java-jdk
- uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
# See https://github.com/marketplace/actions/gradle-build-action
- uses: gradle/gradle-build-action@v2
with:
arguments: build --stacktrace
- uses: gradle/gradle-build-action@v2
if: matrix.os == env.MAIN_OS && matrix.java == env.MAIN_JAVA
continue-on-error: true
with:
arguments: jacocoTestReport coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
- uses: codecov/codecov-action@v1
if: matrix.os == env.MAIN_OS && matrix.java == env.MAIN_JAVA
continue-on-error: true