Optimize build: add timeout, simplify dependencies, reduce hidden imports

This commit is contained in:
Quality App Developer
2026-02-05 13:12:48 +02:00
parent f2a2ca7d97
commit 8e3893e85c

View File

@@ -9,6 +9,7 @@ on:
jobs:
build-windows:
runs-on: windows-latest
timeout-minutes: 30
strategy:
matrix:
@@ -25,11 +26,13 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements_windows.txt
pip install python-barcode pillow reportlab
pip install kivy==2.2.1
pip install pyinstaller==6.1.0
- name: Build executable with PyInstaller
run: |
pyinstaller label_printer_gui.py --onefile --windowed --name=LabelPrinter --distpath=./dist --workpath=./build --hidden-import=kivy --hidden-import=kivy.core.window --hidden-import=kivy.core.text --hidden-import=kivy.core.image --hidden-import=kivy.uix.boxlayout --hidden-import=kivy.uix.gridlayout --hidden-import=kivy.uix.label --hidden-import=kivy.uix.textinput --hidden-import=kivy.uix.button --hidden-import=kivy.uix.spinner --hidden-import=kivy.uix.scrollview --hidden-import=kivy.uix.popup --hidden-import=kivy.clock --hidden-import=kivy.graphics --hidden-import=PIL --hidden-import=barcode --hidden-import=reportlab --hidden-import=print_label --hidden-import=print_label_pdf
pyinstaller label_printer_gui.py --onefile --windowed --name=LabelPrinter --distpath=./dist --workpath=./build --hidden-import=kivy --hidden-import=PIL --hidden-import=barcode --hidden-import=reportlab --hidden-import=print_label --hidden-import=print_label_pdf -y
- name: Upload Windows executable as artifact
uses: actions/upload-artifact@v4