From cc51fbe77ef72ed15c9a656b1337ce21d0ff3dc6 Mon Sep 17 00:00:00 2001 From: linull Date: Tue, 16 Sep 2025 21:35:00 +0800 Subject: [PATCH] Update test workflow to build and check packages --- .github/workflows/test-arm64-fix.yml | 34 +++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-arm64-fix.yml b/.github/workflows/test-arm64-fix.yml index cf69303a7..2ecd092fc 100644 --- a/.github/workflows/test-arm64-fix.yml +++ b/.github/workflows/test-arm64-fix.yml @@ -24,9 +24,37 @@ jobs: pnpm postinstall echo "Checking better-sqlite3 architecture:" file apps/desktop/node_modules/better-sqlite3/build/Release/better_sqlite3.node || echo "File not found" - - name: Test desktop build + - name: Build desktop package env: TARGET_ARCH: arm64 run: | - echo "Testing desktop build" - pnpm run --filter desktop build \ No newline at end of file + echo "Building desktop package for ARM64" + pnpm run --filter desktop electron-forge:make --arch=arm64 --platform=linux + + - name: Check better-sqlite3 in package + run: | + echo "Checking built packages:" + find apps/desktop/out -name "*.deb" -o -name "*.rpm" -o -name "*.tar.gz" -o -name "*.AppImage" | head -5 + + echo "\nExtracting and checking better-sqlite3:" + cd apps/desktop/out + + # Find the built package + PACKAGE=$(find . -name "*.deb" | head -1) + if [ -n "$PACKAGE" ]; then + echo "Found DEB package: $PACKAGE" + dpkg-deb -x "$PACKAGE" extracted/ + echo "Checking for better-sqlite3 files:" + find extracted/ -name "*sqlite*" -type f + echo "\nChecking architecture of better-sqlite3.node:" + find extracted/ -name "better_sqlite3.node" -exec file {} \; + else + echo "No DEB package found, checking other formats..." + ls -la + fi + + - name: Upload built package + uses: actions/upload-artifact@v4 + with: + name: trilium-arm64-linux-test + path: apps/desktop/out/* \ No newline at end of file