generated from Kantis/kotlin-template
-
Notifications
You must be signed in to change notification settings - Fork 4
124 lines (103 loc) · 3.43 KB
/
ci.yaml
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: build
on:
pull_request:
push:
paths-ignore:
- "doc/**"
- "documentation/**"
- "*.yml"
branches:
- "main"
- "release/*"
tags:
- "v**"
workflow_dispatch:
release:
types: [ published ]
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true
jobs:
linux-tests:
name: "./gradlew ${{ matrix.target }} @ ${{ matrix.os }}"
strategy:
matrix:
os: [ ubuntu-latest ]
target:
- apiCheck -Pks3_enableKotlinNative=true -Pks3_enableKotlinJs=true
- jvmTest
- jsTest
- linuxX64Test
# - jsLegacyBrowserTest
# - jsLegacyNodeTest
# - jsLegacyTest
# - jsIrBrowserTest
# - jsIrNodeTest
uses: ./.github/workflows/gradle_task.yml
with:
runs-on: ${{ matrix.os }}
gradle-task: ${{ matrix.target }} --stacktrace
macos-tests:
name: "./gradlew ${{ matrix.target }} @ ${{ matrix.os }}"
strategy:
matrix:
os: [ macos-latest ]
target:
- iosSimulatorArm64Test
- iosX64Test
- macosArm64Test
- macosX64Test
- tvosSimulatorArm64Test
- tvosX64Test
- watchosSimulatorArm64Test
- watchosX64Test
uses: ./.github/workflows/gradle_task.yml
with:
runs-on: ${{ matrix.os }}
gradle-task: ${{ matrix.target }} --stacktrace
windows-tests:
name: "./gradlew ${{ matrix.target }} @ ${{ matrix.os }}"
strategy:
matrix:
os: [ windows-latest ]
target:
- mingwX64Test
uses: ./.github/workflows/gradle_task.yml
with:
runs-on: ${{ matrix.os }}
gradle-task: ${{ matrix.target }} --stacktrace
gradle-check:
name: "./gradlew check @ ${{ matrix.os }}"
needs: [ linux-tests, macos-tests, windows-tests ]
# Run 'check' task for each OS.
# To improve speed, only enable Kotlin/JVM (Kotlin/Native is particularly slow).
# The other targets are tested individually above.
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
uses: ./.github/workflows/gradle_task.yml
with:
runs-on: ${{ matrix.os }}
gradle-task: check --stacktrace -Pks3_enableKotlinNative=false -Pks3_enableKotlinJs=false
docs:
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v4
with:
fetch-depth: 1 # Checkout the code. No need of tags and whole history.
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Build docs
run: ./gradlew dokkatooGeneratePublicationHtml --no-configuration-cache --no-build-cache --rerun-tasks
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/dokka/html/