-
Notifications
You must be signed in to change notification settings - Fork 566
302 lines (297 loc) · 8.43 KB
/
validate.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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
# Notes
# - cannot run on Windows, as we use shell scripts
# - removed macos from most jobs to speed up the process
name: "Validate"
on:
pull_request:
push:
branches-ignore: [ 'main', 'helidon-*.x' ]
workflow_call:
env:
JAVA_VERSION: '21'
JAVA_DISTRO: 'oracle'
HELIDON_PIPELINES: 'true'
MAVEN_ARGS: |
-Dmaven.wagon.httpconnectionManager.ttlSeconds=60
-Dmaven.wagon.http.retryHandler.count=3
concurrency:
group: Validate-${{ github.ref }}
cancel-in-progress: true
jobs:
copyright:
timeout-minutes: 10
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/[email protected]
with:
distribution: ${{ env.JAVA_DISTRO }}
java-version: ${{ env.JAVA_VERSION }}
cache: maven
- name: Copyright
run: etc/scripts/copyright.sh
checkstyle:
timeout-minutes: 10
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/[email protected]
with:
distribution: ${{ env.JAVA_DISTRO }}
java-version: ${{ env.JAVA_VERSION }}
cache: maven
- name: Checkstyle
run: etc/scripts/checkstyle.sh
shellcheck:
timeout-minutes: 5
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: ShellCheck
run: etc/scripts/shellcheck.sh
spotbugs:
timeout-minutes: 45
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/[email protected]
with:
distribution: ${{ env.JAVA_DISTRO }}
java-version: ${{ env.JAVA_VERSION }}
cache: maven
- name: Spotbugs
run: |
mvn ${MAVEN_ARGS} -e \
-DskipTests \
-Dmaven.test.skip=true \
-Pspotbugs,pipeline \
install
docs:
timeout-minutes: 30
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/[email protected]
with:
distribution: ${{ env.JAVA_DISTRO }}
java-version: ${{ env.JAVA_VERSION }}
cache: maven
- name: Docs
run: |
mvn ${MAVEN_ARGS} -e \
-Dmaven.test.skip=true \
-DskipTests \
-Ppipeline \
install
mvn ${MAVEN_ARGS} -e \
-f docs/pom.xml \
-Pjavadoc \
install
build:
timeout-minutes: 60
strategy:
matrix:
os: [ ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/[email protected]
with:
distribution: ${{ env.JAVA_DISTRO }}
java-version: ${{ env.JAVA_VERSION }}
cache: maven
- name: Maven build
run: |
mvn ${MAVEN_ARGS} -e \
-Dmaven.test.failure.ignore=false \
-Pjavadoc,sources,tests,pipeline \
install
examples:
timeout-minutes: 40
strategy:
matrix:
os: [ ubuntu-20.04, macos-14 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/[email protected]
with:
distribution: ${{ env.JAVA_DISTRO }}
java-version: ${{ env.JAVA_VERSION }}
cache: maven
- uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
distribution: graalvm-community
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: true
cache: maven
- name: Maven build
run: |
# prime build
mvn ${MAVEN_ARGS} -e \
-Dmaven.test.skip=true \
-DskipTests \
-Ppipeline \
install
- name: Examples checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
repository: helidon-io/helidon-examples.git
ref: dev-4.x
path: helidon-examples
- name: Examples build
run: etc/scripts/build-examples.sh
- name: Test quickstarts native image
run: etc/scripts/test-quickstarts.sh
mp-tck:
timeout-minutes: 60
name: "MicroProfile TCKs"
strategy:
matrix:
os: [ ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/[email protected]
with:
distribution: ${{ env.JAVA_DISTRO }}
java-version: ${{ env.JAVA_VERSION }}
cache: maven
- name: Maven build
run: |
# prime build
mvn ${MAVEN_ARGS} -e \
-Dmaven.test.skip=true \
-DskipTests \
-Ppipeline \
install
mvn ${MAVEN_ARGS} -e \
-f microprofile/tests/tck/pom.xml \
-Ptck-ft \
verify
archetypes:
timeout-minutes: 45
strategy:
matrix:
os: [ ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/[email protected]
with:
distribution: ${{ env.JAVA_DISTRO }}
java-version: ${{ env.JAVA_VERSION }}
cache: maven
- name: Test archetypes
run: |
# prime build
mvn ${MAVEN_ARGS} -e \
-Dmaven.test.skip=true \
-DskipTests \
-Ppipeline \
install
mvn ${MAVEN_ARGS} -e \
-f archetypes/pom.xml \
install
packaging:
timeout-minutes: 30
strategy:
matrix:
os: [ ubuntu-20.04, macos-14 ]
packaging: [ jar, jlink ]
include:
- { os: ubuntu-20.04, platform: linux }
- { os: macos-14, platform: macos }
runs-on: ${{ matrix.os }}
name: tests/packaging-${{ matrix.packaging }}-${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/[email protected]
with:
distribution: ${{ env.JAVA_DISTRO }}
java-version: ${{ env.JAVA_VERSION }}
cache: maven
- name: Free Space
shell: bash
run: |
# See https://github.com/actions/runner-images/issues/2840
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/share/powershell
- name: Build Helidon
run: |
# prime build
mvn ${MAVEN_ARGS} -e \
-DskipTests \
-Ptests \
install
- name: Run Test
run: |
mvn ${MAVEN_ARGS} \
-f tests/integration/packaging/pom.xml \
-P${{ matrix.packaging }}-image \
verify
native-image:
timeout-minutes: 30
strategy:
matrix:
os: [ ubuntu-20.04, macos-14 ]
module: [ mp-1, mp-2, mp-3, se-1 ]
include:
- { os: ubuntu-20.04, platform: linux }
- { os: macos-14, platform: macos }
runs-on: ${{ matrix.os }}
name: tests/native-image-${{ matrix.module }}-${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- uses: graalvm/setup-graalvm@v1
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: graalvm-community
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: true
cache: maven
- name: Free Space
shell: bash
run: |
# See https://github.com/actions/runner-images/issues/2840
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/share/powershell
- name: Build Helidon
run: |
# prime build
mvn ${MAVEN_ARGS} -e \
-DskipTests \
-Ptests \
install
- name: Run Test
run: |
mvn ${MAVEN_ARGS} -e \
-f tests/integration/packaging/pom.xml \
-pl ${{ matrix.module }} \
-Pnative-image \
-am \
verify
gate:
runs-on: ubuntu-20.04
needs: [ copyright, checkstyle, shellcheck, build, docs, spotbugs, packaging, native-image, archetypes, mp-tck ]
steps:
- shell: bash
run: |
echo OK