Skip to content
This repository was archived by the owner on Sep 19, 2025. It is now read-only.

Commit 02d895e

Browse files
authored
Merge pull request #305 from google/update-actions
Update github actions versions
2 parents d544892 + 3589edf commit 02d895e

File tree

4 files changed

+78
-65
lines changed

4 files changed

+78
-65
lines changed

.github/workflows/build.yml

Lines changed: 60 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,22 @@ jobs:
2020
FORCE_COLOR: '1'
2121
steps:
2222
- name: Setup Java
23-
uses: actions/setup-java@v3
23+
uses: actions/setup-java@v4
2424
with:
2525
distribution: adopt-hotspot
26-
java-version: 17
26+
java-version: 21
2727
java-package: jdk
2828
architecture: x64
2929
- 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
3239
with:
3340
submodules: recursive
3441
- name: Fetch submodule tags
@@ -44,7 +51,7 @@ jobs:
4451
- name: Get yarn cache directory path
4552
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
4653
- name: Yarn and maven cache
47-
uses: actions/cache@v3
54+
uses: actions/cache@v4
4855
with:
4956
path: |
5057
${{ env.yarn_cache_dir }}
@@ -57,12 +64,12 @@ jobs:
5764
- name: Tests
5865
run: node_modules/.bin/mocha --colors
5966
- name: Upload contrib folder
60-
uses: actions/upload-artifact@v3
67+
uses: actions/upload-artifact@v4
6168
with:
6269
name: Contrib folder
6370
path: compiler/contrib
6471
- name: Upload compiler jar
65-
uses: actions/upload-artifact@v3
72+
uses: actions/upload-artifact@v4
6673
with:
6774
name: Compiler.jar
6875
path: packages/google-closure-compiler-java/compiler.jar
@@ -75,47 +82,47 @@ jobs:
7582
needs: build-compiler
7683
runs-on: ubuntu-20.04
7784
env:
78-
NODE_VERSION: '14.x'
85+
NODE_VERSION: '18.x'
7986
FORCE_COLOR: '1'
8087
steps:
8188
- name: Setup Java
82-
uses: actions/setup-java@v3
89+
uses: actions/setup-java@v4
8390
with:
8491
distribution: adopt-hotspot
85-
java-version: 17
92+
java-version: 21
8693
java-package: jdk
8794
architecture: x64
88-
- uses: actions/checkout@v3
95+
- uses: actions/checkout@v4
8996
- name: Use Node.js ${{ env.NODE_VERSION }}
90-
uses: actions/setup-node@v3
97+
uses: actions/setup-node@v4
9198
with:
9299
node-version: ${{ env.NODE_VERSION }}
93100
- uses: graalvm/setup-graalvm@v1
94101
with:
95-
version: '22.3.2'
96-
java-version: '17'
97-
components: 'native-image'
102+
java-version: 21
103+
distribution: 'graalvm-community'
98104
github-token: ${{ secrets.GITHUB_TOKEN }}
105+
native-image-job-reports: 'true'
99106
- name: Setup upx
100107
run: |
101108
UPX_VERSION=3.96
102109
curl --fail --show-error --location --remote-name "https://github.com/upx/upx/releases/download/v$UPX_VERSION/upx-$UPX_VERSION-amd64_linux.tar.xz"
103110
tar -xf upx-$UPX_VERSION-amd64_linux.tar.xz
104111
mv ./upx-$UPX_VERSION-amd64_linux/upx /usr/local/bin/upx
105112
- name: Download compiler jar
106-
uses: actions/download-artifact@v3
113+
uses: actions/download-artifact@v4
107114
with:
108115
name: Compiler.jar
109116
path: packages/google-closure-compiler-java/
110117
- name: Download contrib folder
111-
uses: actions/download-artifact@v3
118+
uses: actions/download-artifact@v4
112119
with:
113120
name: Contrib folder
114121
path: packages/google-closure-compiler/contrib
115122
- name: Get yarn cache directory path
116123
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
117124
- name: Cache yarn
118-
uses: actions/cache@v3
125+
uses: actions/cache@v4
119126
id: yarn-cache
120127
with:
121128
path: ${{ env.yarn_cache_dir }}
@@ -133,7 +140,7 @@ jobs:
133140
- name: Tests
134141
run: yarn workspaces run test --colors
135142
- name: Upload artifacts
136-
uses: actions/upload-artifact@v3
143+
uses: actions/upload-artifact@v4
137144
with:
138145
name: Linux image
139146
path: packages/google-closure-compiler-linux/compiler
@@ -144,44 +151,44 @@ jobs:
144151
needs: build-compiler
145152
runs-on: macos-latest
146153
env:
147-
NODE_VERSION: '16.x'
154+
NODE_VERSION: '20.x'
148155
FORCE_COLOR: '1'
149156
steps:
150157
- name: Setup Java
151-
uses: actions/setup-java@v3
158+
uses: actions/setup-java@v4
152159
with:
153160
distribution: adopt-hotspot
154-
java-version: 17
161+
java-version: 21
155162
java-package: jdk
156163
architecture: x64
157-
- uses: actions/checkout@v3
164+
- uses: actions/checkout@v4
158165
- name: Use Node.js ${{ env.NODE_VERSION }}
159-
uses: actions/setup-node@v3
166+
uses: actions/setup-node@v4
160167
with:
161168
node-version: ${{ env.NODE_VERSION }}
162169
- uses: graalvm/setup-graalvm@v1
163170
with:
164-
version: '22.3.2'
165-
java-version: '17'
166-
components: 'native-image'
171+
java-version: 21
172+
distribution: 'graalvm-community'
167173
github-token: ${{ secrets.GITHUB_TOKEN }}
174+
native-image-job-reports: 'true'
168175
# # See https://github.com/google/closure-compiler-npm/issues/265
169176
# - name: Install upx
170177
# run: brew install upx
171178
- name: Download compiler jar
172-
uses: actions/download-artifact@v3
179+
uses: actions/download-artifact@v4
173180
with:
174181
name: Compiler.jar
175182
path: packages/google-closure-compiler-java/
176183
- name: Download contrib folder
177-
uses: actions/download-artifact@v3
184+
uses: actions/download-artifact@v4
178185
with:
179186
name: Contrib folder
180187
path: packages/google-closure-compiler/contrib
181188
- name: Get yarn cache directory path
182189
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
183190
- name: Cache yarn
184-
uses: actions/cache@v3
191+
uses: actions/cache@v4
185192
id: yarn-cache
186193
with:
187194
path: ${{ env.yarn_cache_dir }}
@@ -199,7 +206,7 @@ jobs:
199206
- name: Tests
200207
run: yarn workspaces run test --colors
201208
- name: Upload artifacts
202-
uses: actions/upload-artifact@v3
209+
uses: actions/upload-artifact@v4
203210
with:
204211
name: MacOS image
205212
path: packages/google-closure-compiler-osx/compiler
@@ -210,42 +217,42 @@ jobs:
210217
needs: build-compiler
211218
runs-on: windows-latest
212219
env:
213-
NODE_VERSION: '18.x'
220+
NODE_VERSION: '20.x'
214221
FORCE_COLOR: '1'
215222
steps:
216223
- name: Setup Java
217-
uses: actions/setup-java@v3
224+
uses: actions/setup-java@v4
218225
with:
219226
distribution: adopt-hotspot
220-
java-version: 17
227+
java-version: 21
221228
java-package: jdk
222229
architecture: x64
223-
- uses: actions/checkout@v3
230+
- uses: actions/checkout@v4
224231
- name: Use Node.js ${{ env.NODE_VERSION }}
225-
uses: actions/setup-node@v3
232+
uses: actions/setup-node@v4
226233
with:
227234
node-version: ${{ env.NODE_VERSION }}
228235
- uses: graalvm/setup-graalvm@v1
229236
with:
230-
version: '22.3.2'
231-
java-version: '17'
232-
components: 'native-image'
237+
java-version: 21
238+
distribution: 'graalvm-community'
233239
github-token: ${{ secrets.GITHUB_TOKEN }}
240+
native-image-job-reports: 'true'
234241
- name: Download compiler jar
235-
uses: actions/download-artifact@v3
242+
uses: actions/download-artifact@v4
236243
with:
237244
name: Compiler.jar
238245
path: packages/google-closure-compiler-java/
239246
- name: Download contrib folder
240-
uses: actions/download-artifact@v3
247+
uses: actions/download-artifact@v4
241248
with:
242249
name: Contrib folder
243250
path: packages/google-closure-compiler/contrib
244251
- name: Get yarn cache directory path
245252
# See https://stackoverflow.com/a/66737579/1211524
246253
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $env:GITHUB_ENV
247254
- name: Cache yarn
248-
uses: actions/cache@v3
255+
uses: actions/cache@v4
249256
id: yarn-cache
250257
with:
251258
path: ${{ env.yarn_cache_dir }}
@@ -265,7 +272,7 @@ jobs:
265272
echo "Running Tests"
266273
yarn workspaces run test --colors
267274
- name: Upload artifacts
268-
uses: actions/upload-artifact@v3
275+
uses: actions/upload-artifact@v4
269276
with:
270277
name: Windows image
271278
path: packages/google-closure-compiler-windows/compiler.exe
@@ -276,7 +283,7 @@ jobs:
276283
runs-on: ubuntu-latest
277284
if: ${{ github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
278285
env:
279-
NODE_VERSION: '18.x'
286+
NODE_VERSION: '20.x'
280287
COMPILER_NIGHTLY: ${{ github.event_name == 'schedule' }}
281288
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_AUTH_TOKEN }}
282289
FORCE_COLOR: '1'
@@ -285,34 +292,34 @@ jobs:
285292
- build-macos
286293
- build-windows
287294
steps:
288-
- uses: actions/checkout@v3
295+
- uses: actions/checkout@v4
289296
- name: Use Node.js ${{ env.NODE_VERSION }}
290-
uses: actions/setup-node@v3
297+
uses: actions/setup-node@v4
291298
with:
292299
node-version: ${{ env.NODE_VERSION }}
293300
registry-url: https://registry.npmjs.org/
294301
- name: Download compiler jar
295-
uses: actions/download-artifact@v3
302+
uses: actions/download-artifact@v4
296303
with:
297304
name: Compiler.jar
298305
path: packages/google-closure-compiler-java/
299306
- name: Download Linux image
300-
uses: actions/download-artifact@v3
307+
uses: actions/download-artifact@v4
301308
with:
302309
name: Linux image
303310
path: packages/google-closure-compiler-linux/
304311
- name: Download MacOS image
305-
uses: actions/download-artifact@v3
312+
uses: actions/download-artifact@v4
306313
with:
307314
name: MacOS image
308315
path: packages/google-closure-compiler-osx/
309316
- name: Download Windows image
310-
uses: actions/download-artifact@v3
317+
uses: actions/download-artifact@v4
311318
with:
312319
name: Windows image
313320
path: packages/google-closure-compiler-windows/
314321
- name: Download contrib folder
315-
uses: actions/download-artifact@v3
322+
uses: actions/download-artifact@v4
316323
with:
317324
name: Contrib folder
318325
path: packages/google-closure-compiler/contrib
@@ -324,7 +331,7 @@ jobs:
324331
- name: Get yarn cache directory path
325332
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
326333
- name: Cache yarn
327-
uses: actions/cache@v3
334+
uses: actions/cache@v4
328335
id: yarn-cache
329336
with:
330337
path: ${{ env.yarn_cache_dir }}
@@ -344,4 +351,4 @@ jobs:
344351
- name: Configure yarn
345352
run: yarn config set registry https://registry.npmjs.org/
346353
- name: Publish packages to npm
347-
run: yarn publish-packages
354+
run: yarn publish-packages

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ jobs:
3131

