-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #185 from chase9/add-flatpak
Add flatpak support
- Loading branch information
Showing
28 changed files
with
1,078 additions
and
127 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 |
---|---|---|
@@ -1,2 +1,8 @@ | ||
[flake8] | ||
exclude = resources_rc.py,.venv,main_window.py | ||
exclude = | ||
resources_rc.py, | ||
.venv, | ||
main_window.py | ||
build, | ||
dist | ||
max-line-length = 90 |
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,80 @@ | ||
name: Build and Release Yin-Yang | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: "Build application as Whl" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.12"] | ||
os: [ubuntu-22.04] | ||
runs-on: ${{matrix.os}} | ||
steps: | ||
# Checkout repo and set up python | ||
- uses: actions/checkout@v4 | ||
- name: Install Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{matrix.python-version}} | ||
# Install and configure poetry | ||
- name: Install Poetry | ||
uses: abatilo/actions-poetry@v2 | ||
- name: Set up local virtual environment | ||
run: | | ||
poetry config virtualenvs.create true --local | ||
poetry config virtualenvs.in-project true --local | ||
# Load cached venv if it exists | ||
- name: Cache packages | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
# This path is specific to ubuntu | ||
path: ./.venv | ||
key: venv-${{ hashFiles('poetry.lock') }} | ||
# Install dependencies of cache does not exist | ||
- name: Install system dependencies | ||
run: | | ||
sudo apt install qt6-base-dev libsystemd-dev gcc | ||
- name: Install Poetry dependencies | ||
# if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: | | ||
poetry install --sync --no-interaction | ||
# Compile and build Yin-Yang | ||
- name: Compile ui, translations and resources | ||
run: poetry run ./scripts/build_ui.sh | ||
- name: Build Whl for release | ||
run: poetry build -f wheel -n -o . | ||
# Upload build artifacts for later use | ||
- name: Upload yin-yang whl for flatpak build | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: yin-yang-${{ github.sha }}-py3-none-any.whl | ||
path: '*.whl' | ||
|
||
flatpak: | ||
name: "Build flatpak file" | ||
runs-on: ubuntu-22.04 | ||
needs: build | ||
container: | ||
image: bilelmoussaoui/flatpak-github-actions:kde-5.15-23.08 | ||
options: --privileged | ||
strategy: | ||
matrix: | ||
arch: [x86_64] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Download build from last step | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: dist/ | ||
name: yin-yang-${{ github.sha }}-py3-none-any.whl | ||
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6 | ||
with: | ||
bundle: yin-yang.flatpak | ||
manifest-path: sh.oskar.yin-yang.json | ||
cache-key: flatpak-builder-${{ github.sha }} | ||
arch: x86_64 |
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
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
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 @@ | ||
extension-pkg-whitelist=PyQt5 |
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,25 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Debug Yin-Yang", | ||
"type": "debugpy", | ||
"request": "launch", | ||
"console": "integratedTerminal", | ||
"module": "yin_yang", | ||
"justMyCode": true | ||
}, | ||
{ | ||
"name": "Debug Poetry Generator", | ||
"type": "debugpy", | ||
"request": "launch", | ||
"console": "integratedTerminal", | ||
"program": "flatpak-poetry-generator.py", | ||
"justMyCode": true, | ||
"args": ["poetry.lock"] | ||
} | ||
] | ||
} |
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,2 +1,10 @@ | ||
{ | ||
} | ||
"python.testing.pytestArgs": [ | ||
"tests" | ||
], | ||
"python.testing.unittestEnabled": false, | ||
"python.testing.pytestEnabled": true, | ||
"black-formatter.args": [ | ||
"--skip-string-normalization" | ||
] | ||
} |
Oops, something went wrong.