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,64 +125,96 @@ 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- build_emscripten :
144- if : ${{ inputs.emscripten_build || inputs.emsdk_build }}
149+ - name : Prepare Node.js package
150+ run : |
151+ cd .\node\out\Release
152+ Remove-Item -Path .\tmp -Recurse -Force -ErrorAction Ignore
153+ New-Item -ItemType Directory -Force -Path .\tmp\node-v20.0.0-win-arm64\bin
154+ cp .\node-v20.0.0-win-arm64\* .\tmp\node-v20.0.0-win-arm64\bin
155+ ls .\tmp\node-v20.0.0-win-arm64\bin
156+ ls .\tmp\node-v20.0.0-win-arm64\bin\node_modules
157+ Compress-Archive -Path .\tmp\node-v20.0.0-win-arm64 -DestinationPath node-v20.0.0-win-arm64-2.zip
158+
159+ - name : Archive node-v20.0.0-win-arm64.zip
160+ uses : actions/upload-artifact@v3
161+ with :
162+ name : node-v20.0.0-win-arm64
163+ path : node/out/Release/tmp/*
164+
165+ - name : Archive node-v20.0.0-win-arm64-2.zip
166+ uses : actions/upload-artifact@v3
167+ with :
168+ name : node-v20.0.0-win-arm64-2
169+ path : node/out/Release/node-v20.0.0-win-arm64-2.zip
170+
171+ - name : Cleanup
172+ run : |
173+ Remove-Item -Path .\node\out\Release\tmp -Recurse -Force -ErrorAction Ignore
174+
175+ build-emscripten :
176+ if : ${{ inputs.emscripten_build || inputs.wasm_binaries_build }}
145177
146178 runs-on : [ubuntu-latest]
147179
148180 steps :
149-
150181 - name : Build Emscripten
151182 run : |
152183 git clone https://github.com/emscripten-core/emscripten.git --single-branch --depth 1
153184 cd emscripten
154185 ./tools/install.py ../emscripten_package
155186 npm ci --production --no-optional ../emscripten_package
156187 cd ../emscripten_package
157- zip -r ../emscripten_package .zip .
188+ zip -r ../emscripten-package .zip .
158189
159- - name : Archive emscripten_package .zip
190+ - name : Archive emscripten-package .zip
160191 uses : actions/upload-artifact@v3
161192 with :
162- name : emscripten_package.zip
163- path : emscripten_package .zip
193+ name : emscripten-package
194+ path : emscripten-package .zip
164195 retention-days : 1
165196
166- buils_emsdk :
167- if : ${{ inputs.emsdk_build }}
168- needs : [build_emscripten, build-llvm-webassembly-arm64]
197+ build-wasm-binaries :
198+ if : ${{ inputs.wasm_binaries_build }}
199+ needs : [build-emscripten, build-llvm-webassembly-arm64]
169200
170201 runs-on : [windows-latest]
171202
172203 steps :
173204
174205 - uses : actions/download-artifact@v3
175206 with :
176- name : emscripten_package .zip
207+ name : emscripten-package .zip
177208
178209 - uses : actions/download-artifact@v3
179210 with :
180211 name : llvm-arm64.zip
181-
182- - name : Build emsdk arm64
212+
213+ - name : Pack wasm-binaries for Arm64
183214 run : |
184215 ls
185216 New-Item -ItemType Directory -Force -Path emsdk/emscripten
186- Expand-Archive -LiteralPath emscripten_package .zip -DestinationPath emsdk\emscripten
217+ Expand-Archive -LiteralPath emscripten-package .zip -DestinationPath emsdk\emscripten
187218 Expand-Archive -LiteralPath llvm-arm64.zip -DestinationPath emsdk
188219 cd emsdk
189220 Compress-Archive -Path * -DestinationPath wasm-binaries-arm64
@@ -193,4 +224,3 @@ jobs:
193224 with :
194225 name : wasm-binaries-arm64.zip
195226 path : emsdk/wasm-binaries-arm64.zip
196-
0 commit comments