-
Notifications
You must be signed in to change notification settings - Fork 0
492 lines (407 loc) · 16.3 KB
/
Copy pathevera.yml
File metadata and controls
492 lines (407 loc) · 16.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
name: eVera CI/CD
# ─── Triggers ────────────────────────────────────────────────────────────────
on:
push:
branches: [master, develop]
tags: ["v*"]
pull_request:
branches: [master]
schedule:
- cron: "0 2 * * *" # nightly regression at 02:00 UTC
workflow_dispatch:
inputs:
skip_tests:
description: "Skip test suite (use for hotfix releases)"
required: false
default: "false"
type: boolean
# ─── Global settings ─────────────────────────────────────────────────────────
env:
PYTHON_VERSION: "3.12"
NODE_VERSION: "20"
permissions:
contents: write
packages: write
id-token: write
concurrency:
group: evera-${{ github.ref }}
cancel-in-progress: true
# ─── Jobs ────────────────────────────────────────────────────────────────────
jobs:
# ── 1. Test ─────────────────────────────────────────────────────────────────
test:
name: "🧪 Test — Python ${{ matrix.python-version }} / ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
if: ${{ github.event.inputs.skip_tests != 'true' }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
os: [ubuntu-22.04, macos-13, windows-2022]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-cov ruff mypy
- name: Lint (ruff)
run: ruff check . --select=E,F,W --ignore=E501
continue-on-error: true
- name: Type check (mypy)
run: mypy . --ignore-missing-imports --no-strict-optional
continue-on-error: true
- name: Run unit tests
run: |
python -m pytest tests/unit/ -v --tb=short \
--cov=. --cov-report=xml --cov-report=term-missing
- name: Run functional tests
run: python -m pytest tests/functional/ -v --tb=short
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
files: coverage.xml
flags: py${{ matrix.python-version }}-${{ matrix.os }}
continue-on-error: true
# ── 2. Desktop — Windows ────────────────────────────────────────────────────
build-windows:
name: "🪟 Desktop — Windows"
needs: [test]
if: ${{ !failure() && !cancelled() && startsWith(github.ref, 'refs/tags/v') }}
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install Python dependencies
run: pip install -r requirements.txt pyinstaller
- name: Build Python backend (PyInstaller)
run: python build_backend.py
continue-on-error: false
- name: Install Electron dependencies
working-directory: electron
run: npm install
- name: Build Windows installer
working-directory: electron
run: npm run build:win
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Windows artifact
uses: actions/upload-artifact@v4
with:
name: desktop-windows
path: electron/dist/*.exe
if-no-files-found: warn
# ── 3. Desktop — macOS ──────────────────────────────────────────────────────
build-macos:
name: "🍎 Desktop — macOS"
needs: [test]
if: ${{ !failure() && !cancelled() && startsWith(github.ref, 'refs/tags/v') }}
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install Python dependencies
run: pip install -r requirements.txt pyinstaller
- name: Build Python backend (PyInstaller)
run: python build_backend.py
- name: Install Electron dependencies
working-directory: electron
run: npm install
- name: Build macOS DMG
working-directory: electron
run: npm run build:mac
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload macOS artifact
uses: actions/upload-artifact@v4
with:
name: desktop-macos
path: electron/dist/*.dmg
if-no-files-found: warn
# ── 4. Desktop — Linux ──────────────────────────────────────────────────────
build-linux:
name: "🐧 Desktop — Linux"
needs: [test]
if: ${{ !failure() && !cancelled() && startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install system dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev \
librsvg2-dev patchelf fakeroot rpm
- name: Install Python dependencies
run: pip install -r requirements.txt pyinstaller
- name: Build Python backend (PyInstaller)
run: python build_backend.py
- name: Install Electron dependencies
working-directory: electron
run: npm install
- name: Build Linux packages (AppImage + deb)
working-directory: electron
run: npm run build:linux
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Linux artifacts
uses: actions/upload-artifact@v4
with:
name: desktop-linux
path: |
electron/dist/*.AppImage
electron/dist/*.deb
if-no-files-found: warn
# ── 5. Android ──────────────────────────────────────────────────────────────
build-android:
name: "📱 Android (Phone + Auto + Wear)"
needs: [test]
if: ${{ !failure() && !cancelled() && startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
cache: gradle
- name: Set up Android SDK
uses: android-actions/setup-android@v3
- name: Build Android Phone APK
working-directory: mobile/android
run: |
if [ -f "gradlew" ]; then
chmod +x gradlew
./gradlew assembleRelease --no-daemon 2>/dev/null || true
else
echo "⚠️ No gradlew found — skipping Android phone build"
fi
- name: Build Android Auto APK
working-directory: mobile/android
run: |
if [ -d "automotive" ] && [ -f "gradlew" ]; then
./gradlew :automotive:assembleRelease --no-daemon 2>/dev/null || true
else
echo "⚠️ No automotive module — skipping"
fi
- name: Build Wear OS APK
working-directory: mobile/android
run: |
if [ -d "wear" ] && [ -f "gradlew" ]; then
./gradlew :wear:assembleRelease --no-daemon 2>/dev/null || true
else
echo "⚠️ No wear module — skipping"
fi
- name: Upload Android Phone APK
uses: actions/upload-artifact@v4
with:
name: android-phone
path: mobile/android/app/build/outputs/apk/release/*.apk
if-no-files-found: warn
- name: Upload Android Auto APK
uses: actions/upload-artifact@v4
with:
name: android-auto
path: mobile/android/automotive/build/outputs/apk/release/*.apk
if-no-files-found: warn
- name: Upload Wear OS APK
uses: actions/upload-artifact@v4
with:
name: android-wear
path: mobile/android/wear/build/outputs/apk/release/*.apk
if-no-files-found: warn
# ── 6. iOS ──────────────────────────────────────────────────────────────────
build-ios:
name: "🍏 iOS Archive"
needs: [test]
if: ${{ !failure() && !cancelled() && startsWith(github.ref, 'refs/tags/v') }}
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install React Native dependencies
working-directory: mobile
run: |
if [ -f "package.json" ]; then
npm install
fi
- name: Install CocoaPods
working-directory: mobile/ios
run: |
if [ -f "Podfile" ]; then
pod install --repo-update 2>/dev/null || true
fi
- name: Build iOS archive (unsigned)
working-directory: mobile/ios
run: |
WORKSPACE=$(find . -name "*.xcworkspace" -maxdepth 1 | head -1)
SCHEME=$(xcodebuild -workspace "$WORKSPACE" -list 2>/dev/null \
| grep -A 100 "Schemes:" | grep -v "Schemes:" | head -1 | xargs || echo "")
if [ -z "$WORKSPACE" ] || [ -z "$SCHEME" ]; then
echo "⚠️ No Xcode workspace or scheme found — skipping iOS build"
exit 0
fi
xcodebuild \
-workspace "$WORKSPACE" \
-scheme "$SCHEME" \
-configuration Release \
-sdk iphoneos \
-archivePath build/Vera.xcarchive \
archive \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO || true
- name: Zip iOS archive
run: |
if [ -d mobile/ios/build/Vera.xcarchive ]; then
cd mobile/ios/build
zip -r Vera.xcarchive.zip Vera.xcarchive
else
echo "⚠️ No xcarchive — creating placeholder"
mkdir -p mobile/ios/build
touch mobile/ios/build/Vera.xcarchive.zip
fi
- name: Upload iOS archive
uses: actions/upload-artifact@v4
with:
name: ios-archive
path: mobile/ios/build/Vera.xcarchive.zip
if-no-files-found: warn
# ── 7. VS Code Extension ──────────────────────────────────────────────────
build-vscode:
name: "🔌 VS Code Extension (.vsix)"
runs-on: ubuntu-latest
needs: [test]
if: ${{ !failure() && !cancelled() && startsWith(github.ref, 'refs/tags/v') }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
working-directory: vscode-extension
run: npm install
- name: Install vsce
run: npm install -g @vscode/vsce typescript
- name: Compile TypeScript
working-directory: vscode-extension
run: tsc -p ./
- name: Package extension
working-directory: vscode-extension
run: vsce package --no-dependencies -o evera-ai.vsix
- name: Upload VSIX artifact
uses: actions/upload-artifact@v4
with:
name: vscode-extension
path: vscode-extension/evera-ai.vsix
if-no-files-found: warn
# ── 8. GitHub Release ───────────────────────────────────────────────────────
release:
name: "🚀 GitHub Release"
needs: [build-windows, build-macos, build-linux, build-android, build-ios, build-vscode]
if: ${{ startsWith(github.ref, 'refs/tags/v') && always() }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: List artifacts
run: find artifacts -type f | sort
- name: Generate changelog
id: changelog
run: |
PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
if [ -z "$PREV_TAG" ]; then
CHANGES=$(git log --oneline --pretty=format:"- %s" HEAD)
else
CHANGES=$(git log --oneline --pretty=format:"- %s" "${PREV_TAG}..HEAD")
fi
echo "CHANGES<<EOF" >> "$GITHUB_OUTPUT"
echo "$CHANGES" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
artifacts/**/*.exe
artifacts/**/*.dmg
artifacts/**/*.AppImage
artifacts/**/*.deb
artifacts/**/*.apk
artifacts/**/*.zip
artifacts/**/*.vsix
body: |
## 🚀 eVera ${{ github.ref_name }}
### What's Changed
${{ steps.changelog.outputs.CHANGES }}
---
### 📥 Download & Install
| Platform | File | How to install |
|---|---|---|
| **Windows** | `Vera-Setup-*.exe` | Run the installer — everything is bundled |
| **macOS** | `Vera-*.dmg` | Open DMG → drag Vera to Applications |
| **Linux (AppImage)** | `Vera-*.AppImage` | `chmod +x Vera-*.AppImage && ./Vera-*.AppImage` |
| **Linux (deb)** | `Vera-*.deb` | `sudo dpkg -i Vera-*.deb` |
| **Android** | `Vera-*.apk` | Enable unknown sources → tap APK |
| **Android Auto** | `Vera-Auto-*.apk` | Install on phone → connect to car |
| **Wear OS** | `Vera-Wear-*.apk` | Sideload or install via Play Store |
| **iOS** | `Vera.xcarchive.zip` | Open in Xcode → distribute to device |
| **Web (PWA)** | — | Open `http://localhost:8000` in any browser |
| **VS Code** | `evera-ai.vsix` | `code --install-extension evera-ai.vsix` |
---
### ⚡ One-Command Install
**Linux / macOS**
```bash
curl -fsSL https://raw.githubusercontent.com/embeddedos-org/eVera/master/install.sh | bash
```
**Windows (PowerShell)**
```powershell
irm https://raw.githubusercontent.com/embeddedos-org/eVera/master/setup.ps1 | iex
```
---
### 🤖 Offline LLMs (no internet needed)
```bash
ollama pull qwen3:8b # 5 GB — recommended
ollama pull llama3.2:3b # 2 GB — fastest
ollama pull deepseek-r1:7b # 5 GB — best reasoning
```
Or use **LM Studio**, **Jan AI**, or **llama.cpp** — eVera auto-detects all of them.
generate_release_notes: false