Skip to content

Commit f312e0e

Browse files
committed
ci: experimental packaging with Nuitka compiler on Windows
1 parent 06c3d51 commit f312e0e

File tree

1 file changed

+51
-12
lines changed

1 file changed

+51
-12
lines changed
Lines changed: 51 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Package Application with Pyinstaller
1+
name: Package Application
22

33
on: [push]
44
permissions:
@@ -8,8 +8,8 @@ permissions:
88
pull-requests: "read"
99

1010
jobs:
11-
winbuild: # Windows build
12-
name: Build package on Windows
11+
win-pyinstaller:
12+
name: Build package on Windows (Pyinstaller)
1313
runs-on: windows-latest
1414

1515
steps:
@@ -53,11 +53,48 @@ jobs:
5353
- name: Upload package
5454
uses: actions/upload-artifact@v4
5555
with:
56-
name: win
56+
name: win-pyinstaller
5757
path: dist/main.exe
5858

59-
macbuild: # MacOS Build
60-
name: Build package on MacOS
59+
win-nuitka:
60+
name: Build package on Windows (Nuitka)
61+
runs-on: windows-latest
62+
63+
steps:
64+
- name: Checkout source code
65+
uses: actions/checkout@v4
66+
67+
- name: Set up Python 3.12
68+
uses: actions/setup-python@v5
69+
with:
70+
python-version: '3.12'
71+
72+
- name: Install dependencies
73+
run: |
74+
python -m pip install --upgrade pip
75+
pip install "PySide6-Essentials==6.6.3.1" "aiohttp==3.12.15"
76+
77+
- name: Package application
78+
uses: Nuitka/Nuitka-Action@main
79+
with:
80+
nuitka-version: main
81+
script-name: main.py
82+
output-dir: build
83+
mode: onefile
84+
enable-plugins: pyside6
85+
msvc: latest
86+
windows-console-mode: disable
87+
windows-icon-from-ico: icons/icon.ico
88+
disable-cache: true
89+
90+
- name: Upload package
91+
uses: actions/upload-artifact@v4
92+
with:
93+
name: win-nuitka
94+
path: build/main.exe
95+
96+
mac-pyinstaller:
97+
name: Build package on MacOS (Pyinstaller)
6198
runs-on: macos-latest
6299

63100
steps:
@@ -105,22 +142,23 @@ jobs:
105142
- name: Upload package
106143
uses: actions/upload-artifact@v4
107144
with:
108-
name: mac
145+
name: mac-pyinstaller
109146
path: dist/checker.zip
110147

111-
upload: # Upload releases
148+
upload:
112149
name: Upload releases
113150
runs-on: ubuntu-latest
114-
needs: [winbuild, macbuild]
151+
needs: [win-pyinstaller, win-nuitka, mac-pyinstaller]
115152

116153
steps:
117154
- name: Download artifact
118155
uses: actions/download-artifact@v4
119156

120-
- name: Remame artifacts
157+
- name: Organize artifacts
121158
run: |
122-
mv win/main.exe checker-win-x64.exe
123-
mv mac/checker.zip checker-mac.zip
159+
mv win-pyinstaller/main.exe checker-win-x64.exe
160+
mv win-nuitka/main.exe checker-win-nuitka.exe
161+
mv mac-pyinstaller/checker.zip checker-mac.zip
124162
125163
- name: Create & upload release
126164
uses: marvinpinto/action-automatic-releases@latest
@@ -131,4 +169,5 @@ jobs:
131169
title: GoogleTranslate_IPFinder
132170
files: |
133171
checker-win-x64.exe
172+
checker-win-nuitka.exe
134173
checker-mac.zip

0 commit comments

Comments
 (0)