diff --git a/.github/workflows/build-view.yml b/.github/workflows/build-view.yml index 8cc231ec..0a3469ad 100644 --- a/.github/workflows/build-view.yml +++ b/.github/workflows/build-view.yml @@ -14,31 +14,45 @@ jobs: strategy: matrix: include: - - os: warp-macos-15-arm64-12x + - os: [self-hosted, macOS, ARM64] arch: arm64 + artifact_name: macos-arm64 - os: windows-latest arch: x64 + artifact_name: windows-latest - os: ubuntu-latest arch: x64 + artifact_name: ubuntu-latest steps: - name: Checkout Code uses: actions/checkout@v4 + with: + clean: true + + # Clean node_modules on self-hosted runner to ensure fresh install + - name: Clean node_modules (self-hosted) + if: contains(matrix.os, 'self-hosted') + run: | + rm -rf node_modules + rm -rf release - name: Setup Node.js + if: "!contains(matrix.os, 'self-hosted')" uses: actions/setup-node@v6 with: node-version: 20 - name: Setup Python + if: "!contains(matrix.os, 'self-hosted')" uses: actions/setup-python@v6 with: python-version: '3.11' - name: Install Python Dependencies run: | - python -m pip install --upgrade pip - pip install uv + python3 -m pip install --upgrade pip + pip3 install uv - name: Install bun run: npm install -g bun @@ -46,6 +60,20 @@ jobs: - name: Install Dependencies run: npm install + # Verify Electron installation on macOS + - name: Verify Electron Installation (macOS) + if: runner.os == 'macOS' + run: | + echo "Checking Electron installation..." + ls -la node_modules/electron/dist/ || echo "Electron dist not found" + if [ -d "node_modules/electron/dist/Electron.app" ]; then + echo "✅ Electron.app found" + ls -la "node_modules/electron/dist/Electron.app/Contents/Frameworks/" | head -5 + else + echo "❌ Electron.app NOT found - this will cause build failure" + exit 1 + fi + # Install libfuse2 for Linux AppImage builds - name: Install libfuse2 (Linux) if: runner.os == 'Linux' @@ -78,7 +106,6 @@ jobs: run: npm run build -- --arch ${{ matrix.arch }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Signing variables (CSC_LINK, CSC_KEY_PASSWORD) are omitted for Windows VITE_BASE_URL: ${{ secrets.VITE_BASE_URL }} VITE_STACK_PROJECT_ID: ${{ secrets.VITE_STACK_PROJECT_ID }} VITE_STACK_PUBLISHABLE_CLIENT_KEY: ${{ secrets.VITE_STACK_PUBLISHABLE_CLIENT_KEY }} @@ -98,11 +125,34 @@ jobs: VITE_STACK_SECRET_SERVER_KEY: ${{ secrets.VITE_STACK_SECRET_SERVER_KEY }} USE_NPM_INSTALL_BUN: 'true' + # Verify built app contains Electron Framework + - name: Verify Built App (macOS) + if: runner.os == 'macOS' + run: | + echo "Checking built app..." + APP_PATH=$(find release -name "*.app" -type d | head -1) + if [ -n "$APP_PATH" ]; then + echo "Found app at: $APP_PATH" + FRAMEWORKS_PATH="$APP_PATH/Contents/Frameworks" + if [ -d "$FRAMEWORKS_PATH/Electron Framework.framework" ]; then + echo "✅ Electron Framework found" + ls -la "$FRAMEWORKS_PATH/" | head -10 + else + echo "❌ Electron Framework NOT found in built app!" + echo "Contents of Frameworks directory:" + ls -la "$FRAMEWORKS_PATH/" 2>/dev/null || echo "Frameworks directory does not exist" + exit 1 + fi + else + echo "No .app found in release directory" + ls -la release/ + fi + - name: Upload Artifact (macOS - dmg only) if: runner.os == 'macOS' uses: actions/upload-artifact@v6 with: - name: release-${{ matrix.os }}-${{ matrix.arch }} + name: release-${{ matrix.artifact_name }}-${{ matrix.arch }} path: | release/*.dmg retention-days: 5 @@ -111,7 +161,7 @@ jobs: if: runner.os == 'Windows' uses: actions/upload-artifact@v6 with: - name: release-${{ matrix.os }}-${{ matrix.arch }} + name: release-${{ matrix.artifact_name }}-${{ matrix.arch }} path: | release/*.exe retention-days: 5 @@ -120,7 +170,7 @@ jobs: if: runner.os == 'Linux' uses: actions/upload-artifact@v6 with: - name: release-${{ matrix.os }}-${{ matrix.arch }} + name: release-${{ matrix.artifact_name }}-${{ matrix.arch }} path: | release/*.AppImage retention-days: 5 @@ -135,7 +185,7 @@ jobs: - name: Download mac-arm64 artifact uses: actions/download-artifact@v7 with: - name: release-warp-macos-15-arm64-6x-arm64 + name: release-macos-arm64-arm64 path: temp-mac-arm64 - name: Download win-x64 artifact diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b66b8981..136ffa2c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,35 +25,63 @@ jobs: strategy: matrix: include: - - os: warp-macos-15-arm64-12x + - os: [self-hosted, macOS, ARM64] arch: arm64 + artifact_name: macos-arm64 - os: windows-latest arch: x64 + artifact_name: windows-latest - os: ubuntu-latest arch: x64 + artifact_name: ubuntu-latest steps: - name: Checkout Code uses: actions/checkout@v4 + with: + clean: true + + # Clean node_modules on self-hosted runner to ensure fresh install + - name: Clean node_modules (self-hosted) + if: contains(matrix.os, 'self-hosted') + run: | + rm -rf node_modules + rm -rf release - name: Setup Node.js + if: "!contains(matrix.os, 'self-hosted')" uses: actions/setup-node@v6 with: node-version: 20 - name: Setup Python + if: "!contains(matrix.os, 'self-hosted')" uses: actions/setup-python@v6 with: python-version: "3.11" - name: Install Python Dependencies run: | - python -m pip install --upgrade pip - pip install uv + python3 -m pip install --upgrade pip + pip3 install uv - name: Install Dependencies run: npm install + # Verify Electron installation on macOS + - name: Verify Electron Installation (macOS) + if: runner.os == 'macOS' + run: | + echo "Checking Electron installation..." + ls -la node_modules/electron/dist/ || echo "Electron dist not found" + if [ -d "node_modules/electron/dist/Electron.app" ]; then + echo "✅ Electron.app found" + ls -la "node_modules/electron/dist/Electron.app/Contents/Frameworks/" | head -5 + else + echo "❌ Electron.app NOT found - this will cause build failure" + exit 1 + fi + # Install libfuse2 for Linux AppImage builds - name: Install libfuse2 (Linux) if: runner.os == 'Linux' @@ -83,7 +111,6 @@ jobs: run: npm run build -- --arch ${{ matrix.arch }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Signing variables (CSC_LINK, CSC_KEY_PASSWORD) are omitted for Windows VITE_BASE_URL: ${{ secrets.VITE_BASE_URL }} VITE_STACK_PROJECT_ID: ${{ secrets.VITE_STACK_PROJECT_ID }} VITE_STACK_PUBLISHABLE_CLIENT_KEY: ${{ secrets.VITE_STACK_PUBLISHABLE_CLIENT_KEY }} @@ -100,10 +127,33 @@ jobs: VITE_STACK_PUBLISHABLE_CLIENT_KEY: ${{ secrets.VITE_STACK_PUBLISHABLE_CLIENT_KEY }} VITE_STACK_SECRET_SERVER_KEY: ${{ secrets.VITE_STACK_SECRET_SERVER_KEY }} + # Verify built app contains Electron Framework + - name: Verify Built App (macOS) + if: runner.os == 'macOS' + run: | + echo "Checking built app..." + APP_PATH=$(find release -name "*.app" -type d | head -1) + if [ -n "$APP_PATH" ]; then + echo "Found app at: $APP_PATH" + FRAMEWORKS_PATH="$APP_PATH/Contents/Frameworks" + if [ -d "$FRAMEWORKS_PATH/Electron Framework.framework" ]; then + echo "✅ Electron Framework found" + ls -la "$FRAMEWORKS_PATH/" | head -10 + else + echo "❌ Electron Framework NOT found in built app!" + echo "Contents of Frameworks directory:" + ls -la "$FRAMEWORKS_PATH/" 2>/dev/null || echo "Frameworks directory does not exist" + exit 1 + fi + else + echo "No .app found in release directory" + ls -la release/ + fi + - name: Upload Artifact uses: actions/upload-artifact@v6 with: - name: release-${{ matrix.os }}-${{ matrix.arch }} + name: release-${{ matrix.artifact_name }}-${{ matrix.arch }} path: | release/* !release/builder-debug.yml @@ -120,7 +170,7 @@ jobs: - name: Download mac-arm64 artifact uses: actions/download-artifact@v7 with: - name: release-warp-macos-15-arm64-6x-arm64 + name: release-macos-arm64-arm64 path: temp-mac-arm64 - name: Download win-x64 artifact diff --git a/electron/main/init.ts b/electron/main/init.ts index 2b0ace8c..469777a7 100644 --- a/electron/main/init.ts +++ b/electron/main/init.ts @@ -225,14 +225,13 @@ export async function startBackend(setPort?: (port: number) => void): Promise