From dd11ef0a2ff89af2a18efb18798f45da74788bc4 Mon Sep 17 00:00:00 2001 From: Artems1111 Date: Tue, 15 Sep 2026 11:24:51 +0300 Subject: [PATCH 1/8] first draft of build.yml --- .github/workflows/build.yml | 57 ++++++++----------------------------- 1 file changed, 12 insertions(+), 45 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cc32494..4ada5fa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Python CI/CD Pipeline (Linter + Debian Build) +name: Python CI/CD Pipeline (Arch Linux Build) on: push: @@ -9,7 +9,7 @@ on: jobs: validate-and-package: - runs-on: ubuntu-24.04 + runs-on: [self-hosted, linux, x64] permissions: contents: write steps: @@ -31,51 +31,18 @@ jobs: - name: Install Native Build Tools run: | - sudo apt-get update - sudo apt-get install -y build-essential debhelper dh-python python3-all python3-setuptools + sudo pacman -Syyu --noconfirm + sudo pacman -S --noconfirm base-devel python python-setuptools - - name: Scaffold Debian Control Files + + - name: Build Arch Packages run: | - mkdir -p debian - mkdir -p debian/source - - # Marks as native so Launchpad doesn't crash asking for an original tarball - echo "3.0 (native)" > debian/source/format - - cat << 'EOF' > debian/rules - #!/usr/bin/make -f - %: - dh $@ --with python3 --buildsystem=pybuild - EOF - chmod +x debian/rules - - cat << 'EOF' > debian/control - Source: unidesk - Section: python - Priority: optional - Maintainer: Apostolos Chalis - Build-Depends: debhelper-compat (= 13), dh-python, python3-all, python3-setuptools - Standards-Version: 4.6.2 - - Package: python3-unidesk - Architecture: all - Depends: ${python3:Depends}, ${misc:Depends}, python3-pyqt6 - Description: Helper app for UniOS written in python/Qt - EOF - - DEB_DATE=$(date -R) - DEB_AUTHOR=$(git log -1 --pretty=format:'%an <%ae>') - - printf "unidesk (1.0.0) noble; urgency=low\n\n * Auto-generated release.\n\n -- %s %s\n" "$DEB_AUTHOR" "$DEB_DATE" > debian/changelog - - - name: Build Debian Packages (Binary & Source) - run: | - dpkg-buildpackage -us -uc -b - - dpkg-buildpackage -us -uc -S + makepkg -s --noconfirm mkdir -p output_package - mv ../unidesk_* output_package/ + mv ../UniDesk/ output_package/ + mv ../pkg/ output_package/ + mv ../*.pkg.tar.zst output_package/ - name: Upload All Package Artifacts uses: actions/upload-artifact@v4 @@ -83,8 +50,8 @@ jobs: name: unidesk-complete-packages path: output_package/* - - name: Publish .deb to GitHub Releases + - name: Publish . to GitHub Releases uses: softprops/action-gh-release@v2 if: startsWith(github.ref, 'refs/tags/') # Only runs if you push a tag like v1.0.0 with: - files: output_package/*.deb + files: output_package/*.pkg.tar.zst From ad4eadbaaf160f51aa596c71ca33c059e1de4e03 Mon Sep 17 00:00:00 2001 From: Artems1111 Date: Tue, 15 Sep 2026 21:04:17 +0300 Subject: [PATCH 2/8] moving to output package only the .pkg.tar.zst file --- .github/workflows/build.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ada5fa..beb9c40 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,8 +40,6 @@ jobs: makepkg -s --noconfirm mkdir -p output_package - mv ../UniDesk/ output_package/ - mv ../pkg/ output_package/ mv ../*.pkg.tar.zst output_package/ - name: Upload All Package Artifacts From 4c6d305b7f313d81477e32d44427d043d4aee7e4 Mon Sep 17 00:00:00 2001 From: Artems1111 Date: Fri, 18 Sep 2026 10:10:33 +0300 Subject: [PATCH 3/8] erase self-hosted runs-on tag, adding ubuntu tag and arch container --- .github/workflows/build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index beb9c40..36f8979 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,10 +9,13 @@ on: jobs: validate-and-package: - runs-on: [self-hosted, linux, x64] + runs-on: ubuntu-24.04 permissions: contents: write - steps: + container: + image: archlinux:latest + + steps: - name: Checkout Source Code uses: actions/checkout@v4 with: From 1d191913a06f3c39dee4bea418ef1a64d51fb1f2 Mon Sep 17 00:00:00 2001 From: Artems1111 Date: Fri, 18 Sep 2026 15:53:18 +0300 Subject: [PATCH 4/8] erase the install python dependencies step --- .github/workflows/build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 36f8979..dfa6ad3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,8 +26,6 @@ jobs: with: python-version: '3.12' - - name: Install Python Dependencies - run: pip install ruff setuptools - name: Run Ruff Static Analysis run: ruff check src/unidesk/ @@ -35,7 +33,7 @@ jobs: - name: Install Native Build Tools run: | sudo pacman -Syyu --noconfirm - sudo pacman -S --noconfirm base-devel python python-setuptools + sudo pacman -S --noconfirm base-devel python python-setuptools - name: Build Arch Packages From b1957d52171228980971f29e898cbb8d0dd28a12 Mon Sep 17 00:00:00 2001 From: Artems1111 Date: Fri, 18 Sep 2026 16:02:26 +0300 Subject: [PATCH 5/8] placing ruff check after installing native build tools --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dfa6ad3..3de55e9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,13 +27,13 @@ jobs: python-version: '3.12' - - name: Run Ruff Static Analysis - run: ruff check src/unidesk/ - - name: Install Native Build Tools run: | sudo pacman -Syyu --noconfirm - sudo pacman -S --noconfirm base-devel python python-setuptools + sudo pacman -S --noconfirm base-devel python python-setuptools ruff + + - name: Run Ruff Static Analysis + run: ruff check src/unidesk/ - name: Build Arch Packages From 7becda8a24c8d7b76eb7bb4c5d142c832837e06a Mon Sep 17 00:00:00 2001 From: Artems1111 Date: Fri, 18 Sep 2026 16:26:14 +0300 Subject: [PATCH 6/8] removing sudo command where unessesary, running makepkg as builder user --- .github/workflows/build.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3de55e9..7080616 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,8 +29,11 @@ jobs: - name: Install Native Build Tools run: | - sudo pacman -Syyu --noconfirm - sudo pacman -S --noconfirm base-devel python python-setuptools ruff + pacman -Syyu --noconfirm + pacman -S --noconfirm base-devel python python-setuptools python-build python-installer python-wheel ruff + + useradd --create-home --shell /bin/bash builder + chown -R builder:builder "$GITHUB_WORKSPACE" - name: Run Ruff Static Analysis run: ruff check src/unidesk/ @@ -38,10 +41,12 @@ jobs: - name: Build Arch Packages run: | - makepkg -s --noconfirm mkdir -p output_package - mv ../*.pkg.tar.zst output_package/ + chown builder:builder output_package + + runuser -u builder -- makepkg --noconfirm + mv ./*.pkg.tar.zst output_package/ - name: Upload All Package Artifacts uses: actions/upload-artifact@v4 From 12c166716842e5b5eac30a8c4aa77a984d2e61cb Mon Sep 17 00:00:00 2001 From: Artems1111 Date: Fri, 18 Sep 2026 16:41:30 +0300 Subject: [PATCH 7/8] removing tabs --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7080616..1e12e08 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,7 @@ jobs: pacman -S --noconfirm base-devel python python-setuptools python-build python-installer python-wheel ruff useradd --create-home --shell /bin/bash builder - chown -R builder:builder "$GITHUB_WORKSPACE" + chown -R builder:builder "$GITHUB_WORKSPACE" - name: Run Ruff Static Analysis run: ruff check src/unidesk/ From 096529aefa54d0e06e7251231c3d57a872c2f07a Mon Sep 17 00:00:00 2001 From: Artems1111 Date: Sat, 19 Sep 2026 17:52:24 +0300 Subject: [PATCH 8/8] add pyqt6 in installation, replace checkout, python and release versions with the latest ones --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1e12e08..a3cd3e9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,20 +17,20 @@ jobs: steps: - name: Checkout Source Code - uses: actions/checkout@v4 + uses: actions/checkout@v7 with: fetch-depth: 0 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v7 with: - python-version: '3.12' + python-version: '3.14' - name: Install Native Build Tools run: | pacman -Syyu --noconfirm - pacman -S --noconfirm base-devel python python-setuptools python-build python-installer python-wheel ruff + pacman -S --noconfirm base-devel python python-pyqt6 python-setuptools python-build python-installer python-wheel ruff useradd --create-home --shell /bin/bash builder chown -R builder:builder "$GITHUB_WORKSPACE" @@ -55,7 +55,7 @@ jobs: path: output_package/* - name: Publish . to GitHub Releases - uses: softprops/action-gh-release@v2 + uses: softprops/action-gh-release@v3 if: startsWith(github.ref, 'refs/tags/') # Only runs if you push a tag like v1.0.0 with: files: output_package/*.pkg.tar.zst