mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -09:00
wip
This commit is contained in:
parent
cdec527252
commit
45021820ee
4 changed files with 222 additions and 15 deletions
113
.github/actions/build-linux-arm/action.yml
vendored
Normal file
113
.github/actions/build-linux-arm/action.yml
vendored
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
name: 'Build Linux ARM'
|
||||
description: 'Cross-compiles Hyper app for ARMv7l and ARM64 using arm-runner'
|
||||
inputs:
|
||||
node-version:
|
||||
description: 'Node.js version to use'
|
||||
required: true
|
||||
matrix-name:
|
||||
description: 'Matrix name (arch)'
|
||||
required: true
|
||||
matrix-cpu:
|
||||
description: 'CPU architecture'
|
||||
required: true
|
||||
matrix-image:
|
||||
description: 'Base OS image for ARM emulation'
|
||||
required: true
|
||||
upload-artifact:
|
||||
description: 'Whether to upload artifacts'
|
||||
required: false
|
||||
default: 'true'
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ inputs.node-version }}
|
||||
|
||||
- name: Fix node-gyp and Python
|
||||
shell: bash
|
||||
run: |
|
||||
python3 -m pip install packaging setuptools
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
shell: bash
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/cache/restore@v4
|
||||
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 dependencies and tools
|
||||
shell: bash
|
||||
run: |
|
||||
yarn install
|
||||
sudo apt update
|
||||
sudo apt install libarchive-tools
|
||||
|
||||
- name: Compile
|
||||
shell: bash
|
||||
run: yarn run build
|
||||
|
||||
- name: Rebuild node-pty for ARM
|
||||
uses: pguyot/arm-runner-action@v2.6.5
|
||||
with:
|
||||
image_additional_mb: 2000
|
||||
base_image: ${{ inputs.matrix-image }}
|
||||
cpu: ${{ inputs.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-${{ inputs.matrix-name }}.tar.xz
|
||||
tar -xJf node-v18.16.0-linux-${{ inputs.matrix-name }}.tar.xz
|
||||
sudo cp node-v18.16.0-linux-${{ inputs.matrix-name }}/* /usr/local/ -R
|
||||
npm run rebuild-node-pty
|
||||
|
||||
- name: Chown rebuilt node-pty
|
||||
shell: bash
|
||||
run: |
|
||||
sudo chown -R $USER:$USER target/node_modules/node-pty
|
||||
|
||||
- name: Prepare v8 snapshot (only armv7l)
|
||||
if: ${{ inputs.matrix-name == 'armv7l' }}
|
||||
shell: bash
|
||||
run: |
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt update
|
||||
sudo apt install -y libglib2.0-0:i386 libexpat1:i386 libgcc-s1:i386
|
||||
npm_config_arch=armv7l yarn run v8-snapshot:arch
|
||||
|
||||
- name: Build final Electron App for ARM
|
||||
shell: bash
|
||||
run: |
|
||||
yarn run electron-builder -l deb rpm AppImage pacman --${{ inputs.matrix-name }} -c electron-builder-linux-ci.json
|
||||
env:
|
||||
GH_TOKEN: ${{ env.GH_TOKEN }}
|
||||
|
||||
- name: Archive Build Artifacts
|
||||
if: ${{ inputs.upload-artifact == 'true' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: hyper-linux-${{ inputs.matrix-name }}
|
||||
path: |
|
||||
dist/*.snap
|
||||
dist/*.AppImage
|
||||
dist/*.deb
|
||||
dist/*.rpm
|
||||
dist/*.pacman
|
||||
|
||||
# - name: Run E2E Tests on Linux
|
||||
# if: runner.os == 'Linux'
|
||||
# uses: GabrielBB/xvfb-action@v1.7
|
||||
# with:
|
||||
# run: |
|
||||
# yarn run test
|
||||
#
|
||||
30
.github/actions/build/action.yml
vendored
30
.github/actions/build/action.yml
vendored
|
|
@ -10,6 +10,10 @@ inputs:
|
|||
matrix-os:
|
||||
description: 'Matrix OS'
|
||||
required: true
|
||||
upload-artifact:
|
||||
description: 'Whether to upload artifacts'
|
||||
required: false
|
||||
default: 'true'
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
|
|
@ -138,21 +142,19 @@ runs:
|
|||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock', 'app/yarn.lock') }}
|
||||
|
||||
- name: Archive Build Artifacts
|
||||
if: ${{ inputs.upload-artifact == 'true' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: hyper-${{ runner.os }}
|
||||
path: |
|
||||
dist/*.dmg
|
||||
dist/*.snap
|
||||
dist/*.AppImage
|
||||
dist/*.deb
|
||||
dist/*.pacman
|
||||
dist/*.exe
|
||||
|
||||
|
||||
|
||||
# - name: Archive Build Artifacts
|
||||
# uses: actions/upload-artifact@v4
|
||||
# with:
|
||||
# name: hyper-${{ runner.os }}
|
||||
# path: |
|
||||
# dist/*.dmg
|
||||
# dist/*.snap
|
||||
# dist/*.AppImage
|
||||
# dist/*.deb
|
||||
# dist/*.pacman
|
||||
# dist/*.exe
|
||||
#
|
||||
# - name: Run E2E Tests (non-Linux)
|
||||
# if: runner.os != 'Linux'
|
||||
# shell: bash
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ jobs:
|
|||
node-version: ${{ env.NODE_VERSION }}
|
||||
matrix-os: ubuntu-latest
|
||||
matrix-name: ubuntu
|
||||
upload-artifact: false
|
||||
|
||||
build-macos:
|
||||
name: Build macOS
|
||||
|
|
@ -48,4 +49,39 @@ jobs:
|
|||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
matrix-os: macos-latest
|
||||
matrix-name: macos
|
||||
matrix-name: macos
|
||||
upload-artifact: false
|
||||
|
||||
# ARM Linux:
|
||||
|
||||
build-linux-armv7l:
|
||||
name: Build Linux ARMv7l
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build ARMv7l
|
||||
uses: ./.github/actions/build-linux-arm
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
matrix-name: armv7l
|
||||
matrix-cpu: cortex-a8
|
||||
matrix-image: raspios_lite:latest
|
||||
upload-artifact: false
|
||||
|
||||
build-linux-arm64:
|
||||
name: Build Linux ARM64
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build ARM64
|
||||
uses: ./.github/actions/build-linux-arm
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
matrix-name: arm64
|
||||
matrix-cpu: cortex-a53
|
||||
matrix-image: raspios_lite_arm64:latest
|
||||
upload-artifact: false
|
||||
56
.github/workflows/release.yml
vendored
56
.github/workflows/release.yml
vendored
|
|
@ -34,6 +34,7 @@ jobs:
|
|||
node-version: ${{ env.NODE_VERSION }}
|
||||
matrix-os: ubuntu-latest
|
||||
matrix-name: ubuntu
|
||||
upload-artifact: true
|
||||
|
||||
build-macos:
|
||||
name: Build macOS
|
||||
|
|
@ -48,12 +49,67 @@ jobs:
|
|||
node-version: ${{ env.NODE_VERSION }}
|
||||
matrix-os: macos-latest
|
||||
matrix-name: macos
|
||||
upload-artifact: true
|
||||
|
||||
build-windows:
|
||||
name: Build Windows
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build
|
||||
uses: ./.github/actions/build
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
matrix-os: windows-latest
|
||||
matrix-name: win
|
||||
upload-artifact: true
|
||||
|
||||
# ARM Linux:
|
||||
|
||||
build-linux-armv7l:
|
||||
name: Build Linux ARMv7l
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build ARMv7l
|
||||
uses: ./.github/actions/build-linux-arm
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
matrix-name: armv7l
|
||||
matrix-cpu: cortex-a8
|
||||
matrix-image: raspios_lite:latest
|
||||
upload-artifact: true
|
||||
|
||||
build-linux-arm64:
|
||||
name: Build Linux ARM64
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build ARM64
|
||||
uses: ./.github/actions/build-linux-arm
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
matrix-name: arm64
|
||||
matrix-cpu: cortex-a53
|
||||
matrix-image: raspios_lite_arm64:latest
|
||||
upload-artifact: true
|
||||
|
||||
###
|
||||
|
||||
upload-release:
|
||||
name: Upload and Create Release
|
||||
needs:
|
||||
- build-ubuntu
|
||||
- build-macos
|
||||
- build-windows
|
||||
- build-linux-armv7l
|
||||
- build-linux-arm64
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download all artifacts
|
||||
|
|
|
|||
Loading…
Reference in a new issue