Skip to content

Commit

Permalink
add build actions
Browse files Browse the repository at this point in the history
  • Loading branch information
LoSk-p committed Mar 18, 2024
1 parent 97992f2 commit 70c7bfa
Show file tree
Hide file tree
Showing 4 changed files with 155 additions and 1 deletion.
110 changes: 110 additions & 0 deletions .github/workflows/make-app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: PyInstaller

on: [push]

jobs:
buildMac:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: build with pyinstaller
run: |
pyinstaller app/main.py --onefile --windowed --name SmartWaterGUI.dmg
ls
ls dist
- uses: actions/upload-artifact@v2
with:
name: SmartWaterGUI-macos
path: dist/SmartWaterGUI.dmg

buildUbuntu20:

runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v1
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install qttools5-dev-tools pyqt5-dev-tools qt5-default python3-pip python3.9
pip install -r requirements.txt
- name: build with pyinstaller
run: |
pyinstaller app/main.py --onefile --windowed --name SmartWaterGUI
- uses: actions/upload-artifact@v2
with:
name: SmartWaterGUI-ubuntu20
path: dist/SmartWaterGUI

buildUbuntuLatest:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install qttools5-dev-tools pyqt5-dev-tools qtbase5-dev qt5-qmake python3-pip python3.9
pip install -r requirements.txt
- name: build with pyinstaller
run: |
pyinstaller app/main.py --onefile --windowed --name SmartWaterGUI
- uses: actions/upload-artifact@v2
with:
name: SmartWaterGUI-ubuntu-latest
path: dist/SmartWaterGUI

buildWin:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Build App
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pyinstaller app/main.py --onefile --windowed --name SmartWaterGUI.exe
ls dist/
- uses: actions/upload-artifact@v2
with:
name: SmartWaterGUI-win
path: dist/SmartWaterGUI.exe

buildWin19:
runs-on: windows-2019
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Build App
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pyinstaller app/main.py --onefile --windowed --name SmartWaterGUI.exe
ls dist/
- uses: actions/upload-artifact@v2
with:
name: SmartWaterGUI-win19
path: dist/SmartWaterGUI.exe
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
__pycache__
.vscode
mainwindow.py
mainwindow.py
dist
build
37 changes: 37 additions & 0 deletions SmartWaterGUI.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# -*- mode: python ; coding: utf-8 -*-


a = Analysis(
['app/main.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
)
pyz = PYZ(a.pure)

exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='SmartWaterGUI',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
5 changes: 5 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pyserial==3.4
PyQt5-sip==12.12.1
PyQt5==5.15.9
pyqtgraph==0.13.3
pyinstaller==6.5.0

0 comments on commit 70c7bfa

Please sign in to comment.