mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	Remove test workflow, prepare for PR
Core changes for ARM64 Linux better-sqlite3 fix: - .github/workflows/release.yml: Use ubuntu-24.04-arm for ARM64 Linux - .github/actions/build-electron/action.yml: Add TARGET_ARCH env var - scripts/electron-rebuild.mts: Add arch parameter to rebuild
This commit is contained in:
		
							
								
								
									
										81
									
								
								.github/workflows/test-arm64-fix.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										81
									
								
								.github/workflows/test-arm64-fix.yml
									
									
									
									
										vendored
									
									
								
							| @@ -1,81 +0,0 @@ | |||||||
| name: Test ARM64 Fix |  | ||||||
| on: |  | ||||||
|   push: |  | ||||||
|     branches: [ fix-arm64-sqlite ] |  | ||||||
|   workflow_dispatch: |  | ||||||
|  |  | ||||||
| jobs: |  | ||||||
|   test-arm64-rebuild: |  | ||||||
|     runs-on: ubuntu-24.04-arm |  | ||||||
|     steps: |  | ||||||
|       - uses: actions/checkout@v5 |  | ||||||
|       - uses: pnpm/action-setup@v4 |  | ||||||
|       - uses: actions/setup-node@v5 |  | ||||||
|         with: |  | ||||||
|           node-version: 22 |  | ||||||
|           cache: 'pnpm' |  | ||||||
|       - name: Install system dependencies |  | ||||||
|         run: | |  | ||||||
|           sudo apt-get update && sudo apt-get install -y flatpak-builder elfutils |  | ||||||
|           flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo |  | ||||||
|           FLATPAK_ARCH="aarch64" |  | ||||||
|           FLATPAK_VERSION="24.08" |  | ||||||
|           flatpak install --user --no-deps --arch $FLATPAK_ARCH --assumeyes runtime/org.freedesktop.Platform/$FLATPAK_ARCH/$FLATPAK_VERSION runtime/org.freedesktop.Sdk/$FLATPAK_ARCH/$FLATPAK_VERSION org.electronjs.Electron2.BaseApp/$FLATPAK_ARCH/$FLATPAK_VERSION |  | ||||||
|        |  | ||||||
|       - name: Install dependencies |  | ||||||
|         run: pnpm install --frozen-lockfile |  | ||||||
|       - name: Test rebuild with TARGET_ARCH |  | ||||||
|         env: |  | ||||||
|           TARGET_ARCH: arm64 |  | ||||||
|         run: | |  | ||||||
|           echo "Testing electron-rebuild with TARGET_ARCH=arm64" |  | ||||||
|           pnpm postinstall |  | ||||||
|           echo "Checking better-sqlite3 architecture:" |  | ||||||
|           file apps/desktop/node_modules/better-sqlite3/build/Release/better_sqlite3.node || echo "File not found" |  | ||||||
|       - name: Build desktop package |  | ||||||
|         env: |  | ||||||
|           TARGET_ARCH: arm64 |  | ||||||
|         run: | |  | ||||||
|           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 build directories ===" |  | ||||||
|           ls -la apps/desktop/ || true |  | ||||||
|           find apps/desktop -name "out" -o -name "dist" -o -name "upload" 2>/dev/null || true |  | ||||||
|            |  | ||||||
|           echo "\n=== Looking for built packages ===" |  | ||||||
|           FOUND_PACKAGES=$(find apps/desktop -name "*.deb" -o -name "*.rpm" -o -name "*.tar.gz" -o -name "*.AppImage" 2>/dev/null || true) |  | ||||||
|            |  | ||||||
|           if [ -n "$FOUND_PACKAGES" ]; then |  | ||||||
|             echo "Found packages:" |  | ||||||
|             echo "$FOUND_PACKAGES" |  | ||||||
|              |  | ||||||
|             # Use first DEB package |  | ||||||
|             PACKAGE=$(echo "$FOUND_PACKAGES" | grep "\.deb" | head -1) |  | ||||||
|             if [ -n "$PACKAGE" ]; then |  | ||||||
|               echo "\n=== Extracting DEB package: $PACKAGE ===" |  | ||||||
|               mkdir -p /tmp/extracted |  | ||||||
|               dpkg-deb -x "$PACKAGE" /tmp/extracted/ |  | ||||||
|                |  | ||||||
|               echo "\n=== Checking for better_sqlite3.node ===" |  | ||||||
|               find /tmp/extracted -name "better_sqlite3.node" -exec file {} \; || echo "No better_sqlite3.node found" |  | ||||||
|                |  | ||||||
|               echo "\n=== Checking all .node files ===" |  | ||||||
|               find /tmp/extracted -name "*.node" -exec file {} \; || echo "No .node files found" |  | ||||||
|             fi |  | ||||||
|           else |  | ||||||
|             echo "No packages found, checking dist directory:" |  | ||||||
|             find apps/desktop -name "better_sqlite3.node" -exec file {} \; 2>/dev/null || echo "No .node files found" |  | ||||||
|           fi |  | ||||||
|        |  | ||||||
|       - name: Upload built package |  | ||||||
|         uses: actions/upload-artifact@v4 |  | ||||||
|         if: always() |  | ||||||
|         with: |  | ||||||
|           name: trilium-arm64-linux-test |  | ||||||
|           path: | |  | ||||||
|             apps/desktop/out/ |  | ||||||
|             apps/desktop/dist/ |  | ||||||
|             apps/desktop/upload/ |  | ||||||
		Reference in New Issue
	
	Block a user