Skip to content

Commit 152b576

Browse files
committed
Add Node build artifact to build-deps.yml
1 parent ca008c7 commit 152b576

File tree

1 file changed

+58
-31
lines changed

1 file changed

+58
-31
lines changed

.github/workflows/build-deps.yml

Lines changed: 58 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,43 @@ 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
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

3232
jobs:
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
@@ -73,7 +72,7 @@ jobs:
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',
@@ -99,7 +98,7 @@ jobs:
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,93 @@ 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+
ls .\node-v20.0.0-win-arm64
155+
ls .\node-v20.0.0-win-arm64\node_modules
156+
ls .\tmp\node-v20.0.0-win-arm64
157+
cp .\node-v20.0.0-win-arm64\* .\tmp\node-v20.0.0-win-arm64\bin
158+
ls .\tmp\node-v20.0.0-win-arm64
159+
ls .\tmp\node-v20.0.0-win-arm64\bin
160+
ls .\tmp\node-v20.0.0-win-arm64\bin\node_modules
161+
162+
- name: Archive node-v20.0.0-win-arm64.zip
163+
uses: actions/upload-artifact@v3
164+
with:
165+
name: node-v20.0.0-win-arm64
166+
path: node/out/Release/tmp/*
167+
168+
- name: Cleanup
169+
run: |
170+
Remove-Item -Path .\node\out\Release\tmp -Recurse -Force -ErrorAction Ignore
171+
172+
build-emscripten:
173+
if: ${{ inputs.emscripten_build || inputs.wasm_binaries_build }}
145174

146175
runs-on: [ubuntu-latest]
147176

148177
steps:
149-
150178
- name: Build Emscripten
151179
run: |
152180
git clone https://github.com/emscripten-core/emscripten.git --single-branch --depth 1
153181
cd emscripten
154182
./tools/install.py ../emscripten_package
155183
npm ci --production --no-optional ../emscripten_package
156184
cd ../emscripten_package
157-
zip -r ../emscripten_package.zip .
185+
zip -r ../emscripten-package.zip .
158186
159-
- name: Archive emscripten_package.zip
187+
- name: Archive emscripten-package.zip
160188
uses: actions/upload-artifact@v3
161189
with:
162-
name: emscripten_package.zip
163-
path: emscripten_package.zip
190+
name: emscripten-package
191+
path: emscripten-package.zip
164192
retention-days: 1
165193

166-
buils_emsdk:
167-
if: ${{ inputs.emsdk_build }}
168-
needs: [build_emscripten,build-llvm-webassembly-arm64]
194+
build-wasm-binaries:
195+
if: ${{ inputs.wasm_binaries_build }}
196+
needs: [build-emscripten, build-llvm-webassembly-arm64]
169197

170198
runs-on: [windows-latest]
171199

172200
steps:
173201

174202
- uses: actions/download-artifact@v3
175203
with:
176-
name: emscripten_package.zip
204+
name: emscripten-package.zip
177205

178206
- uses: actions/download-artifact@v3
179207
with:
180208
name: llvm-arm64.zip
181-
182-
- name: Build emsdk arm64
209+
210+
- name: Pack wasm-binaries for Arm64
183211
run: |
184212
ls
185213
New-Item -ItemType Directory -Force -Path emsdk/emscripten
186-
Expand-Archive -LiteralPath emscripten_package.zip -DestinationPath emsdk\emscripten
214+
Expand-Archive -LiteralPath emscripten-package.zip -DestinationPath emsdk\emscripten
187215
Expand-Archive -LiteralPath llvm-arm64.zip -DestinationPath emsdk
188216
cd emsdk
189217
Compress-Archive -Path * -DestinationPath wasm-binaries-arm64
@@ -193,4 +221,3 @@ jobs:
193221
with:
194222
name: wasm-binaries-arm64.zip
195223
path: emsdk/wasm-binaries-arm64.zip
196-

0 commit comments

Comments
 (0)