Skip to content

Commit 955f72b

Browse files
committed
Add Node build artifact to build-deps.yml
1 parent ba1b59f commit 955f72b

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
@@ -19,17 +19,17 @@ on:
1919
default: false
2020
type: boolean
2121
emscripten_build:
22-
description: 'Emscripten'
22+
description: 'Emscripten Arm64'
2323
required: false
2424
default: false
2525
type: boolean
2626
nodejs_build:
27-
description: 'Node.js arm64'
27+
description: 'Node.js Arm64'
2828
required: false
2929
default: false
3030
type: boolean
3131
wasm_binaries_build:
32-
description: 'WASM binaries arm64'
32+
description: 'WASM binaries Arm64'
3333
required: false
3434
default: false
3535
type: boolean
@@ -43,7 +43,7 @@ jobs:
4343

4444
steps:
4545

46-
- name: Build LLVM WebAssembly arm64
46+
- name: Build LLVM WebAssembly for Arm64
4747
shell: cmd
4848
run: |
4949
git clone --config core.autocrlf=false https://github.com/llvm/llvm-project.git --single-branch --depth 1
@@ -103,7 +103,7 @@ jobs:
103103
- name: Archive llvm-arm64.zip
104104
uses: actions/upload-artifact@v3
105105
with:
106-
name: llvm-arm64.zip
106+
name: llvm-arm64
107107
path: llvm-project/build_arm64/llvm-arm64.zip
108108
retention-days: 1
109109

@@ -114,7 +114,7 @@ jobs:
114114

115115
steps:
116116

117-
- name: Build LLVM WebAssembly arm64 (Cross Compilation)
117+
- name: Build LLVM WebAssembly for Arm64 (Cross Compilation)
118118
run: |
119119
Set-PSDebug -Trace 1
120120
git clone --config core.autocrlf=false https://github.com/llvm/llvm-project.git --single-branch --branch main --depth 1
@@ -152,7 +152,7 @@ jobs:
152152
- name: Archive binaryen-arm64.zip
153153
uses: actions/upload-artifact@v3
154154
with:
155-
name: binaryen-arm64.zip
155+
name: binaryen-arm64
156156
path: binaryen/binaryen-arm64.zip
157157
retention-days: 1
158158

@@ -163,12 +163,45 @@ jobs:
163163

164164
steps:
165165

166-
- name: Build Node.js arm64
166+
- name: Add 7-Zip to PATH
167+
run: |
168+
echo "PATH=$env:PATH;C:\Program Files\7-Zip" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
169+
170+
- name: Check 7-Zip installed
171+
run: |
172+
7z
173+
174+
- name: Build Node.js for Arm64
167175
run: |
168-
Set-PSDebug -Trace 1
169176
git clone https://github.com/Windows-on-ARM-Experiments/node.git --single-branch -b fix-arm64-compilation --depth 1
170177
cd node
171-
.\vcbuild openssl-no-asm arm64
178+
.\vcbuild.bat arm64 package
179+
180+
- name: Prepare Node.js package
181+
run: |
182+
cd .\node\out\Release
183+
Remove-Item -Path .\tmp -Recurse -Force -ErrorAction Ignore
184+
New-Item -ItemType Directory -Force -Path .\tmp\node-v20.0.0-win-arm64\bin
185+
cp .\node-v20.0.0-win-arm64\* .\tmp\node-v20.0.0-win-arm64\bin
186+
ls .\tmp\node-v20.0.0-win-arm64\bin
187+
ls .\tmp\node-v20.0.0-win-arm64\bin\node_modules
188+
Compress-Archive -Path .\tmp\node-v20.0.0-win-arm64 -DestinationPath node-v20.0.0-win-arm64-2.zip
189+
190+
- name: Archive node-v20.0.0-win-arm64.zip
191+
uses: actions/upload-artifact@v3
192+
with:
193+
name: node-v20.0.0-win-arm64
194+
path: node/out/Release/tmp/*
195+
196+
- name: Archive node-v20.0.0-win-arm64-2.zip
197+
uses: actions/upload-artifact@v3
198+
with:
199+
name: node-v20.0.0-win-arm64-2
200+
path: node/out/Release/node-v20.0.0-win-arm64-2.zip
201+
202+
- name: Cleanup
203+
run: |
204+
Remove-Item -Path .\node\out\Release\tmp -Recurse -Force -ErrorAction Ignore
172205
173206
build-emscripten:
174207
if: ${{ inputs.emscripten_build || inputs.wasm_binaries_build }}
@@ -184,13 +217,13 @@ jobs:
184217
./tools/install.py ../emscripten_package
185218
npm ci --production --no-optional ../emscripten_package
186219
cd ../emscripten_package
187-
zip -r ../emscripten_package.zip .
220+
zip -r ../emscripten-package.zip .
188221
189-
- name: Archive emscripten_package.zip
222+
- name: Archive emscripten-package.zip
190223
uses: actions/upload-artifact@v3
191224
with:
192-
name: emscripten_package.zip
193-
path: emscripten_package.zip
225+
name: emscripten-package
226+
path: emscripten-package.zip
194227
retention-days: 1
195228

196229
build-wasm-binaries:
@@ -203,21 +236,21 @@ jobs:
203236

204237
- uses: actions/download-artifact@v3
205238
with:
206-
name: emscripten_package.zip
239+
name: emscripten-package
207240

208241
- uses: actions/download-artifact@v3
209242
with:
210-
name: llvm-arm64.zip
243+
name: llvm-arm64
211244

212245
- uses: actions/download-artifact@v3
213246
with:
214-
name: binaryen-arm64.zip
247+
name: binaryen-arm64
215248

216249
- name: Pack wasm-binaries for Arm64
217250
run: |
218251
ls
219252
New-Item -ItemType Directory -Force -Path emsdk/emscripten
220-
Expand-Archive -LiteralPath emscripten_package.zip -DestinationPath emsdk\emscripten
253+
Expand-Archive -LiteralPath emscripten-package.zip -DestinationPath emsdk\emscripten
221254
Expand-Archive -LiteralPath llvm-arm64.zip -DestinationPath emsdk
222255
Expand-Archive -LiteralPath binaryen-arm64.zip -DestinationPath emsdk
223256
cd emsdk
@@ -226,7 +259,7 @@ jobs:
226259
- name: Archive wasm-binaries-arm64.zip
227260
uses: actions/upload-artifact@v3
228261
with:
229-
name: wasm-binaries-arm64.zip
262+
name: wasm-binaries-arm64
230263
path: emsdk/wasm-binaries-arm64.zip
231264
retention-days: 3
232265

0 commit comments

Comments
 (0)