Skip to content

Commit 83c7abb

Browse files
committed
Add pyinstaller linux CI build
1 parent e7b4e4d commit 83c7abb

4 files changed

Lines changed: 75 additions & 50 deletions

File tree

.github/workflows/flatpak.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
flatpak:
1010
runs-on: ubuntu-latest
1111
container:
12-
image: bilelmoussaoui/flatpak-github-actions:gnome-47
12+
image: bilelmoussaoui/flatpak-github-actions:gnome-48
1313
options: --privileged
1414
steps:
1515
- uses: actions/checkout@v4
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: PyInstaller Build Linux
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
pyinstaller-linux:
10+
runs-on: ubuntu-24.04
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: awalsh128/cache-apt-pkgs-action@latest
14+
with:
15+
packages: python3-gi gir1.2-gtk-4.0 gir1.2-adw-1
16+
version: 0
17+
- run: pip install pyinstaller
18+
- run: pip install .
19+
- run: pyinstaller yafi.spec
20+
working-directory: pyinstaller
21+
- name: Upload PyInstaller Artifact
22+
uses: actions/upload-artifact@v4
23+
with:
24+
path: pyinstaller/dist/YAFI
25+
name: yafi-linux-${{ github.sha }}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import os
2-
os.environ["GDK_SCALE"] = "2"
3-
4-
from yafi import main
5-
main()
1+
import os
2+
os.environ["GDK_SCALE"] = "2"
3+
4+
from yafi import main
5+
main()
Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
1-
# -*- mode: python ; coding: utf-8 -*-
2-
from PyInstaller.utils.hooks import collect_data_files
3-
4-
datas = [('LpcCrOSEC.bin', '.')]
5-
datas += collect_data_files('yafi')
6-
7-
8-
a = Analysis(
9-
['winyafi.py'],
10-
pathex=[],
11-
binaries=[],
12-
datas=datas,
13-
hiddenimports=['cros_ec_python'],
14-
hookspath=[],
15-
hooksconfig={"gi":{"module-versions": {"Gtk": "4.0"}}},
16-
runtime_hooks=[],
17-
excludes=[],
18-
noarchive=False,
19-
optimize=2,
20-
)
21-
pyz = PYZ(a.pure)
22-
23-
exe = EXE(
24-
pyz,
25-
a.scripts,
26-
a.binaries,
27-
a.datas,
28-
[],
29-
name='winyafi',
30-
debug=False,
31-
bootloader_ignore_signals=False,
32-
strip=False,
33-
upx=True,
34-
upx_exclude=[],
35-
runtime_tmpdir=None,
36-
console=False,
37-
disable_windowed_traceback=False,
38-
argv_emulation=False,
39-
target_arch=None,
40-
codesign_identity=None,
41-
entitlements_file=None,
42-
icon=['yafi.ico'],
43-
uac_admin=True,
44-
)
1+
# -*- mode: python ; coding: utf-8 -*-
2+
from PyInstaller.utils.hooks import collect_data_files
3+
import os
4+
5+
datas = [('LpcCrOSEC.bin', '.')] if os.path.exists('LpcCrOSEC.bin') else []
6+
datas += collect_data_files('yafi')
7+
8+
9+
a = Analysis(
10+
['entrypoint.py'],
11+
pathex=[],
12+
binaries=[],
13+
datas=datas,
14+
hiddenimports=['cros_ec_python'],
15+
hookspath=[],
16+
hooksconfig={"gi":{"module-versions": {"Gtk": "4.0"}}},
17+
runtime_hooks=[],
18+
excludes=[],
19+
noarchive=False,
20+
optimize=2,
21+
)
22+
pyz = PYZ(a.pure)
23+
24+
exe = EXE(
25+
pyz,
26+
a.scripts,
27+
a.binaries,
28+
a.datas,
29+
[],
30+
name='YAFI',
31+
debug=False,
32+
bootloader_ignore_signals=False,
33+
strip=False,
34+
upx=True,
35+
upx_exclude=[],
36+
runtime_tmpdir=None,
37+
console=False,
38+
disable_windowed_traceback=False,
39+
argv_emulation=False,
40+
target_arch=None,
41+
codesign_identity=None,
42+
entitlements_file=None,
43+
icon=['yafi.ico'],
44+
)

0 commit comments

Comments
 (0)