Major optimization: use --onedir (faster), add pip cache, increase timeout to 45min
This commit is contained in:
17
.github/workflows/build-windows.yml
vendored
17
.github/workflows/build-windows.yml
vendored
@@ -9,7 +9,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build-windows:
|
build-windows:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
timeout-minutes: 30
|
timeout-minutes: 45
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -22,23 +22,28 @@ jobs:
|
|||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
cache: 'pip'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip setuptools wheel
|
python -m pip install --upgrade pip setuptools wheel
|
||||||
pip install python-barcode pillow reportlab
|
pip install python-barcode pillow reportlab kivy==2.2.1 pyinstaller==6.1.0
|
||||||
pip install kivy==2.2.1
|
|
||||||
pip install pyinstaller==6.1.0
|
|
||||||
|
|
||||||
- name: Build executable with PyInstaller
|
- name: Build executable with PyInstaller
|
||||||
run: |
|
run: |
|
||||||
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
|
pyinstaller label_printer_gui.py --onedir --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 --noupx
|
||||||
|
|
||||||
|
- name: Create single executable zip
|
||||||
|
run: |
|
||||||
|
cd dist
|
||||||
|
7z a -r LabelPrinter.zip LabelPrinter/
|
||||||
|
shell: powershell
|
||||||
|
|
||||||
- name: Upload Windows executable as artifact
|
- name: Upload Windows executable as artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: LabelPrinter-Windows
|
name: LabelPrinter-Windows
|
||||||
path: dist/LabelPrinter.exe
|
path: dist/LabelPrinter.zip
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
- name: Create Release and Upload
|
- name: Create Release and Upload
|
||||||
|
|||||||
Reference in New Issue
Block a user