@@ -20,15 +20,22 @@ jobs:
20
20
FORCE_COLOR : ' 1'
21
21
steps :
22
22
- name : Setup Java
23
- uses : actions/setup-java@v3
23
+ uses : actions/setup-java@v4
24
24
with :
25
25
distribution : adopt-hotspot
26
- java-version : 17
26
+ java-version : 21
27
27
java-package : jdk
28
28
architecture : x64
29
29
- name : Setup Bazelisk
30
- uses : bazelbuild/setup-bazelisk@v2
31
- - uses : actions/checkout@v3
30
+ uses :
bazel-contrib/[email protected]
31
+ with :
32
+ # Avoid downloading Bazel every time.
33
+ bazelisk-cache : true
34
+ # Store build cache per workflow.
35
+ disk-cache : ${{ github.workflow }}
36
+ # Share repository cache between workflows.
37
+ repository-cache : true
38
+ - uses : actions/checkout@v4
32
39
with :
33
40
submodules : recursive
34
41
- name : Fetch submodule tags
44
51
- name : Get yarn cache directory path
45
52
run : echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
46
53
- name : Yarn and maven cache
47
- uses : actions/cache@v3
54
+ uses : actions/cache@v4
48
55
with :
49
56
path : |
50
57
${{ env.yarn_cache_dir }}
@@ -57,12 +64,12 @@ jobs:
57
64
- name : Tests
58
65
run : node_modules/.bin/mocha --colors
59
66
- name : Upload contrib folder
60
- uses : actions/upload-artifact@v3
67
+ uses : actions/upload-artifact@v4
61
68
with :
62
69
name : Contrib folder
63
70
path : compiler/contrib
64
71
- name : Upload compiler jar
65
- uses : actions/upload-artifact@v3
72
+ uses : actions/upload-artifact@v4
66
73
with :
67
74
name : Compiler.jar
68
75
path : packages/google-closure-compiler-java/compiler.jar
@@ -75,47 +82,47 @@ jobs:
75
82
needs : build-compiler
76
83
runs-on : ubuntu-20.04
77
84
env :
78
- NODE_VERSION : ' 14 .x'
85
+ NODE_VERSION : ' 18 .x'
79
86
FORCE_COLOR : ' 1'
80
87
steps :
81
88
- name : Setup Java
82
- uses : actions/setup-java@v3
89
+ uses : actions/setup-java@v4
83
90
with :
84
91
distribution : adopt-hotspot
85
- java-version : 17
92
+ java-version : 21
86
93
java-package : jdk
87
94
architecture : x64
88
- - uses : actions/checkout@v3
95
+ - uses : actions/checkout@v4
89
96
- name : Use Node.js ${{ env.NODE_VERSION }}
90
- uses : actions/setup-node@v3
97
+ uses : actions/setup-node@v4
91
98
with :
92
99
node-version : ${{ env.NODE_VERSION }}
93
100
- uses : graalvm/setup-graalvm@v1
94
101
with :
95
- version : ' 22.3.2'
96
- java-version : ' 17'
97
- components : ' native-image'
102
+ java-version : 21
103
+ distribution : ' graalvm-community'
98
104
github-token : ${{ secrets.GITHUB_TOKEN }}
105
+ native-image-job-reports : ' true'
99
106
- name : Setup upx
100
107
run : |
101
108
UPX_VERSION=3.96
102
109
curl --fail --show-error --location --remote-name "https://github.com/upx/upx/releases/download/v$UPX_VERSION/upx-$UPX_VERSION-amd64_linux.tar.xz"
103
110
tar -xf upx-$UPX_VERSION-amd64_linux.tar.xz
104
111
mv ./upx-$UPX_VERSION-amd64_linux/upx /usr/local/bin/upx
105
112
- name : Download compiler jar
106
- uses : actions/download-artifact@v3
113
+ uses : actions/download-artifact@v4
107
114
with :
108
115
name : Compiler.jar
109
116
path : packages/google-closure-compiler-java/
110
117
- name : Download contrib folder
111
- uses : actions/download-artifact@v3
118
+ uses : actions/download-artifact@v4
112
119
with :
113
120
name : Contrib folder
114
121
path : packages/google-closure-compiler/contrib
115
122
- name : Get yarn cache directory path
116
123
run : echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
117
124
- name : Cache yarn
118
- uses : actions/cache@v3
125
+ uses : actions/cache@v4
119
126
id : yarn-cache
120
127
with :
121
128
path : ${{ env.yarn_cache_dir }}
@@ -133,7 +140,7 @@ jobs:
133
140
- name : Tests
134
141
run : yarn workspaces run test --colors
135
142
- name : Upload artifacts
136
- uses : actions/upload-artifact@v3
143
+ uses : actions/upload-artifact@v4
137
144
with :
138
145
name : Linux image
139
146
path : packages/google-closure-compiler-linux/compiler
@@ -144,44 +151,44 @@ jobs:
144
151
needs : build-compiler
145
152
runs-on : macos-latest
146
153
env :
147
- NODE_VERSION : ' 16 .x'
154
+ NODE_VERSION : ' 20 .x'
148
155
FORCE_COLOR : ' 1'
149
156
steps :
150
157
- name : Setup Java
151
- uses : actions/setup-java@v3
158
+ uses : actions/setup-java@v4
152
159
with :
153
160
distribution : adopt-hotspot
154
- java-version : 17
161
+ java-version : 21
155
162
java-package : jdk
156
163
architecture : x64
157
- - uses : actions/checkout@v3
164
+ - uses : actions/checkout@v4
158
165
- name : Use Node.js ${{ env.NODE_VERSION }}
159
- uses : actions/setup-node@v3
166
+ uses : actions/setup-node@v4
160
167
with :
161
168
node-version : ${{ env.NODE_VERSION }}
162
169
- uses : graalvm/setup-graalvm@v1
163
170
with :
164
- version : ' 22.3.2'
165
- java-version : ' 17'
166
- components : ' native-image'
171
+ java-version : 21
172
+ distribution : ' graalvm-community'
167
173
github-token : ${{ secrets.GITHUB_TOKEN }}
174
+ native-image-job-reports : ' true'
168
175
# # See https://github.com/google/closure-compiler-npm/issues/265
169
176
# - name: Install upx
170
177
# run: brew install upx
171
178
- name : Download compiler jar
172
- uses : actions/download-artifact@v3
179
+ uses : actions/download-artifact@v4
173
180
with :
174
181
name : Compiler.jar
175
182
path : packages/google-closure-compiler-java/
176
183
- name : Download contrib folder
177
- uses : actions/download-artifact@v3
184
+ uses : actions/download-artifact@v4
178
185
with :
179
186
name : Contrib folder
180
187
path : packages/google-closure-compiler/contrib
181
188
- name : Get yarn cache directory path
182
189
run : echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
183
190
- name : Cache yarn
184
- uses : actions/cache@v3
191
+ uses : actions/cache@v4
185
192
id : yarn-cache
186
193
with :
187
194
path : ${{ env.yarn_cache_dir }}
@@ -199,7 +206,7 @@ jobs:
199
206
- name : Tests
200
207
run : yarn workspaces run test --colors
201
208
- name : Upload artifacts
202
- uses : actions/upload-artifact@v3
209
+ uses : actions/upload-artifact@v4
203
210
with :
204
211
name : MacOS image
205
212
path : packages/google-closure-compiler-osx/compiler
@@ -210,42 +217,42 @@ jobs:
210
217
needs : build-compiler
211
218
runs-on : windows-latest
212
219
env :
213
- NODE_VERSION : ' 18 .x'
220
+ NODE_VERSION : ' 20 .x'
214
221
FORCE_COLOR : ' 1'
215
222
steps :
216
223
- name : Setup Java
217
- uses : actions/setup-java@v3
224
+ uses : actions/setup-java@v4
218
225
with :
219
226
distribution : adopt-hotspot
220
- java-version : 17
227
+ java-version : 21
221
228
java-package : jdk
222
229
architecture : x64
223
- - uses : actions/checkout@v3
230
+ - uses : actions/checkout@v4
224
231
- name : Use Node.js ${{ env.NODE_VERSION }}
225
- uses : actions/setup-node@v3
232
+ uses : actions/setup-node@v4
226
233
with :
227
234
node-version : ${{ env.NODE_VERSION }}
228
235
- uses : graalvm/setup-graalvm@v1
229
236
with :
230
- version : ' 22.3.2'
231
- java-version : ' 17'
232
- components : ' native-image'
237
+ java-version : 21
238
+ distribution : ' graalvm-community'
233
239
github-token : ${{ secrets.GITHUB_TOKEN }}
240
+ native-image-job-reports : ' true'
234
241
- name : Download compiler jar
235
- uses : actions/download-artifact@v3
242
+ uses : actions/download-artifact@v4
236
243
with :
237
244
name : Compiler.jar
238
245
path : packages/google-closure-compiler-java/
239
246
- name : Download contrib folder
240
- uses : actions/download-artifact@v3
247
+ uses : actions/download-artifact@v4
241
248
with :
242
249
name : Contrib folder
243
250
path : packages/google-closure-compiler/contrib
244
251
- name : Get yarn cache directory path
245
252
# See https://stackoverflow.com/a/66737579/1211524
246
253
run : echo "yarn_cache_dir=$(yarn cache dir)" >> $env:GITHUB_ENV
247
254
- name : Cache yarn
248
- uses : actions/cache@v3
255
+ uses : actions/cache@v4
249
256
id : yarn-cache
250
257
with :
251
258
path : ${{ env.yarn_cache_dir }}
@@ -265,7 +272,7 @@ jobs:
265
272
echo "Running Tests"
266
273
yarn workspaces run test --colors
267
274
- name : Upload artifacts
268
- uses : actions/upload-artifact@v3
275
+ uses : actions/upload-artifact@v4
269
276
with :
270
277
name : Windows image
271
278
path : packages/google-closure-compiler-windows/compiler.exe
@@ -276,7 +283,7 @@ jobs:
276
283
runs-on : ubuntu-latest
277
284
if : ${{ github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
278
285
env :
279
- NODE_VERSION : ' 18 .x'
286
+ NODE_VERSION : ' 20 .x'
280
287
COMPILER_NIGHTLY : ${{ github.event_name == 'schedule' }}
281
288
NODE_AUTH_TOKEN : ${{ secrets.NPM_PUBLISH_AUTH_TOKEN }}
282
289
FORCE_COLOR : ' 1'
@@ -285,34 +292,34 @@ jobs:
285
292
- build-macos
286
293
- build-windows
287
294
steps :
288
- - uses : actions/checkout@v3
295
+ - uses : actions/checkout@v4
289
296
- name : Use Node.js ${{ env.NODE_VERSION }}
290
- uses : actions/setup-node@v3
297
+ uses : actions/setup-node@v4
291
298
with :
292
299
node-version : ${{ env.NODE_VERSION }}
293
300
registry-url : https://registry.npmjs.org/
294
301
- name : Download compiler jar
295
- uses : actions/download-artifact@v3
302
+ uses : actions/download-artifact@v4
296
303
with :
297
304
name : Compiler.jar
298
305
path : packages/google-closure-compiler-java/
299
306
- name : Download Linux image
300
- uses : actions/download-artifact@v3
307
+ uses : actions/download-artifact@v4
301
308
with :
302
309
name : Linux image
303
310
path : packages/google-closure-compiler-linux/
304
311
- name : Download MacOS image
305
- uses : actions/download-artifact@v3
312
+ uses : actions/download-artifact@v4
306
313
with :
307
314
name : MacOS image
308
315
path : packages/google-closure-compiler-osx/
309
316
- name : Download Windows image
310
- uses : actions/download-artifact@v3
317
+ uses : actions/download-artifact@v4
311
318
with :
312
319
name : Windows image
313
320
path : packages/google-closure-compiler-windows/
314
321
- name : Download contrib folder
315
- uses : actions/download-artifact@v3
322
+ uses : actions/download-artifact@v4
316
323
with :
317
324
name : Contrib folder
318
325
path : packages/google-closure-compiler/contrib
@@ -324,7 +331,7 @@ jobs:
324
331
- name : Get yarn cache directory path
325
332
run : echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
326
333
- name : Cache yarn
327
- uses : actions/cache@v3
334
+ uses : actions/cache@v4
328
335
id : yarn-cache
329
336
with :
330
337
path : ${{ env.yarn_cache_dir }}
@@ -344,4 +351,4 @@ jobs:
344
351
- name : Configure yarn
345
352
run : yarn config set registry https://registry.npmjs.org/
346
353
- name : Publish packages to npm
347
- run : yarn publish-packages
354
+ run : yarn publish-packages
0 commit comments