Skip to content

Commit d81f18c

Browse files
authored
Merge branch 'main' into feature/streaming-agent-output
2 parents 5f6a4a1 + 35f4ca2 commit d81f18c

3 files changed

Lines changed: 117 additions & 18 deletions

File tree

.github/workflows/build-view.yml

Lines changed: 58 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,38 +14,66 @@ jobs:
1414
strategy:
1515
matrix:
1616
include:
17-
- os: warp-macos-15-arm64-12x
17+
- os: [self-hosted, macOS, ARM64]
1818
arch: arm64
19+
artifact_name: macos-arm64
1920
- os: windows-latest
2021
arch: x64
22+
artifact_name: windows-latest
2123
- os: ubuntu-latest
2224
arch: x64
25+
artifact_name: ubuntu-latest
2326

2427
steps:
2528
- name: Checkout Code
2629
uses: actions/checkout@v4
30+
with:
31+
clean: true
32+
33+
# Clean node_modules on self-hosted runner to ensure fresh install
34+
- name: Clean node_modules (self-hosted)
35+
if: contains(matrix.os, 'self-hosted')
36+
run: |
37+
rm -rf node_modules
38+
rm -rf release
2739
2840
- name: Setup Node.js
41+
if: "!contains(matrix.os, 'self-hosted')"
2942
uses: actions/setup-node@v6
3043
with:
3144
node-version: 20
3245

3346
- name: Setup Python
47+
if: "!contains(matrix.os, 'self-hosted')"
3448
uses: actions/setup-python@v6
3549
with:
3650
python-version: '3.11'
3751

3852
- name: Install Python Dependencies
3953
run: |
40-
python -m pip install --upgrade pip
41-
pip install uv
54+
python3 -m pip install --upgrade pip
55+
pip3 install uv
4256
4357
- name: Install bun
4458
run: npm install -g bun
4559

4660
- name: Install Dependencies
4761
run: npm install
4862

63+
# Verify Electron installation on macOS
64+
- name: Verify Electron Installation (macOS)
65+
if: runner.os == 'macOS'
66+
run: |
67+
echo "Checking Electron installation..."
68+
ls -la node_modules/electron/dist/ || echo "Electron dist not found"
69+
if [ -d "node_modules/electron/dist/Electron.app" ]; then
70+
echo "✅ Electron.app found"
71+
ls -la "node_modules/electron/dist/Electron.app/Contents/Frameworks/" | head -5
72+
else
73+
echo "❌ Electron.app NOT found - this will cause build failure"
74+
exit 1
75+
fi
76+
4977
# Install libfuse2 for Linux AppImage builds
5078
- name: Install libfuse2 (Linux)
5179
if: runner.os == 'Linux'
@@ -78,7 +106,6 @@ jobs:
78106
run: npm run build -- --arch ${{ matrix.arch }}
79107
env:
80108
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81-
# Signing variables (CSC_LINK, CSC_KEY_PASSWORD) are omitted for Windows
82109
VITE_BASE_URL: ${{ secrets.VITE_BASE_URL }}
83110
VITE_STACK_PROJECT_ID: ${{ secrets.VITE_STACK_PROJECT_ID }}
84111
VITE_STACK_PUBLISHABLE_CLIENT_KEY: ${{ secrets.VITE_STACK_PUBLISHABLE_CLIENT_KEY }}
@@ -98,11 +125,34 @@ jobs:
98125
VITE_STACK_SECRET_SERVER_KEY: ${{ secrets.VITE_STACK_SECRET_SERVER_KEY }}
99126
USE_NPM_INSTALL_BUN: 'true'
100127

