Optimiser le build Nuitka : cache + nofollow-import

- Cache Nuitka entre les builds (accélère les rebuilds)
- --nofollow-import-to pour les gros packages déjà compilés
  (onnxruntime, numpy, transformers, PIL, etc.)
- Nuitka les inclut tels quels sans les recompiler en C

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-16 18:37:03 +01:00
parent 2e7e31a1f9
commit 24b6fae5b0

View File

@@ -1,10 +1,10 @@
name: Build Windows EXE (Nuitka)
on:
workflow_dispatch: # declenchement manuel depuis GitHub
workflow_dispatch:
push:
tags:
- 'v*' # build automatique sur tag v5.0, v5.1, etc.
- 'v*'
jobs:
build-windows:
@@ -21,6 +21,15 @@ jobs:
python-version: '3.12'
cache: pip
- name: Cache Nuitka
uses: actions/cache@v4
with:
path: |
~\AppData\Local\Nuitka\Nuitka
nuitka-build-cache
key: nuitka-${{ runner.os }}-${{ hashFiles('requirements.txt', 'Pseudonymisation_Gui_V5.py') }}
restore-keys: nuitka-${{ runner.os }}-
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
@@ -42,6 +51,18 @@ jobs:
--include-module=eds_pseudo_manager `
--include-data-dir=config=config `
--include-data-dir=models=models `
--nofollow-import-to=onnxruntime `
--nofollow-import-to=numpy `
--nofollow-import-to=transformers `
--nofollow-import-to=optimum `
--nofollow-import-to=tokenizers `
--nofollow-import-to=sentencepiece `
--nofollow-import-to=torch `
--nofollow-import-to=PIL `
--nofollow-import-to=pdfplumber `
--nofollow-import-to=pdfminer `
--nofollow-import-to=fitz `
--nofollow-import-to=yaml `
--windows-console-mode=disable `
--output-filename=Pseudonymisation.exe `
--company-name="Hopital" `