-
Notifications
You must be signed in to change notification settings - Fork 399
146 lines (139 loc) · 4.32 KB
/
examples-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
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: Build examples
on:
pull_request:
paths:
- 'examples/**'
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
projects: [
examples/gradle/dokka-gradle-example,
examples/gradle/dokka-kotlinAsJava-example,
examples/gradle/dokka-library-publishing-example,
examples/gradle/dokka-multimodule-example,
examples/gradle/dokka-multiplatform-example,
examples/gradle/dokka-customFormat-example
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
examples_changed:
- '${{ matrix.projects }}/**'
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
cache: 'maven'
- uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
- run: ./gradlew build --no-daemon --stacktrace
working-directory: ${{ matrix.projects }}
if: steps.filter.outputs.examples_changed == 'true'
run-dokka-html:
strategy:
matrix:
projects: [
examples/gradle/dokka-gradle-example,
examples/gradle/dokka-kotlinAsJava-example,
examples/gradle/dokka-library-publishing-example,
examples/gradle/dokka-multiplatform-example,
examples/gradle/dokka-customFormat-example
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
examples_changed:
- '${{ matrix.projects }}/**'
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
cache: 'maven'
- uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
- run: ./gradlew dokkaHtml --no-daemon --stacktrace
working-directory: ${{ matrix.projects }}
if: steps.filter.outputs.examples_changed == 'true'
run-dokka-publishing:
strategy:
matrix:
tasks: [ dokkaJavadocJar, dokkaHtmlJar ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
examples_changed:
- 'examples/gradle/dokka-library-publishing-example/**'
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
cache: 'maven'
- uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
- run: ./gradlew ${{ matrix.tasks }} --no-daemon --stacktrace
working-directory: examples/gradle/dokka-library-publishing-example
if: steps.filter.outputs.examples_changed == 'true'
run-dokka-gradle-tasks:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- task: "dokkaHtmlMultiModule"
dir: "examples/gradle/dokka-multimodule-example"
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
examples_changed:
- '${{ matrix.dir }}/**'
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
cache: 'maven'
- uses: gradle/gradle-build-action@v2
with:
gradle-home-cache-cleanup: true
- run: ./gradlew ${{ matrix.task }} --no-daemon --stacktrace
working-directory: ${{ matrix.dir }}
if: steps.filter.outputs.examples_changed == 'true'
run-dokka-maven-example:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
examples_changed:
- 'examples/maven/**'
working-directory: examples/maven
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
cache: 'maven'
- run: mvn compile dokka:dokka
working-directory: examples/maven
if: steps.filter.outputs.examples_changed == 'true'