3939 disk-cache : ${{ github.workflow }}
4040 # Share repository cache between workflows.
4141 repository-cache : true
42- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
42+ - name : Checkout repo
43+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
4344 with :
4445 submodules : recursive
4546 ref : ${{ inputs.release-tag || '' }}
@@ -84,25 +85,59 @@ jobs:
8485 env :
8586 NODE_VERSION : ' 20.x'
8687 FORCE_COLOR : ' 1'
88+ MUSL_HOME : ${{ github.workspace }}/musl-toolchain
8789 steps :
88- - name : Setup Java
89- uses : actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
90- with :
91- distribution : adopt-hotspot
92- java-version : 21
93- java-package : jdk
94- architecture : x64
95- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
90+ - name : Checkout repo
91+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
9692 with :
9793 ref : ${{ inputs.release-tag || '' }}
94+ - name : Checkout musl
95+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
96+ with :
97+ repository : kraj/musl
98+ ref : c47ad25ea3b484e10326f933e927c0bc8cded3da # patched 1.2.5 version
99+ path : musl
100+ clean : false
101+ - name : Checkout zlib
102+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
103+ with :
104+ repository : madler/zlib
105+ ref : 04f42ceca40f73e2978b50e93806c2a18c1281fc # v1.2.13
106+ path : zlib
107+ clean : false
108+ - name : Build musl and zlib
109+ run : |
110+ # See https://www.graalvm.org/latest/reference-manual/native-image/guides/build-static-executables/
111+ # We have to build MUSL from source to ensure recent CVEs are patched
112+
113+ # Build musl from source
114+ pushd musl
115+ ./configure --prefix=$MUSL_HOME --static
116+ sudo make && make install
117+ popd
118+
119+ # Install a symlink for use by native-image
120+ ln -s $MUSL_HOME/bin/musl-gcc $MUSL_HOME/bin/x86_64-linux-musl-gcc
121+
122+ # Extend the system path and confirm that musl is available by printing its version
123+ export PATH="$MUSL_HOME/bin:$PATH"
124+ echo "$path" >> $GITHUB_PATH
125+ x86_64-linux-musl-gcc --version
126+
127+ # Build zlib with musl from source and install into the MUSL_HOME directory
128+ pushd zlib
129+ CC=musl-gcc ./configure --prefix=$MUSL_HOME --static
130+ make && make install
131+ popd
98132 - name : Use Node.js ${{ env.NODE_VERSION }}
99133 uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 4.4.0
100134 with :
101135 node-version : ${{ env.NODE_VERSION }}
102136 cache : yarn
103- - uses : graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
137+ - name : Install GraalVM
138+ uses : graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
104139 with :
105- java-version : 21
140+ java-version : 24
106141 distribution : ' graalvm-community'
107142 github-token : ${{ secrets.GITHUB_TOKEN }}
108143 native-image-job-reports : ' true'
@@ -126,6 +161,7 @@ jobs:
126161 - name : Build image
127162 working-directory : packages/google-closure-compiler-linux
128163 run : |
164+ export PATH="$MUSL_HOME/bin:$PATH"
129165 cp ../google-closure-compiler-java/compiler.jar compiler.jar
130166 yarn run build
131167 - name : Tests
@@ -147,24 +183,19 @@ jobs:
147183 NODE_VERSION : ' 20.x'
148184 FORCE_COLOR : ' 1'
149185 steps :
150- - name : Setup Java
151- uses : actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
152- with :
153- distribution : adopt-hotspot
154- java-version : 21
155- java-package : jdk
156- architecture : x64
157- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
186+ - name : Checkout repo
187+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
158188 with :
159189 ref : ${{ inputs.release-tag || '' }}
160190 - name : Use Node.js ${{ env.NODE_VERSION }}
161191 uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 4.4.0
162192 with :
163193 node-version : ${{ env.NODE_VERSION }}
164194 cache : yarn
165- - uses : graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
195+ - name : Setup GraalVM
196+ uses : graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
166197 with :
167- java-version : 21
198+ java-version : 24
168199 distribution : ' graalvm-community'
169200 github-token : ${{ secrets.GITHUB_TOKEN }}
170201 native-image-job-reports : ' true'
@@ -207,24 +238,19 @@ jobs:
207238 NODE_VERSION : ' 22.x'
208239 FORCE_COLOR : ' 1'
209240 steps :
210- - name : Setup Java
211- uses : actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
212- with :
213- distribution : adopt-hotspot
214- java-version : 21
215- java-package : jdk
216- architecture : x64
217- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
241+ - name : Checkout repo
242+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
218243 with :
219244 ref : ${{ inputs.release-tag || '' }}
220245 - name : Use Node.js ${{ env.NODE_VERSION }}
221246 uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 4.4.0
222247 with :
223248 node-version : ${{ env.NODE_VERSION }}
224249 cache : yarn
225- - uses : graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
250+ - name : Setup GraalVM
251+ uses : graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
226252 with :
227- java-version : 21
253+ java-version : 24
228254 distribution : ' graalvm-community'
229255 github-token : ${{ secrets.GITHUB_TOKEN }}
230256 native-image-job-reports : ' true'
@@ -267,24 +293,19 @@ jobs:
267293 NODE_VERSION : ' 22.x'
268294 FORCE_COLOR : ' 1'
269295 steps :
270- - name : Setup Java
271- uses : actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
272- with :
273- distribution : adopt-hotspot
274- java-version : 21
275- java-package : jdk
276- architecture : x64
277- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
296+ - name : Checkout repo
297+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
278298 with :
279299 ref : ${{ inputs.release-tag || '' }}
280300 - name : Use Node.js ${{ env.NODE_VERSION }}
281301 uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 4.4.0
282302 with :
283303 node-version : ${{ env.NODE_VERSION }}
284304 cache : yarn
285- - uses : graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
305+ - name : Setup GraalVM
306+ uses : graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
286307 with :
287- java-version : 21
308+ java-version : 24
288309 distribution : ' graalvm-community'
289310 github-token : ${{ secrets.GITHUB_TOKEN }}
290311 native-image-job-reports : ' true'
@@ -334,7 +355,8 @@ jobs:
334355 - build-macos
335356 - build-windows
336357 steps :
337- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
358+ - name : Checkout repo
359+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
338360 with :
339361 ref : ${{ inputs.release-tag || '' }}
340362 - name : Use Node.js ${{ env.NODE_VERSION }}
0 commit comments