-
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 1.31 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
name: build
on:
push:
branches:
- develop
- master
pull_request:
branches:
- develop
- master
jobs:
build:
strategy:
fail-fast: false
matrix:
# baseline version
java: [22]
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
include:
# latest version
- java: 23
os: ubuntu-latest
runs-on: ${{ matrix.os }}
name: Build on ${{ matrix.os }} on Java ${{ matrix.java }}
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: oracle
java-version: ${{ matrix.java }}
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Build with Gradle
run: |
./gradlew --no-daemon -s :build
- name: Upload coverage to Codecov
if: ${{ matrix.java == '22' && matrix.os == 'ubuntu-latest' }}
uses: codecov/[email protected]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Save reports
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: reports-${{ matrix.os }}-${{ matrix.java }}
path: build/reports/