From 24b6fae5b09cb3163d186719d334565c73b4624f Mon Sep 17 00:00:00 2001 From: Domi31tls Date: Mon, 16 Feb 2026 18:37:03 +0100 Subject: [PATCH] Optimiser le build Nuitka : cache + nofollow-import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- .github/workflows/build-windows.yml | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 6e5f8c0..e33978b 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -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" `