39
39
disk-cache : ${{ github.workflow }}
40
40
# Share repository cache between workflows.
41
41
repository-cache : true
42
- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
42
+ - name : Checkout repo
43
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
43
44
with :
44
45
submodules : recursive
45
46
ref : ${{ inputs.release-tag || '' }}
@@ -88,24 +89,58 @@ jobs:
88
89
env :
89
90
NODE_VERSION : ' 20.x'
90
91
FORCE_COLOR : ' 1'
92
+ MUSL_HOME : ${{ github.workspace }}/musl-toolchain
91
93
steps :
92
- - name : Setup Java
93
- uses : actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
94
- with :
95
- distribution : adopt-hotspot
96
- java-version : 21
97
- java-package : jdk
98
- architecture : x64
99
- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
94
+ - name : Checkout repo
95
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
100
96
with :
101
97
ref : ${{ inputs.release-tag || '' }}
98
+ - name : Checkout musl
99
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
100
+ with :
101
+ repository : kraj/musl
102
+ ref : c47ad25ea3b484e10326f933e927c0bc8cded3da # patched 1.2.5 version
103
+ path : musl
104
+ clean : false
105
+ - name : Checkout zlib
106
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
107
+ with :
108
+ repository : madler/zlib
109
+ ref : 04f42ceca40f73e2978b50e93806c2a18c1281fc # v1.2.13
110
+ path : zlib
111
+ clean : false
112
+ - name : Build musl and zlib
113
+ run : |
114
+ # See https://www.graalvm.org/latest/reference-manual/native-image/guides/build-static-executables/
115
+ # We have to build MUSL from source to ensure recent CVEs are patched
116
+
117
+ # Build musl from source
118
+ pushd musl
119
+ ./configure --prefix=$MUSL_HOME --static
120
+ sudo make && make install
121
+ popd
122
+
123
+ # Install a symlink for use by native-image
124
+ ln -s $MUSL_HOME/bin/musl-gcc $MUSL_HOME/bin/x86_64-linux-musl-gcc
125
+
126
+ # Extend the system path and confirm that musl is available by printing its version
127
+ export PATH="$MUSL_HOME/bin:$PATH"
128
+ echo "$path" >> $GITHUB_PATH
129
+ x86_64-linux-musl-gcc --version
130
+
131
+ # Build zlib with musl from source and install into the MUSL_HOME directory
132
+ pushd zlib
133
+ CC=musl-gcc ./configure --prefix=$MUSL_HOME --static
134
+ make && make install
135
+ popd
102
136
- name : Use Node.js ${{ env.NODE_VERSION }}
103
137
uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 4.4.0
104
138
with :
105
139
node-version : ${{ env.NODE_VERSION }}
106
- - uses : graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
140
+ - name : Install GraalVM
141
+ uses : graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
107
142
with :
108
- java-version : 21
143
+ java-version : 24
109
144
distribution : ' graalvm-community'
110
145
github-token : ${{ secrets.GITHUB_TOKEN }}
111
146
native-image-job-reports : ' true'
@@ -139,6 +174,7 @@ jobs:
139
174
- name : Build image
140
175
working-directory : packages/google-closure-compiler-linux
141
176
run : |
177
+ export PATH="$MUSL_HOME/bin:$PATH"
142
178
cp ../google-closure-compiler-java/compiler.jar compiler.jar
143
179
yarn run build
144
180
- name : Tests
@@ -160,23 +196,18 @@ jobs:
160
196
NODE_VERSION : ' 20.x'
161
197
FORCE_COLOR : ' 1'
162
198
steps :
163
- - name : Setup Java
164
- uses : actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
165
- with :
166
- distribution : adopt-hotspot
167
- java-version : 21
168
- java-package : jdk
169
- architecture : x64
170
- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
199
+ - name : Checkout repo
200
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
171
201
with :
172
202
ref : ${{ inputs.release-tag || '' }}
173
203
- name : Use Node.js ${{ env.NODE_VERSION }}
174
204
uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 4.4.0
175
205
with :
176
206
node-version : ${{ env.NODE_VERSION }}
177
- - uses : graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
207
+ - name : Setup GraalVM
208
+ uses : graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
178
209
with :
179
- java-version : 21
210
+ java-version : 24
180
211
distribution : ' graalvm-community'
181
212
github-token : ${{ secrets.GITHUB_TOKEN }}
182
213
native-image-job-reports : ' true'
@@ -229,23 +260,18 @@ jobs:
229
260
NODE_VERSION : ' 22.x'
230
261
FORCE_COLOR : ' 1'
231
262
steps :
232
- - name : Setup Java
233
- uses : actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
234
- with :
235
- distribution : adopt-hotspot
236
- java-version : 21
237
- java-package : jdk
238
- architecture : x64
239
- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
263
+ - name : Checkout repo
264
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
240
265
with :
241
266
ref : ${{ inputs.release-tag || '' }}
242
267
- name : Use Node.js ${{ env.NODE_VERSION }}
243
268
uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 4.4.0
244
269
with :
245
270
node-version : ${{ env.NODE_VERSION }}
246
- - uses : graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
271
+ - name : Setup GraalVM
272
+ uses : graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
247
273
with :
248
- java-version : 21
274
+ java-version : 24
249
275
distribution : ' graalvm-community'
250
276
github-token : ${{ secrets.GITHUB_TOKEN }}
251
277
native-image-job-reports : ' true'
@@ -298,23 +324,18 @@ jobs:
298
324
NODE_VERSION : ' 22.x'
299
325
FORCE_COLOR : ' 1'
300
326
steps :
301
- - name : Setup Java
302
- uses : actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
303
- with :
304
- distribution : adopt-hotspot
305
- java-version : 21
306
- java-package : jdk
307
- architecture : x64
308
- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
327
+ - name : Checkout repo
328
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
309
329
with :
310
330
ref : ${{ inputs.release-tag || '' }}
311
331
- name : Use Node.js ${{ env.NODE_VERSION }}
312
332
uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 4.4.0
313
333
with :
314
334
node-version : ${{ env.NODE_VERSION }}
315
- - uses : graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
335
+ - name : Setup GraalVM
336
+ uses : graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
316
337
with :
317
- java-version : 21
338
+ java-version : 24
318
339
distribution : ' graalvm-community'
319
340
github-token : ${{ secrets.GITHUB_TOKEN }}
320
341
native-image-job-reports : ' true'
@@ -377,7 +398,8 @@ jobs:
377
398
- build-macos
378
399
- build-windows
379
400
steps :
380
- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
401
+ - name : Checkout repo
402
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
381
403
with :
382
404
ref : ${{ inputs.release-tag || '' }}
383
405
- name : Use Node.js ${{ env.NODE_VERSION }}
0 commit comments