-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (70 loc) · 2.57 KB
/
pyth-build.yml
File metadata and controls
83 lines (70 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Build Python Application with PyInstaller
on:
workflow_dispatch:
jobs:
build:
strategy:
matrix:
#os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest, macos-15, windows-latest]
#os: [macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install packages
if: runner.os == 'Linux'
run: |
sudo apt-get install --no-install-recommends --no-install-suggests -y libgtk-3-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
#pip install pyinstaller pysimplegui pyside2 wxPython
pip install pyinstaller pyside6
#pip install -r requirements.txt
- name: Build executable for Windows
if: runner.os == 'Windows'
run: |
PYLIBS=$(python -c 'import site; print(site.getsitepackages()[0])')
echo "PYLIBS: ${PYLIBS}"
mv ./python/PySide_test_2.py ./python/PySide_test_2.pyw
pyinstaller --noconsole --onefile --paths=${PYLIBS} ./python/PySide_test_2.pyw
shell: bash
- name: Build executable for Linux and MacOS
if: runner.os != 'Windows'
run: |
PYLIBS=$(python -c 'import site; print(site.getsitepackages()[0])')
echo "PYLIBS: ${PYLIBS}"
#pyinstaller --onefile --windowed your_script.py
#pyinstaller --onefile --paths=${PYLIBS} ./python/PySimpleGUI_test_1.py
pyinstaller --noconsole --onefile --paths=${PYLIBS} ./python/PySide_test_2.py
#pyinstaller --onefile --paths=${PYLIBS} ./python/wxPython_test_2.py
shell: bash
- name: Archive build output (Linux)
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: linux-build
path: ./dist
- name: Archive build output (Windows)
if: runner.os == 'Windows'
uses: actions/upload-artifact@v4
with:
name: windows-build
path: ./dist
- name: Archive build output (macOS latest)
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: macos-latest-build
path: ./dist
- name: Archive build output (macOS 15)
if: matrix.os == 'macos-15'
uses: actions/upload-artifact@v4
with:
name: macos-15-build
path: ./dist