-
Notifications
You must be signed in to change notification settings - Fork 5
91 lines (77 loc) · 2.61 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Main Continuous Integration workflow
name: Build
on:
push:
branches:
- master
- feature_*
- bugfix_*
pull_request:
branches:
- master
- feature_*
- bugfix_*
jobs:
build:
strategy:
matrix:
java: ["17"]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} - JDK ${{ matrix.java }}
steps:
- name: Support long paths for Windows
if: ${{ matrix.os == 'windows-latest' }}
run: git config --system core.longpaths true
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache Gradle caches
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ matrix.java }}-${{ matrix.os }}-gradle-caches-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ matrix.java }}-${{ matrix.os }}-gradle-caches-
- name: Cache Gradle wrapper
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ matrix.java }}-${{ matrix.os }}-gradle-wrapper-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ matrix.java }}-${{ matrix.os }}-gradle-wrapper-
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v2
with:
distribution: zulu
java-version: ${{ matrix.java }}
- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: clean build
- name: JaCoCo Coverage Report
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: gradle/gradle-build-action@v2
with:
arguments: jacocoTestReport testCodeCoverageReport
- name: Publish JaCoCo Coverage Report
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v2
with:
name: Aggregated JaCoCo Report
files: build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml
- name: Aggregate Javadoc
if: ${{ matrix.os == 'ubuntu-latest' && github.ref == 'refs/heads/master' && github.event_name == 'push' }}
uses: gradle/gradle-build-action@v2
with:
arguments: aggregateJavadoc
- name: Deploy Javadoc to GitHub Pages
if: ${{ matrix.os == 'ubuntu-latest' && github.ref == 'refs/heads/master' && github.event_name == 'push' }}
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: build/docs/aggregateJavadoc
target-folder: docs
clean: true
single-commit: true