Skip to content

Commit 5f2b97c

Browse files
committed
2 parents 6a7bce8 + 3c564dc commit 5f2b97c

3 files changed

Lines changed: 37 additions & 2 deletions

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)

app/src/lib/helpers/git-dir.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ const getGitDirectoryBase = memoize((repository: Repository) => {
2424
// eslint-disable-next-line no-sync
2525
const contents = Fs.readFileSync(dotGit, 'utf8').trim()
2626
const gitDirPath = contents.replace(/^gitdir: /, '')
27-
return Path.join(repository.path, gitDirPath)
27+
if (Path.isAbsolute(gitDirPath)) {
28+
return gitDirPath
29+
} else {
30+
return Path.join(repository.path, gitDirPath)
31+
}
2832
} catch (e) {
2933
return dotGit
3034
}

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)