-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
61e1daf
commit 5b71109
Showing
78 changed files
with
4,439 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
name: Build PuniPi Application | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout the repository | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
# Set up Python environment | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
|
||
# Install system-level dependencies | ||
- name: Install System Dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt install -y \ | ||
gstreamer1.0-plugins-base \ | ||
gstreamer1.0-plugins-good \ | ||
gstreamer1.0-plugins-bad \ | ||
gstreamer1.0-plugins-ugly \ | ||
gstreamer1.0-libav \ | ||
gstreamer1.0-tools \ | ||
libglib2.0-0 \ | ||
libcairo2-dev \ | ||
libgirepository1.0-dev \ | ||
pkg-config \ | ||
libffi-dev \ | ||
libssl-dev \ | ||
libxml2-dev \ | ||
libxslt1-dev \ | ||
gir1.2-glib-2.0 \ | ||
gir1.2-pango-1.0 \ | ||
gir1.2-cairo-1.0 | ||
# Cache pip dependencies for faster builds | ||
- name: Cache pip | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
# Install Python dependencies | ||
- name: Install Python Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
# Compile QML resources if needed | ||
# Assuming you have a script or command to compile resources | ||
- name: Compile QML Resources | ||
run: | | ||
ls -la | ||
# Example command; adjust based on your project setup | ||
pyside6-rcc resources/resources.qrc -o resources/resources_rc.py | ||
# Build the executable with PyInstaller | ||
- name: Build Executable with PyInstaller | ||
run: | | ||
pyinstaller --clean --onefile punipi.spec | ||
# Upload the executable as an artifact | ||
- name: Upload Executable | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: punipi-executable | ||
path: dist/punipi/punipi # Adjust the path based on your spec file | ||
|
||
# Optionally, create a GitHub Release and attach the executable | ||
- name: Create GitHub Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: v1.0.0 # Update dynamically as needed | ||
release_name: PuniPi v1.0.0 | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload Executable to Release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./dist/punipi # Adjust the path based on your spec file | ||
asset_name: punipi | ||
asset_content_type: application/octet-stream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# .github/workflows/workflow.yml | ||
|
||
# This workflow will upload a Python Package using Twine when a release is created. | ||
# For more information see: https://docs.github.com/en/actions/guides/building-and-testing-python | ||
|
||
name: Upload Python Package to PyPi | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
release: | ||
types: [created] | ||
workflow_dispatch: | ||
|
||
# Define top-level permissions | ||
permissions: | ||
contents: write # Allows write access to repository contents (needed for checkout) | ||
id-token: write | ||
packages: write # Allows uploading packages to GitHub Packages or external registries | ||
actions: write # Allows reading workflow run information | ||
|
||
jobs: | ||
deploy: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' # Specify your Python version | ||
|
||
- name: Add repository sub-modules | ||
run: | | ||
git submodule init | ||
git submodule update | ||
- name: Install build and Twine | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build twine | ||
- name: Build the package | ||
run: | | ||
python -m build --sdist --wheel | ||
# The '--sdist --wheel' flags are optional as 'python -m build' builds both by default | ||
|
||
- name: Publish to TestPyPI | ||
env: | ||
TWINE_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }} | ||
run: | | ||
twine upload --verbose --repository-url https://test.pypi.org/legacy/ dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,162 +1,51 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
# These are some examples of commonly ignored file patterns. | ||
# You should customize this list as applicable to your project. | ||
# Learn more about .gitignore: | ||
# https://www.atlassian.com/git/tutorials/saving-changes/gitignore | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
# Node artifact files | ||
node_modules/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
src/punipi.egg-info/ | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
# Compiled Java class files | ||
*.class | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
cover/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
# Compiled Python bytecode | ||
*.py[cod] | ||
|
||
# Django stuff: | ||
# Log files | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
# Package files | ||
*.jar | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
.pybuilder/ | ||
# Maven | ||
target/ | ||
dist/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
# For a library or package, you might want to ignore these files since the code is | ||
# intended to run in multiple environments; otherwise, check them in: | ||
# .python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# poetry | ||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. | ||
# This is especially recommended for binary packages to ensure reproducibility, and is more | ||
# commonly ignored for libraries. | ||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control | ||
#poetry.lock | ||
|
||
# pdm | ||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. | ||
#pdm.lock | ||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it | ||
# in version control. | ||
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control | ||
.pdm.toml | ||
.pdm-python | ||
.pdm-build/ | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
# JetBrains IDE | ||
.idea/ | ||
|
||
# mkdocs documentation | ||
/site | ||
# Unit test reports | ||
TEST*.xml | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
# Generated by MacOS | ||
.DS_Store | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
# Generated by Windows | ||
Thumbs.db | ||
|
||
# pytype static type analyzer | ||
.pytype/ | ||
# Applications | ||
*.app | ||
*.exe | ||
*.war | ||
|
||
# Cython debug symbols | ||
cython_debug/ | ||
# Large media files | ||
*.mp4 | ||
*.tiff | ||
*.avi | ||
*.flv | ||
*.mov | ||
*.wmv | ||
|
||
# PyCharm | ||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can | ||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore | ||
# and can be added to the global gitignore or merged into this file. For a more nuclear | ||
# option (not recommended) you can uncomment the following to ignore the entire idea folder. | ||
#.idea/ |
Oops, something went wrong.