Skip to content

Commit 63ee244

Browse files
committed
ci: add PyInstaller build workflow (Windows amd64, macOS x86_64)
1 parent 4b051d7 commit 63ee244

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: build-binaries
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
paths:
7+
- '**/*.py'
8+
- '.github/workflows/**'
9+
- 'requirements.txt'
10+
workflow_dispatch: {}
11+
12+
jobs:
13+
build:
14+
name: Build PyInstaller binaries
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
os: [windows-latest, macos-13]
20+
python-version: ['3.11']
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Set up Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
30+
- name: Install dependencies
31+
shell: bash
32+
run: |
33+
python -m pip install --upgrade pip
34+
if [ -f requirements.txt ]; then pip install -r requirements.txt; else pip install PyQt6; fi
35+
pip install pyinstaller
36+
37+
- name: Build PyQt6 app
38+
shell: bash
39+
run: |
40+
pyinstaller --name WINFF-GUI-PyQt6 --noconfirm --onefile --windowed GUI_pyqt6_WINFF.py
41+
42+
- name: Build Tkinter app
43+
shell: bash
44+
run: |
45+
pyinstaller --name WINFF-GUI-Tkinter --noconfirm --onefile --windowed GUI_tkinter_WINFF.py
46+
47+
- name: Collect artifacts
48+
shell: bash
49+
run: |
50+
mkdir -p artifacts
51+
if [[ "$RUNNER_OS" == "Windows" ]]; then
52+
cp dist/WINFF-GUI-PyQt6.exe artifacts/
53+
cp dist/WINFF-GUI-Tkinter.exe artifacts/
54+
else
55+
cp dist/WINFF-GUI-PyQt6 artifacts/
56+
cp dist/WINFF-GUI-Tkinter artifacts/
57+
fi
58+
59+
- name: Upload artifacts
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: ${{ runner.os }}-binaries
63+
path: artifacts/*

0 commit comments

Comments
 (0)