Skip to content

Commit 3da9dd6

Browse files
committed
Optimize build speed: cache PyInstaller and lower zip compression
1 parent 3f070c8 commit 3da9dd6

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/dev-release.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ jobs:
2525
- name: Install Python dependencies
2626
run: pip install -r requirements.txt
2727

28+
- name: Cache PyInstaller build
29+
uses: actions/cache@v4
30+
with:
31+
path: |
32+
build/
33+
~\AppData\Roaming\pyinstaller
34+
key: ${{ runner.os }}-pyinstaller-${{ hashFiles('**/*.py', 'requirements.txt') }}
35+
restore-keys: |
36+
${{ runner.os }}-pyinstaller-
37+
2838
- name: Set up MinGW
2939
uses: egor-tensin/setup-mingw@v2
3040
with:

makefile.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ def build_hammer5_tools(fast=False) -> None:
177177
'--collect-submodules=clr_loader',
178178
# '--strip', # Removed to avoid errors with .NET DLLs
179179
'--optimize=0',
180-
'--clean',
181180
'--icon=src/appicon.ico',
182181
'--add-data=src/appicon.ico;.',
183182
'--add-data=src/images;images/',
@@ -242,7 +241,7 @@ def should_exclude(file_name: str, file_path: str) -> bool:
242241
return True
243242
return False
244243

245-
with zipfile.ZipFile(output_path, 'w', compression=zipfile.ZIP_DEFLATED, compresslevel=9) as archive:
244+
with zipfile.ZipFile(output_path, 'w', compression=zipfile.ZIP_DEFLATED, compresslevel=6) as archive:
246245
for root, _, files in os.walk(folder_path):
247246
for file in files:
248247
file_path = os.path.join(root, file)

0 commit comments

Comments
 (0)