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
1616 emscripten_build :
17- description : ' Emscripten'
17+ description : ' Emscripten Arm64 '
1818 required : false
1919 default : false
2020 type : boolean
2121 nodejs_build :
22- description : ' Node.js arm64 '
22+ description : ' Node.js Arm64 '
2323 required : false
2424 default : false
2525 type : boolean
26- emsdk_build :
27- description : ' emsdk arm64 '
26+ wasm_binaries_build :
27+ description : ' Wasm binaries Arm64 '
2828 required : false
2929 default : false
3030 type : boolean
3131
3232jobs :
3333 build-llvm-webassembly-arm64 :
34- if : ${{ inputs.llvm_build }} || ${{ inputs.emsdk_build }}
34+ if : ${{ inputs.llvm_build || inputs.wasm_binaries_build }}
3535
3636 runs-on : [self-hosted, Windows, ARM64, WASM]
3737 timeout-minutes : 600
3838
3939 steps :
4040
41- - name : Build LLVM WebAssembly arm64
41+ - name : Build LLVM WebAssembly for Arm64
4242 shell : cmd
4343 run : |
44- exit
4544 git clone --config core.autocrlf=false https://github.com/llvm/llvm-project.git --single-branch --depth 1
4645 cd llvm-project
4746 if exist build_arm64 rmdir /s /q build_arm64
7372 cd build_arm64
7473 ninja -v install-distribution
7574
76- - name : Pack llvm-arm64.zip
75+ - name : Pack llvm-main-win- arm64.zip
7776 run : |
7877 cd llvm-project/build_arm64
7978 $unneeded_tool = 'clang-check', 'clang-cl', 'clang-cpp',
9998 - name : Archive llvm-arm64.zip
10099 uses : actions/upload-artifact@v3
101100 with :
102- name : llvm-arm64.zip
101+ name : llvm-arm64
103102 path : llvm-project/build_arm64/llvm-arm64.zip
104103 retention-days : 1
105104
@@ -110,7 +109,7 @@ jobs:
110109
111110 steps :
112111
113- - name : Build LLVM WebAssembly arm64 (Cross Compilation)
112+ - name : Build LLVM WebAssembly for Arm64 (Cross Compilation)
114113 run : |
115114 Set-PSDebug -Trace 1
116115 git clone --config core.autocrlf=false https://github.com/llvm/llvm-project.git --single-branch --branch main --depth 1
@@ -126,71 +125,89 @@ jobs:
126125 -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_TESTS=OFF
127126 cmake --build build_arm64 --config MinSizeRel
128127
129- build-nodejs-arm64 :
128+ build-nodejs :
130129 if : ${{ inputs.nodejs_build }}
131130
132131 runs-on : [self-hosted, Windows, ARM64, WASM]
133132
134133 steps :
135134
136- - name : Build Node.js arm64
135+ - name : Add 7-Zip to PATH
136+ run : |
137+ echo "PATH=$env:PATH;C:\Program Files\7-Zip" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
138+
139+ - name : Check 7-Zip installed
140+ run : |
141+ 7z
142+
143+ - name : Build Node.js for Arm64
137144 run : |
138- Set-PSDebug -Trace 1
139145 git clone https://github.com/Windows-on-ARM-Experiments/node.git --single-branch -b fix-arm64-compilation --depth 1
140146 cd node
141- .\vcbuild openssl-no-asm arm64
147+ .\vcbuild.bat arm64 package
142148
143- emscripten_build :
144- if : ${{ inputs.emscripten_build }} || ${{ inputs.emsdk_build }}
149+ - name : Unpack Node.js package
150+ run : |
151+ cd node\out\Release
152+ dir
153+ Expand-Archive -Path node-v20.0.0-win-arm64.zip -DestinationPath node\bin
154+ dir
155+
156+ - name : Archive node-v20.0.0-win-arm64.zip
157+ uses : actions/upload-artifact@v3
158+ with :
159+ name : node-v20.0.0-win-arm64
160+ path : node/out/Release/node-v20.0.0-win-arm64/node/bin
161+
162+ build-emscripten :
163+ if : ${{ inputs.emscripten_build || inputs.wasm_binaries_build }}
145164
146165 runs-on : [ubuntu-latest]
147166
148167 steps :
149-
150168 - name : Build Emscripten
151169 run : |
152170 git clone https://github.com/emscripten-core/emscripten.git --single-branch --depth 1
153171 cd emscripten
154172 ./tools/install.py ../emscripten_package
155173 npm ci --production --no-optional ../emscripten_package
156174 cd ../emscripten_package
157- zip -r ../emscripten_package .zip .
175+ zip -r ../emscripten-package .zip .
158176
159- - name : Archive emscripten_package .zip
177+ - name : Archive emscripten-package .zip
160178 uses : actions/upload-artifact@v3
161179 with :
162- name : emscripten_package.zip
163- path : emscripten_package .zip
180+ name : emscripten-package
181+ path : emscripten-package .zip
164182 retention-days : 1
165183
166- emsdk_build :
167- if : ${{ inputs.emsdk_build }}
168- needs : [emscripten_build, build-llvm-webassembly-arm64]
184+ build-wasm-binaries :
185+ if : ${{ inputs.wasm_binaries_build }}
186+ needs : [build-emscripten, build-llvm-webassembly-arm64]
169187
170188 runs-on : [windows-latest]
171189
172190 steps :
173191
174192 - uses : actions/download-artifact@v3
175193 with :
176- name : emscripten_package .zip
194+ name : emscripten-package .zip
177195
178196 - uses : actions/download-artifact@v3
179197 with :
180198 name : llvm-arm64.zip
181-
182- - name : Build emsdk arm64
199+
200+ - name : Pack wasm-binaries for Arm64
183201 run : |
184202 ls
185203 New-Item -ItemType Directory -Force -Path emsdk/emscripten
186- Expand-Archive -LiteralPath emscripten_package .zip -DestinationPath emsdk\emscripten
204+ Expand-Archive -LiteralPath emscripten-package .zip -DestinationPath emsdk\emscripten
187205 Expand-Archive -LiteralPath llvm-arm64.zip -DestinationPath emsdk
188206 cd emsdk
189- Compress-Archive -Path * -DestinationPath emsdk-arm64
207+ Compress-Archive -Path * -DestinationPath wasm-binaries
190208
191- - name : Archive llvm-arm64 .zip
209+ - name : Archive wasm-binaries .zip
192210 uses : actions/upload-artifact@v3
193211 with :
194- name : emsdk-arm64.zip
195- path : emsdk/emsdk-arm64.zip
196-
212+ name : wasm-binaries
213+ path : emsdk/wasm-binaries.zip
0 commit comments