mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
rebuild node-pty on chroot for linux arm builds
add linux armhf builds
This commit is contained in:
parent
5ec276ea1f
commit
20de964f53
4 changed files with 80 additions and 29 deletions
68
.github/workflows/nodejs.yml
vendored
68
.github/workflows/nodejs.yml
vendored
|
|
@ -97,3 +97,71 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock', 'app/yarn.lock') }}
|
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock', 'app/yarn.lock') }}
|
||||||
|
|
||||||
|
build-linux-arm:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- name: armv7l
|
||||||
|
cpu: cortex-a8
|
||||||
|
image: raspios_lite:latest
|
||||||
|
- name: arm64
|
||||||
|
cpu: cortex-a53
|
||||||
|
image: raspios_lite_arm64:latest
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Use Node.js ${{ env.NODE_VERSION }}
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: ${{ env.NODE_VERSION }}
|
||||||
|
- name: Get yarn cache directory path
|
||||||
|
id: yarn-cache-dir-path
|
||||||
|
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
||||||
|
- uses: actions/cache/restore@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock', 'app/yarn.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-yarn-
|
||||||
|
- name: Install
|
||||||
|
run: yarn install
|
||||||
|
- name: Compile
|
||||||
|
run: yarn run build
|
||||||
|
- name: rebuild node-pty
|
||||||
|
uses: pguyot/arm-runner-action@v2.5.2
|
||||||
|
with:
|
||||||
|
image_additional_mb: 2000
|
||||||
|
base_image: ${{ matrix.image }}
|
||||||
|
cpu: ${{ matrix.cpu }}
|
||||||
|
shell: bash
|
||||||
|
copy_artifact_path: target/node_modules/node-pty
|
||||||
|
copy_artifact_dest: target/node_modules
|
||||||
|
commands: |
|
||||||
|
wget https://nodejs.org/dist/v18.16.0/node-v18.16.0-linux-${{ matrix.name }}.tar.xz
|
||||||
|
tar -xJf node-v18.16.0-linux-${{ matrix.name }}.tar.xz
|
||||||
|
sudo cp node-v18.16.0-linux-${{ matrix.name }}/* /usr/local/ -R
|
||||||
|
npm run rebuild-node-pty
|
||||||
|
- name: chown node-pty
|
||||||
|
run: |
|
||||||
|
sudo chown -R $USER:$USER target/node_modules/node-pty
|
||||||
|
- name: Prepare v8 snapshot
|
||||||
|
if: matrix.name == 'armv7l'
|
||||||
|
run: |
|
||||||
|
sudo dpkg --add-architecture i386
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y libpcre2-8-0=10.34-7 --allow-downgrades
|
||||||
|
sudo apt install -y libglib2.0-0:i386 libexpat1:i386
|
||||||
|
npm_config_arch=armv7l yarn run v8-snapshot:arch
|
||||||
|
- name: Build
|
||||||
|
run: yarn run electron-builder -l deb rpm AppImage --${{ matrix.name }} -c electron-builder-linux-ci.json
|
||||||
|
- name: Archive Build Artifacts
|
||||||
|
uses: LabhanshAgrawal/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
dist/*.snap
|
||||||
|
dist/*.AppImage
|
||||||
|
dist/*.deb
|
||||||
|
dist/*.rpm
|
||||||
|
|
|
||||||
6
electron-builder-linux-ci.json
Normal file
6
electron-builder-linux-ci.json
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"$schema": "http://json.schemastore.org/electron-builder",
|
||||||
|
"extends": "electron-builder.json",
|
||||||
|
"afterSign": null,
|
||||||
|
"npmRebuild": false
|
||||||
|
}
|
||||||
|
|
@ -20,33 +20,10 @@
|
||||||
"linux": {
|
"linux": {
|
||||||
"category": "TerminalEmulator",
|
"category": "TerminalEmulator",
|
||||||
"target": [
|
"target": [
|
||||||
{
|
"deb",
|
||||||
"target": "deb",
|
"AppImage",
|
||||||
"arch": [
|
"rpm",
|
||||||
"x64",
|
"snap"
|
||||||
"arm64"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"target": "AppImage",
|
|
||||||
"arch": [
|
|
||||||
"x64",
|
|
||||||
"arm64"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"target": "rpm",
|
|
||||||
"arch": [
|
|
||||||
"x64",
|
|
||||||
"arm64"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"target": "snap",
|
|
||||||
"arch": [
|
|
||||||
"x64"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"win": {
|
"win": {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
"start": "echo 'please run `yarn run dev` in one tab and then `yarn run app` in another one'",
|
"start": "echo 'please run `yarn run dev` in one tab and then `yarn run app` in another one'",
|
||||||
"app": "cross-env ELECTRONMON_LOGLEVEL=error electronmon target",
|
"app": "cross-env ELECTRONMON_LOGLEVEL=error electronmon target",
|
||||||
"dev": "concurrently -n \"Webpack,TypeScript\" -c \"cyan.bold,blue.bold\" \"webpack -w\" \"tsc --build -v --pretty --watch --preserveWatchOutput\" -k",
|
"dev": "concurrently -n \"Webpack,TypeScript\" -c \"cyan.bold,blue.bold\" \"webpack -w\" \"tsc --build -v --pretty --watch --preserveWatchOutput\" -k",
|
||||||
"build": "cross-env NODE_ENV=production webpack && tsc -b -v",
|
"build": "cross-env NODE_ENV=production webpack && tsc -b -v && cross-env BABEL_ENV=production babel target/renderer/bundle.js --out-file target/renderer/bundle.js --no-comments --minified",
|
||||||
"lint": "eslint . --ext .js,.jsx,.ts,.tsx,.json",
|
"lint": "eslint . --ext .js,.jsx,.ts,.tsx,.json",
|
||||||
"test": "yarn run lint && yarn run test:unit",
|
"test": "yarn run lint && yarn run test:unit",
|
||||||
"test:unit": "ava",
|
"test:unit": "ava",
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
"test:e2e": "ava --config ava-e2e.config.js",
|
"test:e2e": "ava --config ava-e2e.config.js",
|
||||||
"postinstall": "yarn run v8-snapshot && webpack --config-name hyper-app && electron-builder install-app-deps && yarn run rebuild-node-pty && cpy --cwd=target node_modules \"../app/\" && husky install && yarn run generate-schema",
|
"postinstall": "yarn run v8-snapshot && webpack --config-name hyper-app && electron-builder install-app-deps && yarn run rebuild-node-pty && cpy --cwd=target node_modules \"../app/\" && husky install && yarn run generate-schema",
|
||||||
"rebuild-node-pty": "electron-rebuild -f -o node-pty -m target",
|
"rebuild-node-pty": "electron-rebuild -f -o node-pty -m target",
|
||||||
"dist": "yarn run build && cross-env BABEL_ENV=production babel target/renderer/bundle.js --out-file target/renderer/bundle.js --no-comments --minified && electron-builder",
|
"dist": "yarn run build && electron-builder",
|
||||||
"clean": "node ./bin/rimraf-standalone.js node_modules && node ./bin/rimraf-standalone.js ./app/node_modules && node ./bin/rimraf-standalone.js ./app/renderer",
|
"clean": "node ./bin/rimraf-standalone.js node_modules && node ./bin/rimraf-standalone.js ./app/node_modules && node ./bin/rimraf-standalone.js ./app/renderer",
|
||||||
"v8-snapshot": "cross-env npm_config_arch=x64 yarn run v8-snapshot:arch && cross-env npm_config_arch=arm64 yarn run v8-snapshot:arch",
|
"v8-snapshot": "cross-env npm_config_arch=x64 yarn run v8-snapshot:arch && cross-env npm_config_arch=arm64 yarn run v8-snapshot:arch",
|
||||||
"v8-snapshot:arch": "yarn run mk-snapshot && yarn run cp-snapshot",
|
"v8-snapshot:arch": "yarn run mk-snapshot && yarn run cp-snapshot",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue