Skip to content

Commit ff4ae15

Browse files
committed
Add Node build artifact to build-deps.yml
1 parent 00c8aa6 commit ff4ae15

File tree

1 file changed

+54
-21
lines changed

1 file changed

+54
-21
lines changed

.github/workflows/build-deps.yml

Lines changed: 54 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ on:
44
workflow_dispatch:
55
inputs:
66
llvm_build:
7-
description: 'LLVM Webassembly arm64'
7+
description: 'LLVM WebAssembly Arm64'
88
required: false
99
default: false
1010
type: boolean
1111
llvm_build_cross_compilation:
12-
description: 'LLVM Webassembly arm64 (cross compilation)'
12+
description: 'LLVM WebAssembly Arm64 (cross compilation)'
1313
required: false
1414
default: false
1515
type: boolean
@@ -24,17 +24,17 @@ on:
2424
default: false
2525
type: boolean
2626
emscripten_build:
27-
description: 'Emscripten'
27+
description: 'Emscripten Arm64'
2828
required: false
2929
default: false
3030
type: boolean
3131
nodejs_build:
32-
description: 'Node.js arm64'
32+
description: 'Node.js Arm64'
3333
required: false
3434
default: false
3535
type: boolean
3636
wasm_binaries_build:
37-
description: 'WASM binaries arm64'
37+
description: 'WASM binaries Arm64'
3838
required: false
3939
default: false
4040
type: boolean
@@ -48,7 +48,7 @@ jobs:
4848

4949
steps:
5050

51-
- name: Build LLVM WebAssembly arm64
51+
- name: Build LLVM WebAssembly for Arm64
5252
shell: cmd
5353
run: |
5454
git clone --config core.autocrlf=false https://github.com/llvm/llvm-project.git --single-branch --depth 1
@@ -108,7 +108,7 @@ jobs:
108108
- name: Archive llvm-arm64.zip
109109
uses: actions/upload-artifact@v3
110110
with:
111-
name: llvm-arm64.zip
111+
name: llvm-arm64
112112
path: llvm-project/build_arm64/llvm-arm64.zip
113113
retention-days: 1
114114

@@ -119,7 +119,7 @@ jobs:
119119

120120
steps:
121121

122-
- name: Build LLVM WebAssembly arm64 (Cross Compilation)
122+
- name: Build LLVM WebAssembly for Arm64 (Cross Compilation)
123123
run: |
124124
Set-PSDebug -Trace 1
125125
git clone --config core.autocrlf=false https://github.com/llvm/llvm-project.git --single-branch --branch main --depth 1
@@ -180,7 +180,7 @@ jobs:
180180
- name: Archive binaryen-arm64.zip
181181
uses: actions/upload-artifact@v3
182182
with:
183-
name: binaryen-arm64.zip
183+
name: binaryen-arm64
184184
path: binaryen/binaryen-arm64.zip
185185
retention-days: 1
186186

@@ -191,12 +191,45 @@ jobs:
191191

192192
steps:
193193

194-
- name: Build Node.js arm64
194+
- name: Add 7-Zip to PATH
195+
run: |
196+
echo "PATH=$env:PATH;C:\Program Files\7-Zip" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
197+
198+
- name: Check 7-Zip installed
199+
run: |
200+
7z
201+
202+
- name: Build Node.js for Arm64
195203
run: |
196-
Set-PSDebug -Trace 1
197204
git clone https://github.com/Windows-on-ARM-Experiments/node.git --single-branch -b fix-arm64-compilation --depth 1
198205
cd node
199-
.\vcbuild openssl-no-asm arm64
206+
.\vcbuild.bat arm64 package
207+
208+
- name: Prepare Node.js package
209+
run: |
210+
cd .\node\out\Release
211+
Remove-Item -Path .\tmp -Recurse -Force -ErrorAction Ignore
212+
New-Item -ItemType Directory -Force -Path .\tmp\node-v20.0.0-win-arm64\bin
213+
cp .\node-v20.0.0-win-arm64\* .\tmp\node-v20.0.0-win-arm64\bin
214+
ls .\tmp\node-v20.0.0-win-arm64\bin
215+
ls .\tmp\node-v20.0.0-win-arm64\bin\node_modules
216+
Compress-Archive -Path .\tmp\node-v20.0.0-win-arm64 -DestinationPath node-v20.0.0-win-arm64-2.zip
217+
218+
- name: Archive node-v20.0.0-win-arm64.zip
219+
uses: actions/upload-artifact@v3
220+
with:
221+
name: node-v20.0.0-win-arm64
222+
path: node/out/Release/tmp/*
223+
224+
- name: Archive node-v20.0.0-win-arm64-2.zip
225+
uses: actions/upload-artifact@v3
226+
with:
227+
name: node-v20.0.0-win-arm64-2
228+
path: node/out/Release/node-v20.0.0-win-arm64-2.zip
229+
230+
- name: Cleanup
231+
run: |
232+
Remove-Item -Path .\node\out\Release\tmp -Recurse -Force -ErrorAction Ignore
200233
201234
build-emscripten:
202235
if: ${{ inputs.emscripten_build || inputs.wasm_binaries_build }}
@@ -212,13 +245,13 @@ jobs:
212245
./tools/install.py ../emscripten_package
213246
npm ci --production --no-optional ../emscripten_package
214247
cd ../emscripten_package
215-
zip -r ../emscripten_package.zip .
248+
zip -r ../emscripten-package.zip .
216249
217-
- name: Archive emscripten_package.zip
250+
- name: Archive emscripten-package.zip
218251
uses: actions/upload-artifact@v3
219252
with:
220-
name: emscripten_package.zip
221-
path: emscripten_package.zip
253+
name: emscripten-package
254+
path: emscripten-package.zip
222255
retention-days: 1
223256

224257
build-wasm-binaries:
@@ -231,21 +264,21 @@ jobs:
231264

232265
- uses: actions/download-artifact@v3
233266
with:
234-
name: emscripten_package.zip
267+
name: emscripten-package
235268

236269
- uses: actions/download-artifact@v3
237270
with:
238-
name: llvm-arm64.zip
271+
name: llvm-arm64
239272

240273
- uses: actions/download-artifact@v3
241274
with:
242-
name: binaryen-arm64.zip
275+
name: binaryen-arm64
243276

244277
- name: Pack wasm-binaries for Arm64
245278
run: |
246279
ls
247280
New-Item -ItemType Directory -Force -Path emsdk/emscripten
248-
Expand-Archive -LiteralPath emscripten_package.zip -DestinationPath emsdk\emscripten
281+
Expand-Archive -LiteralPath emscripten-package.zip -DestinationPath emsdk\emscripten
249282
Expand-Archive -LiteralPath llvm-arm64.zip -DestinationPath emsdk
250283
Expand-Archive -LiteralPath binaryen-arm64.zip -DestinationPath emsdk
251284
cd emsdk
@@ -254,7 +287,7 @@ jobs:
254287
- name: Archive wasm-binaries-arm64.zip
255288
uses: actions/upload-artifact@v3
256289
with:
257-
name: wasm-binaries-arm64.zip
290+
name: wasm-binaries-arm64
258291
path: emsdk/wasm-binaries-arm64.zip
259292
retention-days: 3
260293

0 commit comments

Comments
 (0)