Fix ARM build (#230)
Some checks failed
CodeQL / Analyze (push) Has been cancelled

This commit is contained in:
Philip Peterson 2026-01-04 14:23:11 +00:00 committed by GitHub
parent 098176dafb
commit 1d2feae11c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 57 additions and 5 deletions

View file

@ -73,6 +73,11 @@ runs:
copy_artifact_path: target copy_artifact_path: target
copy_artifact_dest: target copy_artifact_dest: target
commands: | commands: |
# Install Python distutils in the ARM container
sudo apt-get update
sudo apt-get install -y python3-pip python3-setuptools python3-dev
pip3 install setuptools --break-system-packages || pip3 install setuptools
cd target cd target
# TODO upgrade node to 20.11.0 to match NODE_VERSION # TODO upgrade node to 20.11.0 to match NODE_VERSION
wget https://nodejs.org/dist/v18.16.0/node-v18.16.0-linux-${{ inputs.matrix-name }}.tar.xz wget https://nodejs.org/dist/v18.16.0/node-v18.16.0-linux-${{ inputs.matrix-name }}.tar.xz

View file

@ -84,7 +84,7 @@ jobs:
matrix-os: windows-latest matrix-os: windows-latest
matrix-name: win matrix-name: win
upload-artifact: false upload-artifact: false
# ARM Linux: # ARM Linux:
build-linux-armv7l: build-linux-armv7l:
@ -97,6 +97,28 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up QEMU and binfmt
run: |
# Install qemu-user-static
sudo apt-get update
sudo apt-get install -y qemu-user-static binfmt-support python3-setuptools
# Install distutils for node-gyp
sudo apt-get install -y python3-distutils || sudo apt-get install -y python3-dev python-is-python3
# Download and install binfmt configurations
wget https://github.com/qemu/qemu/raw/master/scripts/qemu-binfmt-conf.sh
chmod +x qemu-binfmt-conf.sh
sudo ./qemu-binfmt-conf.sh --qemu-path /usr/bin --qemu-suffix -static --debian
# Import the binfmt configurations
sudo update-binfmts --import qemu-arm
sudo update-binfmts --import qemu-aarch64
# Verify they exist
ls -la /proc/sys/fs/binfmt_misc/qemu-arm* || true
- name: Build ARMv7l - name: Build ARMv7l
uses: ./.github/actions/build-linux-arm uses: ./.github/actions/build-linux-arm
env: env:

View file

@ -84,6 +84,27 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up QEMU and binfmt
run: |
# Install qemu-user-static
sudo apt-get update
sudo apt-get install -y qemu-user-static binfmt-support python3-setuptools
# Install distutils for node-gyp
sudo apt-get install -y python3-distutils || sudo apt-get install -y python3-dev python-is-python3
# Download and install binfmt configurations
wget https://github.com/qemu/qemu/raw/master/scripts/qemu-binfmt-conf.sh
chmod +x qemu-binfmt-conf.sh
sudo ./qemu-binfmt-conf.sh --qemu-path /usr/bin --qemu-suffix -static --debian
# Import the binfmt configurations
sudo update-binfmts --import qemu-arm
sudo update-binfmts --import qemu-aarch64
# Verify they exist
ls -la /proc/sys/fs/binfmt_misc/qemu-arm* || true
- name: Build ARMv7l - name: Build ARMv7l
uses: ./.github/actions/build-linux-arm uses: ./.github/actions/build-linux-arm
env: env:
@ -134,7 +155,7 @@ jobs:
- name: List downloaded artifacts - name: List downloaded artifacts
run: ls -R ./artifacts run: ls -R ./artifacts
- name: Ensure non-empty artifacts - name: Ensure non-empty artifacts
run: | run: |
echo "Checking for zero-byte files in artifacts/..." echo "Checking for zero-byte files in artifacts/..."

View file

@ -65,7 +65,10 @@ export const createMenu = (
Created by Guillermo Rauch Created by Guillermo Rauch
Copyright © 2022 Vercel, Inc. Copyright © 2022 Vercel, Inc.
`.split('\n').map(z => z.trim()).join('\n'), `
.split('\n')
.map((z) => z.trim())
.join('\n'),
buttons: [], buttons: [],
icon: icon as any icon: icon as any
}); });

View file

@ -27,7 +27,7 @@ import toElectronBackgroundColor from '../utils/to-electron-background-color';
import contextMenuTemplate from './contextmenu'; import contextMenuTemplate from './contextmenu';
if(process.platform === 'darwin') { if (process.platform === 'darwin') {
electronDragClick(); electronDragClick();
} }

View file

@ -1,7 +1,8 @@
import React, {forwardRef} from 'react'; import React, {forwardRef} from 'react';
import {useDevicePixelRatio} from 'use-device-pixel-ratio';
import type {StyleSheetProps} from '../../typings/hyper'; import type {StyleSheetProps} from '../../typings/hyper';
import { useDevicePixelRatio } from 'use-device-pixel-ratio';
const StyleSheet = forwardRef<HTMLStyleElement, StyleSheetProps>((props, ref) => { const StyleSheet = forwardRef<HTMLStyleElement, StyleSheetProps>((props, ref) => {
const {borderColor} = props; const {borderColor} = props;