Skip to content

Commit 3aed45e

Browse files
committed
test linux arm64 build
1 parent d9cf9f7 commit 3aed45e

3 files changed

Lines changed: 80 additions & 1 deletion

File tree

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Desktop Release - Test Linux arm64 build
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- 'fix/linux-arm64-build'
8+
9+
jobs:
10+
Linux-AppImage-ARM64-Test:
11+
name: Test Linux AppImage ARM64
12+
runs-on: ubuntu-latest
13+
defaults:
14+
run:
15+
working-directory: packages/desktop
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: actions/setup-node@v3
19+
with:
20+
registry-url: 'https://registry.npmjs.org'
21+
node-version-file: '.nvmrc'
22+
cache: 'yarn'
23+
- name: Setup Python
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: '3.10'
27+
- name: Install FPM
28+
run: sudo gem install fpm -f
29+
30+
- run: yarn install --immutable
31+
32+
- name: Rebuild Electron Native Modules
33+
run: yarn workspace @standardnotes/desktop rebuild:home-server
34+
35+
- run: yarn build:desktop
36+
37+
- run: echo APP_VERSION=$(node -p "require('./../web/package.json').version") >> $GITHUB_ENV
38+
39+
- name: Compile for AppImage
40+
run: yarn run webpack --config desktop.webpack.prod.js
41+
42+
- name: AppImageArm64
43+
run: |
44+
yarn workspace @standardnotes/desktop rebuild:home-server --arch arm64 --platform linux
45+
yarn run electron-builder --linux --arm64 -c.linux.target=AppImage --publish=never --c.extraMetadata.version=${{ env.APP_VERSION }}
46+
env:
47+
npm_config_target_arch: 'arm64'
48+
npm_config_arch: 'arm64'
49+
npm_config_platform: 'linux'
50+
51+
- name: Verify Build
52+
run: |
53+
echo "Checking if AppImage was created..."
54+
ls -lh dist/*.AppImage
55+
56+
echo "Extracting AppImage..."
57+
dist/standard-notes-*-linux-arm64.AppImage --appimage-extract
58+
59+
echo "Verifying main binary architecture..."
60+
file squashfs-root/standard-notes
61+
62+
echo "Verifying keytar native module..."
63+
file squashfs-root/resources/app.asar.unpacked/node_modules/keytar/build/Release/keytar.node
64+
65+
echo "Verifying sqlite3 native module..."
66+
file squashfs-root/resources/app.asar.unpacked/node_modules/sqlite3/lib/binding/napi-v6-linux-unknown-arm64/node_sqlite3.node
67+
68+
echo "All native modules should be 'ELF 64-bit LSB ... ARM aarch64'"
69+
70+
- name: Upload Test Artifact
71+
uses: actions/upload-artifact@v4.0.0
72+
with:
73+
name: test-arm64-appimage
74+
path: |
75+
packages/desktop/dist/*.AppImage
76+
packages/desktop/dist/*.yml

packages/desktop/.npmrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
runtime = electron
22
target = 5.0.10
3-
target_arch = x64
43
disturl = https://atom.io/download/atom-shell
54
export npm_config_runtime=electron
65
export npm_config_build_from_source=true

packages/desktop/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@
135135
"desktop": {
136136
"StartupWMClass": "standard notes"
137137
},
138+
"asarUnpack": [
139+
"node_modules/keytar",
140+
"node_modules/@standardnotes/home-server"
141+
],
138142
"target": [
139143
"AppImage",
140144
"snap",

0 commit comments

Comments
 (0)