-
Notifications
You must be signed in to change notification settings - Fork 15
93 lines (78 loc) · 2.16 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
92
93
name: Build
on:
pull_request: {}
workflow_dispatch: {}
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
matrix:
include:
- platform: jvm
os: ubuntu-latest
- platform: js
os: ubuntu-latest
- platform: linuxX64
os: ubuntu-latest
- platform: macosX64
os: macos-latest
- platform: mingwX64
os: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 20
- name: Build and Test (multip)
uses: gradle/gradle-build-action@v3
with:
arguments: buildAndTestMultip -Pplatform=${{ matrix.platform }}
- name: Build and Test (singlep)
uses: gradle/gradle-build-action@v3
with:
arguments: buildAndTestSinglep -Pplatform=${{ matrix.platform }}
if: ${{ matrix.platform == 'jvm' }}
- name: Upload reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: 'reports'
path: '**/build/reports/**'
spotless:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 20
- name: Spotless Apply
uses: gradle/gradle-build-action@v3
with:
arguments: spotlessApply
- name: Commit newly formatted files
uses: stefanzweifel/git-auto-commit-action@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commit_message: "Apply spotless formatting"
commit_options: '--no-verify'
file_pattern: '**/*.kt'
commit_user_name: "GitHub Actions"