Skip to content

Commit f97ea93

Browse files
committed
Add Node build artifact to build-deps.yml
1 parent 3ebda06 commit f97ea93

File tree

1 file changed

+54
-35
lines changed

1 file changed

+54
-35
lines changed

.github/workflows/build-deps.yml

Lines changed: 54 additions & 35 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,71 +125,91 @@ 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
148+
149+
- name: Unpack Node.js package
150+
run: |
151+
cd node\out\Release
152+
dir
153+
rmdir node\bin /s /q
154+
Expand-Archive -Path node-v20.0.0-win-arm64.zip -DestinationPath node\bin
155+
dir node
156+
dir node\bin
157+
158+
- name: Archive node-v20.0.0-win-arm64.zip
159+
uses: actions/upload-artifact@v3
160+
with:
161+
name: node-v20.0.0-win-arm64
162+
path: node/out/Release/node-v20.0.0-win-arm64/node/bin
142163

143-
emscripten_build:
144-
if: ${{ inputs.emscripten_build }} || ${{ inputs.emsdk_build }}
164+
build-emscripten:
165+
if: ${{ inputs.emscripten_build || inputs.wasm_binaries_build }}
145166

146167
runs-on: [ubuntu-latest]
147168

148169
steps:
149-
150170
- name: Build Emscripten
151171
run: |
152172
git clone https://github.com/emscripten-core/emscripten.git --single-branch --depth 1
153173
cd emscripten
154174
./tools/install.py ../emscripten_package
155175
npm ci --production --no-optional ../emscripten_package
156176
cd ../emscripten_package
157-
zip -r ../emscripten_package.zip .
177+
zip -r ../emscripten-package.zip .
158178
159-
- name: Archive emscripten_package.zip
179+
- name: Archive emscripten-package.zip
160180
uses: actions/upload-artifact@v3
161181
with:
162-
name: emscripten_package.zip
163-
path: emscripten_package.zip
182+
name: emscripten-package
183+
path: emscripten-package.zip
164184
retention-days: 1
165185

166-
emsdk_build:
167-
if: ${{ inputs.emsdk_build }}
168-
needs: [emscripten_build,build-llvm-webassembly-arm64]
186+
build-wasm-binaries:
187+
if: ${{ inputs.wasm_binaries_build }}
188+
needs: [build-emscripten, build-llvm-webassembly-arm64]
169189

170190
runs-on: [windows-latest]
171191

172192
steps:
173193

174194
- uses: actions/download-artifact@v3
175195
with:
176-
name: emscripten_package.zip
196+
name: emscripten-package.zip
177197

178198
- uses: actions/download-artifact@v3
179199
with:
180200
name: llvm-arm64.zip
181-
182-
- name: Build emsdk arm64
201+
202+
- name: Pack wasm-binaries for Arm64
183203
run: |
184204
ls
185205
New-Item -ItemType Directory -Force -Path emsdk/emscripten
186-
Expand-Archive -LiteralPath emscripten_package.zip -DestinationPath emsdk\emscripten
206+
Expand-Archive -LiteralPath emscripten-package.zip -DestinationPath emsdk\emscripten
187207
Expand-Archive -LiteralPath llvm-arm64.zip -DestinationPath emsdk
188208
cd emsdk
189-
Compress-Archive -Path * -DestinationPath emsdk-arm64
209+
Compress-Archive -Path * -DestinationPath wasm-binaries
190210
191-
- name: Archive llvm-arm64.zip
211+
- name: Archive wasm-binaries.zip
192212
uses: actions/upload-artifact@v3
193213
with:
194-
name: emsdk-arm64.zip
195-
path: emsdk/emsdk-arm64.zip
196-
214+
name: wasm-binaries
215+
path: emsdk/wasm-binaries.zip

0 commit comments

Comments
 (0)