- GUI V5 : charge DistilCamemBERT-NER automatiquement en arrière-plan - _app_dir() : chemin compatible Nuitka onefile - Build Nuitka : inclut models/ + config/ dans le .exe - GitHub Actions : étape download model avant compilation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
67 lines
2.1 KiB
YAML
67 lines
2.1 KiB
YAML
name: Build Windows EXE (Nuitka)
|
|
|
|
on:
|
|
workflow_dispatch: # declenchement manuel depuis GitHub
|
|
push:
|
|
tags:
|
|
- 'v*' # build automatique sur tag v5.0, v5.1, etc.
|
|
|
|
jobs:
|
|
build-windows:
|
|
runs-on: windows-latest
|
|
timeout-minutes: 60
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
cache: pip
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip setuptools wheel
|
|
pip install -r requirements.txt
|
|
pip install nuitka orderedset zstandard
|
|
|
|
- name: Download NER model
|
|
run: |
|
|
python -c "from ner_manager_onnx import NerModelManager; m=NerModelManager(cache_dir='models'); m.load('cmarkea/distilcamembert-base-ner'); print('Model OK:', m.is_loaded()); m.unload()"
|
|
|
|
- name: Build with Nuitka
|
|
run: |
|
|
python -m nuitka `
|
|
--standalone `
|
|
--onefile `
|
|
--enable-plugin=tk-inter `
|
|
--include-module=anonymizer_core_refactored_onnx `
|
|
--include-module=ner_manager_onnx `
|
|
--include-module=eds_pseudo_manager `
|
|
--include-data-dir=config=config `
|
|
--include-data-dir=models=models `
|
|
--windows-console-mode=disable `
|
|
--output-filename=Pseudonymisation.exe `
|
|
--company-name="Hopital" `
|
|
--product-name="Pseudonymisation de PDF" `
|
|
--product-version=5.0.0 `
|
|
--file-description="Pseudonymisation automatique de documents PDF" `
|
|
--assume-yes-for-downloads `
|
|
--remove-output `
|
|
Pseudonymisation_Gui_V5.py
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: Pseudonymisation-Windows-x64
|
|
path: Pseudonymisation.exe
|
|
retention-days: 30
|
|
|
|
- name: Upload to release (on tag)
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: Pseudonymisation.exe
|