128+
# Verify built app contains Electron Framework
129+
- name: Verify Built App (macOS)
130+
if: runner.os == 'macOS'
131+
run: |
132+
echo "Checking built app..."
133+
APP_PATH=$(find release -name "*.app" -type d | head -1)
134+
if [ -n "$APP_PATH" ]; then
135+
echo "Found app at: $APP_PATH"
136+
FRAMEWORKS_PATH="$APP_PATH/Contents/Frameworks"
137+
if [ -d "$FRAMEWORKS_PATH/Electron Framework.framework" ]; then
138+
echo "✅ Electron Framework found"
139+
ls -la "$FRAMEWORKS_PATH/" | head -10
140+
else
141+
echo "❌ Electron Framework NOT found in built app!"
142+
echo "Contents of Frameworks directory:"
143+
ls -la "$FRAMEWORKS_PATH/" 2>/dev/null || echo "Frameworks directory does not exist"
144+
exit 1
145+
fi
146+
else
147+
echo "No .app found in release directory"
148+
ls -la release/
149+
fi
150+
101151
- name: Upload Artifact (macOS - dmg only)
102152
if: runner.os == 'macOS'
103153
uses: actions/upload-artifact@v6
104154
with:
105-
name: release-${{ matrix.os }}-${{ matrix.arch }}
155+
name: release-${{ matrix.artifact_name }}-${{ matrix.arch }}
106156
path: |
107157
release/*.dmg
108158
retention-days: 5
@@ -111,7 +161,7 @@ jobs:
111161
if: runner.os == 'Windows'
112162
uses: actions/upload-artifact@v6
113163
with:
114-
name: release-${{ matrix.os }}-${{ matrix.arch }}
164+
name: release-${{ matrix.artifact_name }}-${{ matrix.arch }}
115165
path: |
116166
release/*.exe
117167
retention-days: 5
@@ -120,7 +170,7 @@ jobs:
120170
if: runner.os == 'Linux'
121171
uses: actions/upload-artifact@v6
122172
with:
123-
name: release-${{ matrix.os }}-${{ matrix.arch }}
173+
name: release-${{ matrix.artifact_name }}-${{ matrix.arch }}
124174
path: |
125175
release/*.AppImage
126176
retention-days: 5
@@ -135,7 +185,7 @@ jobs:
135185
- name: Download mac-arm64 artifact
136186
uses: actions/download-artifact@v7
137187
with:
138-
name: release-warp-macos-15-arm64-6x-arm64
188+
name: release-macos-arm64-arm64
139189
path: temp-mac-arm64
140190

141191
- name: Download win-x64 artifact

.github/workflows/build.yml

Lines changed: 56 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,35 +25,63 @@ jobs:
2525
strategy:
2626
matrix:
2727
include:
28-
- os: warp-macos-15-arm64-12x
28+
- os: [self-hosted, macOS, ARM64]
2929
arch: arm64
30+
artifact_name: macos-arm64
3031
- os: windows-latest
3132
arch: x64
33+
artifact_name: windows-latest
3234
- os: ubuntu-latest
3335
arch: x64
36+
artifact_name: ubuntu-latest
3437

3538
steps:
3639
- name: Checkout Code
3740
uses: actions/checkout@v4
41+
with:
42+
clean: true
43+
44+
# Clean node_modules on self-hosted runner to ensure fresh install
45+
- name: Clean node_modules (self-hosted)
46+
if: contains(matrix.os, 'self-hosted')
47+
run: |
48+
rm -rf node_modules
49+
rm -rf release
3850
3951
- name: Setup Node.js
52+
if: "!contains(matrix.os, 'self-hosted')"
4053
uses: actions/setup-node@v6
4154
with:
4255
node-version: 20
4356

4457
- name: Setup Python
58+
if: "!contains(matrix.os, 'self-hosted')"
4559
uses: actions/setup-python@v6
4660
with:
4761
python-version: "3.11"
4862

4963
- name: Install Python Dependencies
5064
run: |
51-
python -m pip install --upgrade pip
52-
pip install uv
65+
python3 -m pip install --upgrade pip
66+
pip3 install uv
5367
5468
- name: Install Dependencies
5569
run: npm install
5670

71+
# Verify Electron installation on macOS
72+
- name: Verify Electron Installation (macOS)
73+
if: runner.os == 'macOS'
74+
run: |
75+
echo "Checking Electron installation..."
76+
ls -la node_modules/electron/dist/ || echo "Electron dist not found"
77+
if [ -d "node_modules/electron/dist/Electron.app" ]; then
78+
echo "✅ Electron.app found"
79+
ls -la "node_modules/electron/dist/Electron.app/Contents/Frameworks/" | head -5
80+
else
81+
echo "❌ Electron.app NOT found - this will cause build failure"
82+
exit 1
83+
fi
84+
5785
# Install libfuse2 for Linux AppImage builds
5886
- name: Install libfuse2 (Linux)
5987
if: runner.os == 'Linux'
@@ -83,7 +111,6 @@ jobs:
83111
run: npm run build -- --arch ${{ matrix.arch }}
84112
env:
85113
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
86-
# Signing variables (CSC_LINK, CSC_KEY_PASSWORD) are omitted for Windows
87114
VITE_BASE_URL: ${{ secrets.VITE_BASE_URL }}
88115
VITE_STACK_PROJECT_ID: ${{ secrets.VITE_STACK_PROJECT_ID }}
89116
VITE_STACK_PUBLISHABLE_CLIENT_KEY: ${{ secrets.VITE_STACK_PUBLISHABLE_CLIENT_KEY }}
@@ -100,10 +127,33 @@ jobs:
100127
VITE_STACK_PUBLISHABLE_CLIENT_KEY: ${{ secrets.VITE_STACK_PUBLISHABLE_CLIENT_KEY }}
101128
VITE_STACK_SECRET_SERVER_KEY: ${{ secrets.VITE_STACK_SECRET_SERVER_KEY }}
102129

130+
# Verify built app contains Electron Framework
131+
- name: Verify Built App (macOS)
132+
if: runner.os == 'macOS'
133+
run: |
134+
echo "Checking built app..."
135+
APP_PATH=$(find release -name "*.app" -type d | head -1)
136+
if [ -n "$APP_PATH" ]; then
137+
echo "Found app at: $APP_PATH"
138+
FRAMEWORKS_PATH="$APP_PATH/Contents/Frameworks"
139+
if [ -d "$FRAMEWORKS_PATH/Electron Framework.framework" ]; then
140+
echo "✅ Electron Framework found"
141+
ls -la "$FRAMEWORKS_PATH/" | head -10
142+
else
143+
echo "❌ Electron Framework NOT found in built app!"
144+
echo "Contents of Frameworks directory:"
145+
ls -la "$FRAMEWORKS_PATH/" 2>/dev/null || echo "Frameworks directory does not exist"
146+
exit 1
147+
fi
148+
else
149+
echo "No .app found in release directory"
150+
ls -la release/
151+
fi
152+
103153
- name: Upload Artifact
104154
uses: actions/upload-artifact@v6
105155
with:
106-
name: release-${{ matrix.os }}-${{ matrix.arch }}
156+
name: release-${{ matrix.artifact_name }}-${{ matrix.arch }}
107157
path: |
108158
release/*
109159
!release/builder-debug.yml
@@ -120,7 +170,7 @@ jobs:
120170
- name: Download mac-arm64 artifact
121171
uses: actions/download-artifact@v7
122172
with:
123-
name: release-warp-macos-15-arm64-6x-arm64
173+
name: release-macos-arm64-arm64
124174
path: temp-mac-arm64
125175

126176
- name: Download win-x64 artifact

electron/main/init.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,14 +225,13 @@ export async function startBackend(setPort?: (port: number) => void): Promise<an
225225
log.warn(`Failed to remove lock file: ${e}`);
226226
}
227227

228-
// Cleanup corrupted python cache ONLY if we don't have bundled Python
228+
// Cleanup corrupted python cache ONLY if it's not the bundled Python
229229
// If we have bundled Python, we want to keep it and reuse it
230230
const prebuiltPythonDir = getPrebuiltPythonDir();
231231
try {
232232
const pythonCacheDir = getCachePath('uv_python');
233-
// Only remove cache if we DON'T have prebuilt Python available
234-
// When prebuilt Python exists, UV will use it via UV_PYTHON_INSTALL_DIR
235-
if (fs.existsSync(pythonCacheDir) && !prebuiltPythonDir) {
233+
// Only remove if it's NOT the prebuilt Python directory
234+
if (fs.existsSync(pythonCacheDir) && pythonCacheDir !== prebuiltPythonDir) {
236235
log.info(`Removing potentially corrupted Python cache: ${pythonCacheDir}`);
237236
fs.rmSync(pythonCacheDir, { recursive: true, force: true });
238237
} else if (prebuiltPythonDir) {

0 commit comments

Comments
 (0)