This commit is contained in:
Philip Peterson 2025-04-24 20:01:06 -07:00
parent 92958d9de6
commit 83f2d2fca6
No known key found for this signature in database
GPG key ID: 354311183FC6519B
2 changed files with 81 additions and 81 deletions

View file

@ -122,78 +122,78 @@ jobs:
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: #build-linux-arm:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
strategy: # strategy:
matrix: # matrix:
include: # include:
- name: armv7l # - name: armv7l
cpu: cortex-a8 # cpu: cortex-a8
image: raspios_lite:latest # image: raspios_lite:latest
- name: arm64 # - name: arm64
cpu: cortex-a53 # cpu: cortex-a53
image: raspios_lite_arm64:latest # image: raspios_lite_arm64:latest
fail-fast: false # fail-fast: false
steps: # steps:
- name: Checkout # - name: Checkout
uses: actions/checkout@v4 # uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }} # - name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4 # uses: actions/setup-node@v4
with: # with:
node-version: ${{ env.NODE_VERSION }} # node-version: ${{ env.NODE_VERSION }}
- name: Fix node-gyp and Python # - name: Fix node-gyp and Python
run: python3 -m pip install packaging setuptools # run: python3 -m pip install packaging setuptools
- name: Get yarn cache directory path # - name: Get yarn cache directory path
id: yarn-cache-dir-path # id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT # run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache/restore@v4 # - uses: actions/cache/restore@v4
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') }}
restore-keys: | # restore-keys: |
${{ runner.os }}-yarn- # ${{ runner.os }}-yarn-
- name: Install # - name: Install
run: | # run: |
yarn install # yarn install
sudo apt update # sudo apt update
sudo apt install libarchive-tools # sudo apt install libarchive-tools
- name: Compile # - name: Compile
run: yarn run build # run: yarn run build
- name: rebuild node-pty # - name: rebuild node-pty
uses: pguyot/arm-runner-action@v2.6.5 # uses: pguyot/arm-runner-action@v2.6.5
with: # with:
image_additional_mb: 2000 # image_additional_mb: 2000
base_image: ${{ matrix.image }} # base_image: ${{ matrix.image }}
cpu: ${{ matrix.cpu }} # cpu: ${{ matrix.cpu }}
shell: bash # shell: bash
copy_artifact_path: target/node_modules/node-pty # copy_artifact_path: target/node_modules/node-pty
copy_artifact_dest: target/node_modules # copy_artifact_dest: target/node_modules
commands: | # commands: |
wget https://nodejs.org/dist/v18.16.0/node-v18.16.0-linux-${{ matrix.name }}.tar.xz # 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 # tar -xJf node-v18.16.0-linux-${{ matrix.name }}.tar.xz
sudo cp node-v18.16.0-linux-${{ matrix.name }}/* /usr/local/ -R # sudo cp node-v18.16.0-linux-${{ matrix.name }}/* /usr/local/ -R
npm run rebuild-node-pty # npm run rebuild-node-pty
- name: chown node-pty # - name: chown node-pty
run: | # run: |
sudo chown -R $USER:$USER target/node_modules/node-pty # sudo chown -R $USER:$USER target/node_modules/node-pty
- name: Prepare v8 snapshot # - name: Prepare v8 snapshot
if: matrix.name == 'armv7l' # if: matrix.name == 'armv7l'
run: | # run: |
sudo dpkg --add-architecture i386 # sudo dpkg --add-architecture i386
sudo apt update # sudo apt update
sudo apt install -y libglib2.0-0:i386 libexpat1:i386 libgcc-s1:i386 # sudo apt install -y libglib2.0-0:i386 libexpat1:i386 libgcc-s1:i386
npm_config_arch=armv7l yarn run v8-snapshot:arch # npm_config_arch=armv7l yarn run v8-snapshot:arch
- name: Build # - name: Build
run: yarn run electron-builder -l deb rpm AppImage pacman --${{ matrix.name }} -c electron-builder-linux-ci.json # run: yarn run electron-builder -l deb rpm AppImage pacman --${{ matrix.name }} -c electron-builder-linux-ci.json
env: # env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Archive Build Artifacts # - name: Archive Build Artifacts
uses: actions/upload-artifact@v4 # uses: actions/upload-artifact@v4
with: # with:
name: hyper-${{ runner.os }}-${{ matrix.name }} # name: hyper-${{ runner.os }}-${{ matrix.name }}
path: | # path: |
dist/*.snap # dist/*.snap
dist/*.AppImage # dist/*.AppImage
dist/*.deb # dist/*.deb
dist/*.rpm # dist/*.rpm
dist/*.pacman # dist/*.pacman

12
bin/mk-snapshot.js vendored
View file

@ -49,18 +49,18 @@ async function main() {
const startupBlobPath = path.join(outputBlobPath, 'snapshot_blob.bin'); const startupBlobPath = path.join(outputBlobPath, 'snapshot_blob.bin');
console.log(`Generating startup blob in "${outputBlobPath}"`); console.log(`Generating startup blob in "${outputBlobPath}"`);
childProcess.execSync( console.log(childProcess.execSync(
'ls', 'ls',
[path.resolve(__dirname, '..', 'node_modules')] [path.resolve(__dirname, '..', 'node_modules')]
); ).toString());
childProcess.execSync( console.log(childProcess.execSync(
'ls', 'ls',
[path.resolve(__dirname, '..', 'node_modules', 'electron-mksnapshot')] [path.resolve(__dirname, '..', 'node_modules', 'electron-mksnapshot')]
); ).toString());
childProcess.execSync( console.log(childProcess.execSync(
'ls', 'ls',
[path.resolve(__dirname, '..', 'node_modules', 'electron-mksnapshot', 'bin')] [path.resolve(__dirname, '..', 'node_modules', 'electron-mksnapshot', 'bin')]
); ).toString());
const res = childProcess.execFileSync( const res = childProcess.execFileSync(
path.resolve(__dirname, '..', 'node_modules', 'electron-mksnapshot', 'bin', 'mksnapshot' + (process.platform === 'win32' ? '.cmd' : '')), path.resolve(__dirname, '..', 'node_modules', 'electron-mksnapshot', 'bin', 'mksnapshot' + (process.platform === 'win32' ? '.cmd' : '')),
[ [