3232
steps:
3333
- name: Checkout repository
34-
uses: actions/checkout@v3
34+
uses: actions/checkout@v4
3535

3636
# Initializes the CodeQL tools for scanning.
3737
- name: Initialize CodeQL
38-
uses: github/codeql-action/init@v2
38+
uses: github/codeql-action/init@v3
3939
with:
4040
languages: ${{ matrix.language }}
4141
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -49,7 +49,7 @@ jobs:
4949
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
5050
# If this step fails, then you should remove it and run the build manually (see below)
5151
- name: Autobuild
52-
uses: github/codeql-action/autobuild@v2
52+
uses: github/codeql-action/autobuild@v3
5353

5454
# ℹ️ Command-line programs to run using the OS shell.
5555
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -62,6 +62,6 @@ jobs:
6262
# ./location_of_script_within_repo/buildscript.sh
6363

6464
- name: Perform CodeQL Analysis
65-
uses: github/codeql-action/analyze@v2
65+
uses: github/codeql-action/analyze@v3
6666
with:
6767
category: "/language:${{matrix.language}}"

.github/workflows/release.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,29 @@ jobs:
1616
contents: write
1717
env:
1818
FORCE_COLOR: '1'
19-
NODE_VERSION: '18.x'
19+
NODE_VERSION: '20.x'
2020
steps:
2121
- name: Use Node.js ${{ env.NODE_VERSION }}
22-
uses: actions/setup-node@v1
22+
uses: actions/setup-node@v4
2323
with:
2424
node-version: ${{ env.NODE_VERSION }}
2525
- name: Setup Java
26-
uses: actions/setup-java@v3
26+
uses: actions/setup-java@v4
2727
with:
2828
distribution: adopt-hotspot
29-
java-version: 17
29+
java-version: 21
3030
java-package: jdk
3131
architecture: x64
32-
- name: Setup Bazel
33-
uses: jwlawson/actions-setup-bazel@v1
32+
- name: Setup Bazelisk
33+
uses: bazel-contrib/setup-bazel@0.8.1
3434
with:
35-
bazel-version: '4.2.2'
36-
- uses: actions/checkout@v3
35+
# Avoid downloading Bazel every time.
36+
bazelisk-cache: true
37+
# Store build cache per workflow.
38+
disk-cache: ${{ github.workflow }}
39+
# Share repository cache between workflows.
40+
repository-cache: true
41+
- uses: actions/checkout@v4
3742
with:
3843
submodules: recursive
3944
- name: Set compiler submodule to release branch

build-scripts/graal.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ const NATIVE_IMAGE_BUILD_ARGS = [
5252
}),
5353
'-H:+ReportExceptionStackTraces',
5454
'--initialize-at-build-time',
55+
'--color=always',
5556
'-jar',
5657
path.resolve(process.cwd(), 'compiler.jar')
5758
];

0 commit comments

Comments
 (0)