Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Build

on:
push:
branches: ["**"]
tags: ["v*"]
pull_request:

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

### INSTALL UV
- name: Install uv (Unix)
if: runner.os != 'Windows'
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: Install uv (Windows)
if: runner.os == 'Windows'
run: |
powershell -ExecutionPolicy Bypass -c `
"irm https://astral.sh/uv/install.ps1 | iex"
echo "$env:USERPROFILE\.cargo\bin" >> $env:GITHUB_PATH

- name: Verify uv
run: uv --version

### INSTALL PYTHON DEPENDENCIES
- name: Install dependencies
run: uv sync --group deployment

### INSTALL DEPENDENCY WALKER FOR NUITKA ON WINDOWS
- name: Download Dependency Walker for Nuitka
if: runner.os == 'Windows'
shell: pwsh
run: |
$dest = "$env:LOCALAPPDATA\Nuitka\Nuitka\Cache\downloads\depends\x86_64"
New-Item -ItemType Directory -Force -Path $dest
Invoke-WebRequest -Uri "https://dependencywalker.com/depends22_x64.zip" `
-OutFile "$dest\depends.zip"
Expand-Archive -Path "$dest\depends.zip" -DestinationPath $dest -Force

### BUILD APP WITH PYSIDE6-DEPLOY AND UPLOAD AS ARTIFACT
- name: Build app
run: uv run pyside6-deploy --mode standalone --name groupselect2 app/main.py

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: groupselect2-dist-${{ matrix.os }}
path: app/groupselect2.dist

### BUILD MSIX FOR WINDOWS
- name: Set version in manifest
if: runner.os == 'Windows'
shell: pwsh
run: |
$tag = git describe --tags --abbrev=0 2>$null
if ($tag) {
$semver = $tag -replace '^v', ''
} else {
$semver = "2.0.0"
}
$commitCount = git rev-list --count HEAD
$version = "$semver.$commitCount"
(Get-Content packaging\windows\AppxManifest.xml) `
-replace 'Version="0.0.0.0"', "Version=""$version""" |
Set-Content packaging\windows\AppxManifest.xml
Write-Host "Set version to $version"

- name: Assemble MSIX package folder
if: runner.os == 'Windows'
shell: pwsh
run: |
$pkg = "msix_staging"
New-Item -ItemType Directory -Path $pkg
Copy-Item -Recurse "app\groupselect2.dist\*" "$pkg\"
Copy-Item "packaging\windows\AppxManifest.xml" "$pkg\"
Copy-Item -Recurse "packaging\windows\assets" "$pkg\assets"

- name: Build MSIX with makeappx
if: runner.os == 'Windows'
shell: pwsh
run: |
$makeappx = Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\bin" `
-Recurse -Filter "makeappx.exe" |
Where-Object { $_.FullName -like "*x64*" } |
Select-Object -Last 1 -ExpandProperty FullName

& $makeappx pack /d msix_staging /p groupselect2.msix /nv

- name: Upload MSIX artifact
if: runner.os == 'Windows'
uses: actions/upload-artifact@v4
with:
name: groupselect2-msix
path: groupselect2.msix
1 change: 1 addition & 0 deletions app/main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
from base_app.AppContext import AppContext

from GSProject import GSProject
Expand Down
22 changes: 22 additions & 0 deletions org.sortitionfoundation.GroupSelect.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
app-id: org.sortitionfoundation.GroupSelect
runtime: org.kde.Platform
runtime-version: "6.6"
sdk: org.kde.Sdk
command: groupselect2

finish-args:
- --filesystem=home

modules:
- name: groupselect2
buildsystem: simple
build-commands:
- curl -LsSf https://astral.sh/uv/install.sh | sh
- export PATH=$PATH:$HOME/.cargo/bin

- install -Dm755 app/main.py /app/bin/groupselect2
# - install -Dm755 dist/groupselect2.bin /app/bin/groupselect2
sources:
- type: git
url: https://github.com/sortitionfoundation/groupselect-app
commit: e566cdc8e9b8713a6c9616ea4de1d0c734e830e6
Binary file added packaging/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions packaging/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions packaging/windows/AppxManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="rescap">

<Identity
Name="PhilippVerpoort.GroupSelect"
Publisher="CN=AF1537D8-AEDC-4CBD-A7E8-4B47BA0B3DD6"
Version="0.0.0.0"
ProcessorArchitecture="x64" />

<Properties>
<DisplayName>GroupSelect</DisplayName>
<PublisherDisplayName>Philipp Verpoort</PublisherDisplayName>
<Logo>assets/logo-store.png</Logo>
</Properties>

<Dependencies>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.22621.0" />
</Dependencies>

<Resources>
<Resource Language="en-us"/>
</Resources>

<Applications>
<Application Id="groupselect2" Executable="main.exe" EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements
DisplayName="GroupSelect"
Description="GroupSelect App for dividing participants of deliberative mini-publics into groups."
Square150x150Logo="assets/logo150.png"
Square44x44Logo="assets/logo44.png"
BackgroundColor="transparent"/>
</Application>
</Applications>

<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
</Package>
Binary file added packaging/windows/assets/logo-store.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packaging/windows/assets/logo150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packaging/windows/assets/logo44.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 12 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,21 @@ dependencies = [
"base-app",
"datahandling",
"groupselect",
"pandas>=2.3.3",
"setuptools>=80.9.0",
"pandas>=2.3.3,<3.0.0",
]

[tool.uv.sources]
base-app = { git = "https://github.com/PhilippVerpoort/base-app/" }
datahandling = { git = "https://github.com/PhilippVerpoort/datahandling/" }
groupselect = { git = "https://github.com/PhilippVerpoort/groupselect-lib" }

[dependency-groups]
deployment = [
"nuitka==2.7.11",
"ordered-set>=4.1.0",
"patchelf>=0.17.2.4; sys_platform == 'linux'",
"pip>=26.0.1",
"setuptools>=81.0.0",
"wheel>=0.46.3",
"zstandard>=0.25.0",
]
Loading
Loading