Skip to content

Commit 3f393de

Browse files
ZonatedCordclaude
andcommitted
feat(ci): replace C stub with real Nuitka worker build
Compile Python worker with Nuitka --onefile so scan, site_check and facebook enrichment work in the distributed DMG. Cache ~/.cache/nuitka keyed on worker + morpheus source hashes. Build time increases ~10 min but full functionality enabled. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 91048c3 commit 3f393de

1 file changed

Lines changed: 33 additions & 15 deletions

File tree

.github/workflows/release.yml

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,35 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v4
1515

16-
- name: Build worker stub (C)
16+
- name: Setup Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.12'
20+
21+
- name: Cache Nuitka deps
22+
uses: actions/cache@v4
23+
with:
24+
path: ~/.cache/nuitka
25+
key: nuitka-${{ runner.os }}-${{ hashFiles('requirements.txt', 'worker/**/*.py', 'src/morpheus/**/*.py') }}
26+
restore-keys: nuitka-${{ runner.os }}-
27+
28+
- name: Build Python worker with Nuitka
1729
run: |
18-
cat > /tmp/worker_stub.c << 'EOF'
19-
#include <stdio.h>
20-
int main(int argc, char *argv[]) {
21-
printf("{\"type\":\"error\",\"message\":\"Scan non disponibile in questa build. Richiede worker Python locale.\"}\n");
22-
return 1;
23-
}
24-
EOF
25-
clang -arch arm64 -o src-tauri/binaries/morpheus-worker-aarch64-apple-darwin /tmp/worker_stub.c
26-
chmod +x src-tauri/binaries/morpheus-worker-aarch64-apple-darwin
30+
pip install nuitka requests beautifulsoup4
31+
cd worker
32+
PYTHONPATH=../src python -m nuitka \
33+
--standalone \
34+
--onefile \
35+
--output-filename=morpheus-worker \
36+
--output-dir=../src-tauri/binaries/ \
37+
--include-package=requests \
38+
--include-package=bs4 \
39+
--include-package=morpheus \
40+
--assume-yes-for-downloads \
41+
worker_main.py
42+
chmod +x ../src-tauri/binaries/morpheus-worker
43+
mv ../src-tauri/binaries/morpheus-worker \
44+
../src-tauri/binaries/morpheus-worker-aarch64-apple-darwin
2745
2846
- name: Setup Node.js
2947
uses: actions/setup-node@v4
@@ -59,14 +77,14 @@ jobs:
5977
App desktop nativa macOS per lead generation iperlocale.
6078
6179
### Cosa funziona in questa build
80+
- Scansione lead da OpenStreetMap (gratuita, nessuna API key)
81+
- Scansione Foursquare e Google Places (richiede API key in Impostazioni)
82+
- Verifica siti web morti
83+
- Arricchimento profili Facebook
6284
- Visualizzazione e gestione lead su mappa
6385
- Filtri, hotlist, cambio stato, export CSV
6486
- Import database esistente (Impostazioni → Database)
65-
- Geocodifica indirizzi
66-
- Aggiunta manuale lead
67-
68-
### Nota
69-
Le funzionalità di scansione (OSM/Google/Foursquare), verifica siti e arricchimento Facebook richiedono il worker Python locale. Vedi README per istruzioni.
87+
- Geocodifica indirizzi e aggiunta manuale lead
7088
7189
### Installazione (Apple Silicon — M1/M2/M3/M4)
7290
1. Scarica `Morpheus_${{ github.ref_name }}_aarch64.dmg`

0 commit comments

Comments
 (0)