Skip to content

Commit 3c564dc

Browse files
committed
Rebuild missing Linux arm64 packages
1 parent 4ee88df commit 3c564dc

2 files changed

Lines changed: 32 additions & 1 deletion

File tree

.github/actions/setup-ci-environment/action.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,34 @@ runs:
3737
env:
3838
npm_config_arch: ${{ inputs.arch }}
3939
TARGET_ARCH: ${{ inputs.arch }}
40+
41+
- name: Install arm64 cross-compilation tools
42+
if: ${{ runner.os == 'Linux' && inputs.arch == 'arm64' }}
43+
shell: bash
44+
run: |
45+
sudo apt-get update -q
46+
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
47+
48+
- name: Rebuild native modules for arm64
49+
if: ${{ runner.os == 'Linux' && inputs.arch == 'arm64' }}
50+
shell: bash
51+
env:
52+
CC: aarch64-linux-gnu-gcc
53+
CXX: aarch64-linux-gnu-g++
54+
run: |
55+
NODE_GYP=node_modules/node-gyp/bin/node-gyp.js
56+
57+
# Rebuild printenvz (standalone executable, root node_modules)
58+
(cd node_modules/printenvz && node ../../$NODE_GYP rebuild --arch=arm64)
59+
60+
# Rebuild process-proxy: its install script only builds for process.arch (x64),
61+
# so we invoke node-gyp directly and copy the arm64 binary to the bin/ directory.
62+
(cd node_modules/process-proxy && \
63+
node ../../$NODE_GYP rebuild --arch=arm64 && \
64+
cp build/Release/process-proxy-linux-arm64 bin/process-proxy-linux-arm64)
65+
66+
# Rebuild desktop-trampoline (standalone executables, app/node_modules)
67+
(cd app/node_modules/desktop-trampoline && node ../../../$NODE_GYP rebuild --arch=arm64)
68+
69+
# Rebuild desktop-notifications (.node addon, app/node_modules)
70+
(cd app/node_modules/desktop-notifications && node ../../../$NODE_GYP rebuild --arch=arm64)

script/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ function copyDependencies() {
463463

464464
console.log(' Copying process-proxy binary')
465465
cpSync(
466-
getProxyCommandPath(),
466+
getProxyCommandPath(process.platform, getDistArchitecture()),
467467
path.resolve(
468468
outRoot,
469469
process.platform === 'win32' ? 'process-proxy.exe' : 'process-proxy'

0 commit comments

Comments
 (0)