10
10
branches-ignore :
11
11
- gh-pages
12
12
13
+ env :
14
+ NODE_VER : ' 16.x'
15
+ JAVA_DISTRIBUTION : ' zulu'
16
+ JAVA_VER : 8
17
+
13
18
jobs :
14
- ubuntu :
19
+ mainbuild :
15
20
name : ${{ matrix.os }} JDK 8
16
21
strategy :
22
+ fail-fast : false
17
23
matrix :
18
- os : [ubuntu-20.04, ubuntu-22.04]
24
+ os : [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, windows-2019, windows-2022 ]
19
25
runs-on : ${{ matrix.os }}
20
26
env :
21
- NODE_VERSION : " lts/* "
27
+ HOMEBREW_NO_AUTO_UPDATE : 1 # Prevent time-consuming brew update
22
28
23
29
steps :
24
30
- name : Checkout repository
@@ -29,40 +35,41 @@ jobs:
29
35
- name : Set up JDK 1.8
30
36
uses : actions/setup-java@v3
31
37
with :
32
- distribution : ' zulu '
33
- java-version : 8
38
+ distribution : ${{ env.JAVA_DISTRIBUTION }}
39
+ java-version : ${{ env.JAVA_VER }}
34
40
35
41
- name : Verify Java version
36
- run : echo -e "Actual JDK in use -- "; java -version
42
+ run : echo "Actual JDK in use -- "; java -version
37
43
38
44
- name : Set up Node.js
39
45
uses : actions/setup-node@v3
40
46
with :
41
- node-version : ' 14.x '
47
+ node-version : ${{ env.NODE_VER }}
42
48
43
49
- name : Set up Gradle caching
44
50
uses : actions/cache@v3
45
51
with :
46
52
path : |
47
- ~ /.gradle/caches
48
- ~ /.gradle/wrapper
53
+ $HOME /.gradle/caches
54
+ $HOME /.gradle/wrapper
49
55
key : ${{ matrix.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
50
56
restore-keys : |
51
57
${{ matrix.os }}-gradle-
52
58
53
59
- name : Set up Node caching
54
60
uses : actions/cache@v3
55
61
with :
56
- path : ~ /.npm
62
+ path : $HOME /.npm
57
63
key : ${{ matrix.os }}-node-${{ hashFiles('**/package-lock.json') }}
58
64
restore-keys : |
59
65
${{ matrix.os }}-node-
60
66
61
67
- name : Grant execute permission for gradlew
62
- run : chmod +x gradlew
68
+ if : ${{ runner.os != 'Windows' }}
69
+ run : chmod +x gradlew # Windows does not need this
63
70
64
71
- name : Run environmental checks
65
- run : ./config/gh-actions/run-checks.sh
72
+ run : ./gradlew environmentalChecks
66
73
67
74
- name : Run linter
68
75
run : ./gradlew lintFrontend
71
78
run : ./gradlew clean checkstyleAll test systemTest coverage
72
79
73
80
- name : Run code coverage
74
- if : ${{ success() && matrix.os == 'ubuntu-20.04' }}
81
+ if : ${{ success() && ( matrix.os == 'ubuntu-20.04' || matrix.os == 'macos-11' || matrix.os == 'windows-2022' ) }}
75
82
uses : codecov/codecov-action@v3
76
83
with :
77
84
directory : ${{ github.workspace }}/build/reports/jacoco/coverage
@@ -102,131 +109,6 @@ jobs:
102
109
./docs/_site
103
110
./pr
104
111
105
- macos :
106
- name : ${{ matrix.os }} JDK 8
107
- strategy :
108
- matrix :
109
- os : [macos-11, macos-12]
110
- runs-on : ${{ matrix.os }}
111
- env :
112
- HOMEBREW_NO_AUTO_UPDATE : 1 # Prevent time-consuming brew update
113
-
114
- steps :
115
- - name : Checkout repository
116
- uses : actions/checkout@v3
117
- with :
118
- fetch-depth : 0
119
-
120
- - name : Set up JDK 1.8
121
- uses : actions/setup-java@v3
122
- with :
123
- distribution : ' zulu'
124
- java-version : 8
125
-
126
- - name : Verify Java version
127
- run : echo -e "Actual JDK in use -- "; java -version
128
-
129
- - name : Set up Node.js
130
- uses : actions/setup-node@v3
131
- with :
132
- node-version : ' 14.x'
133
-
134
- - name : Set up Gradle caching
135
- uses : actions/cache@v3
136
- with :
137
- path : |
138
- ~/.gradle/caches
139
- ~/.gradle/wrapper
140
- key : ${{ matrix.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
141
- restore-keys : |
142
- ${{ matrix.os }}-gradle-
143
-
144
- - name : Set up Node caching
145
- uses : actions/cache@v3
146
- with :
147
- path : ~/.npm
148
- key : ${{ matrix.os }}-node-${{ hashFiles('**/package-lock.json') }}
149
- restore-keys : |
150
- ${{ matrix.os }}-node-
151
-
152
- - name : Grant execute permission for gradlew
153
- run : chmod +x gradlew
154
-
155
- - name : Run environmental checks
156
- run : ./config/gh-actions/run-checks.sh
157
-
158
- - name : Run linter
159
- run : ./gradlew lintFrontend
160
-
161
- - name : Build with Gradle
162
- run : ./gradlew clean checkstyleAll test systemTest coverage
163
-
164
- - name : Run code coverage
165
- if : ${{ success() && matrix.os == 'macos-11' }}
166
- uses : codecov/codecov-action@v3
167
- with :
168
- directory : ${{ github.workspace }}/build/reports/jacoco/coverage
169
- files : coverage.xml
170
- fail_ci_if_error : true
171
-
172
- windows :
173
- name : ${{ matrix.os }} JDK 8
174
- strategy :
175
- matrix :
176
- os : [windows-2019, windows-2022]
177
- runs-on : ${{ matrix.os }}
178
- steps :
179
- - name : Checkout repository
180
- uses : actions/checkout@v3
181
- with :
182
- fetch-depth : 0
183
-
184
- - name : Set up JDK 1.8
185
- uses : actions/setup-java@v3
186
- with :
187
- distribution : ' zulu'
188
- java-version : 8
189
-
190
- - name : Verify Java version
191
- run : Write-Output "Actual JDK in use -- "; java -version
192
-
193
- - name : Set up Node.js
194
- uses : actions/setup-node@v3
195
- with :
196
- node-version : ' 14.x'
197
-
198
- - name : Set up Gradle caching
199
- uses : actions/cache@v3
200
- with :
201
- path : |
202
- $HOME/.gradle/caches
203
- $HOME/.gradle/wrapper
204
- key : ${{ matrix.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
205
- restore-keys : |
206
- ${{ matrix.os }}-gradle-
207
-
208
- - name : Set up Node caching
209
- uses : actions/cache@v3
210
- with :
211
- path : $HOME/.npm
212
- key : ${{ matrix.os }}-node-${{ hashFiles('**/package-lock.json') }}
213
- restore-keys : |
214
- ${{ matrix.os }}-node-
215
-
216
- - name : Run linter
217
- run : ./gradlew lintFrontend
218
-
219
- - name : Build with Gradle
220
- run : ./gradlew clean checkstyleAll test systemTest coverage
221
-
222
- - name : Run code coverage
223
- if : ${{ success() && matrix.os == 'windows-2022' }}
224
- uses : codecov/codecov-action@v3
225
- with :
226
- directory : ${{ github.workspace }}/build/reports/jacoco/coverage
227
- files : coverage.xml
228
- fail_ci_if_error : true
229
-
230
112
cypress :
231
113
name : Cypress frontend tests
232
114
runs-on : ubuntu-20.04
@@ -240,31 +122,31 @@ jobs:
240
122
- name : Set up JDK 1.8
241
123
uses : actions/setup-java@v3
242
124
with :
243
- distribution : ' zulu '
244
- java-version : 8
125
+ distribution : ${{ env.JAVA_DISTRIBUTION }}
126
+ java-version : ${{ env.JAVA_VER }}
245
127
246
128
- name : Verify Java version
247
- run : echo -e "Actual JDK in use -- "; java -version
129
+ run : echo "Actual JDK in use -- "; java -version
248
130
249
131
- name : Set up Node.js
250
132
uses : actions/setup-node@v3
251
133
with :
252
- node-version : ' 14.x '
134
+ node-version : ${{ env.NODE_VER }}
253
135
254
136
- name : Set up Gradle caching
255
137
uses : actions/cache@v3
256
138
with :
257
139
path : |
258
- ~ /.gradle/caches
259
- ~ /.gradle/wrapper
140
+ $HOME /.gradle/caches
141
+ $HOME /.gradle/wrapper
260
142
key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
261
143
restore-keys : |
262
144
${{ runner.os }}-gradle-
263
145
264
146
- name : Set up Node caching
265
147
uses : actions/cache@v3
266
148
with :
267
- path : ~ /.npm
149
+ path : $HOME /.npm
268
150
key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
269
151
restore-keys : |
270
152
${{ runner.os }}-node-
0 commit comments