Skip to content

Commit

Permalink
rebuild some problematic packages for arm64
Browse files Browse the repository at this point in the history
node-gyp does not support cross compilation nodejs/node-gyp#829 . prebuild-install properly detects that the current system is arm64 and there are not prebuilts available which causes the node-gyp rebuild to be executed in yarn. However since node-gyp does not support cross compilation is ends up building x86_64 binaries again.

Additionally, the package.json of desktop-trampoline and desktop-notifications call the system install of node-gyp and not the version installed by node. The system install of node-gyp has an issue that causes linking to fail during cross compilation. Calling with npx results in using the node install of node-gyp and avoids this issue.
  • Loading branch information
theofficialgman committed Jul 7, 2023
1 parent 77e661d commit 1b40966
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ jobs:
run: yarn
env:
npm_config_arch: ${{ matrix.arch }}
- name: Rebuild some native packages for arm64
if: ${{ matrix.os == 'ubuntu-20.04' && matrix.arch == 'arm64' }}
env:
npm_config_arch: ${{ matrix.arch }}
run: |
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
cd app/node_modules/desktop-trampoline
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ npx node-gyp rebuild
cd ../../../
cd app/node_modules/desktop-notifications
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ npx node-gyp rebuild
cd ../../../
- name: Validate Electron version
run: yarn run validate-electron-version
- name: Lint
Expand Down

0 comments on commit 1b40966

Please sign in to comment.