|
| 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 |
0 commit comments