From ad8f22a35926f32a828471f452e046d36ca28bef Mon Sep 17 00:00:00 2001 From: arabian Date: Tue, 2 Jun 2026 21:59:46 +0300 Subject: [PATCH] ci: add arm64 support --- .github/workflows/build.yml | 39 ++++++++++++++++++---- .github/workflows/flatter.yml | 60 ++++++++++++++++++++++++++++++++-- .github/workflows/release.yml | 46 +++++++++++++++++++++----- packages/aur/bin/.SRCINFO | 31 ++++++++++-------- packages/aur/bin/PKGBUILD | 12 ++++--- packages/aur/standart/.SRCINFO | 3 +- packages/aur/standart/PKGBUILD | 2 +- 7 files changed, 153 insertions(+), 40 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ff6e55d..f442cb7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,15 @@ on: jobs: linux-build: - runs-on: ubuntu-latest + strategy: + matrix: + include: + - arch: x64 + runner: ubuntu-latest + - arch: arm64 + runner: ubuntu-24.04-arm + fail-fast: false + runs-on: ${{ matrix.runner }} steps: - name: Install apt deps (jq/zip + dev-libs) @@ -64,7 +72,7 @@ jobs: run: | set -euo pipefail COMMIT_SHA="${{ github.sha }}" - ARCHIVE_NAME="pwsp-${COMMIT_SHA}-linux-x64.zip" + ARCHIVE_NAME="pwsp-${COMMIT_SHA}-linux-${{ matrix.arch }}.zip" echo "Creating archive: $ARCHIVE_NAME" FILES=() @@ -91,12 +99,20 @@ jobs: - name: Upload archive as artifact uses: actions/upload-artifact@v4 with: - name: archive + name: archive-${{ matrix.arch }} path: pwsp-*.zip retention-days: 7 deb-build: - runs-on: ubuntu-latest + strategy: + matrix: + include: + - arch: x64 + runner: ubuntu-latest + - arch: arm64 + runner: ubuntu-24.04-arm + fail-fast: false + runs-on: ${{ matrix.runner }} steps: - name: Install apt deps (dev-libs) @@ -149,13 +165,21 @@ jobs: - name: Upload .deb(s) as artifacts uses: actions/upload-artifact@v4 with: - name: deb-packages + name: deb-packages-${{ matrix.arch }} path: target/debian/*.deb retention-days: 7 flatpak-build: if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' - runs-on: ubuntu-latest + strategy: + matrix: + include: + - arch: x86_64 + runner: ubuntu-latest + - arch: aarch64 + runner: ubuntu-24.04-arm + fail-fast: false + runs-on: ${{ matrix.runner }} container: image: ghcr.io/flathub-infra/flatpak-github-actions:freedesktop-25.08 options: --privileged @@ -166,8 +190,9 @@ jobs: - name: Build Flatpak uses: flatpak/flatpak-github-actions/flatpak-builder@v6 with: - bundle: ru.arabianq.pwsp.flatpak + bundle: ru.arabianq.pwsp_${{ matrix.arch }}.flatpak manifest-path: packages/flatpak/ru.arabianq.pwsp.yaml cache: true branch: master build-bundle: true + arch: ${{ matrix.arch }} diff --git a/.github/workflows/flatter.yml b/.github/workflows/flatter.yml index 8f29bc8..b526122 100644 --- a/.github/workflows/flatter.yml +++ b/.github/workflows/flatter.yml @@ -21,8 +21,8 @@ on: default: "stable" jobs: - flatter: - name: Flatter + flatter-x64: + name: Flatter (x86_64) runs-on: ubuntu-latest permissions: contents: read @@ -30,6 +30,59 @@ jobs: image: ghcr.io/andyholmes/flatter/freedesktop:25.08 options: --privileged + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ inputs.tag_name || github.ref }} + + - name: Setup GPG + id: gpg + uses: crazy-max/ghaction-import-gpg@v6 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.GPG_PASSPHRASE }} + + - name: Set Default Branch + id: set_branch + run: | + if [ "${{ github.event_name }}" == "release" ]; then + echo "branch=stable" >> $GITHUB_OUTPUT + elif [ "${{ github.event_name }}" == "workflow_dispatch" ]; then + echo "branch=${{ inputs.build_branch }}" >> $GITHUB_OUTPUT + else + echo "branch=nightly" >> $GITHUB_OUTPUT + fi + + - name: Modify Manifest + run: | + echo "branch: ${{ steps.set_branch.outputs.branch }}" >> packages/flatpak/ru.arabianq.pwsp.yaml + echo "default-branch: ${{ steps.set_branch.outputs.branch }}" >> packages/flatpak/ru.arabianq.pwsp.yaml + + - name: Install SDK Extensions + run: + flatpak install -y flathub org.freedesktop.Sdk.Extension.rust-stable//25.08 + org.freedesktop.Sdk.Extension.llvm20//25.08 + + - name: Build Flatpak + uses: andyholmes/flatter@main + with: + files: packages/flatpak/ru.arabianq.pwsp.yaml + gpg-sign: ${{ steps.gpg.outputs.fingerprint }} + upload-bundles: false + upload-pages-artifact: false + arch: x86_64 + + flatter-arm64: + name: Flatter (aarch64) + needs: flatter-x64 + runs-on: ubuntu-24.04-arm + permissions: + contents: read + container: + image: ghcr.io/andyholmes/flatter/freedesktop:25.08 + options: --privileged + steps: - name: Checkout uses: actions/checkout@v4 @@ -71,11 +124,12 @@ jobs: gpg-sign: ${{ steps.gpg.outputs.fingerprint }} upload-bundles: false upload-pages-artifact: true + arch: aarch64 deploy: name: Deploy to GitHub Pages runs-on: ubuntu-latest - needs: flatter + needs: flatter-arm64 permissions: pages: write id-token: write diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 08174df..845b26b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -64,7 +64,15 @@ jobs: linux-release: needs: prepare - runs-on: ubuntu-latest + strategy: + matrix: + include: + - arch: x64 + runner: ubuntu-latest + - arch: arm64 + runner: ubuntu-24.04-arm + fail-fast: false + runs-on: ${{ matrix.runner }} steps: - name: Install apt deps (jq/zip + dev-libs) @@ -107,7 +115,7 @@ jobs: run: | set -euo pipefail TAG="${{ needs.prepare.outputs.tag }}" - ARCHIVE_NAME="pwsp-${TAG}-linux-x64.zip" + ARCHIVE_NAME="pwsp-${TAG}-linux-${{ matrix.arch }}.zip" echo "Creating archive: $ARCHIVE_NAME" FILES=() @@ -134,13 +142,21 @@ jobs: - name: Upload zip archive uses: actions/upload-artifact@v4 with: - name: zip-archive + name: zip-archive-${{ matrix.arch }} path: pwsp-*.zip retention-days: 1 deb-release: needs: prepare - runs-on: ubuntu-latest + strategy: + matrix: + include: + - arch: x64 + runner: ubuntu-latest + - arch: arm64 + runner: ubuntu-24.04-arm + fail-fast: false + runs-on: ${{ matrix.runner }} steps: - name: Install apt deps (dev-libs) @@ -188,7 +204,7 @@ jobs: - name: Upload deb package uses: actions/upload-artifact@v4 with: - name: deb-package + name: deb-package-${{ matrix.arch }} path: target/debian/*.deb retention-days: 1 @@ -196,16 +212,28 @@ jobs: needs: [prepare, linux-release, deb-release] runs-on: ubuntu-latest steps: - - name: Download zip archive + - name: Download zip archive (x64) uses: actions/download-artifact@v4 with: - name: zip-archive + name: zip-archive-x64 path: ./dist - - name: Download deb package + - name: Download zip archive (arm64) uses: actions/download-artifact@v4 with: - name: deb-package + name: zip-archive-arm64 + path: ./dist + + - name: Download deb package (x64) + uses: actions/download-artifact@v4 + with: + name: deb-package-x64 + path: ./dist + + - name: Download deb package (arm64) + uses: actions/download-artifact@v4 + with: + name: deb-package-arm64 path: ./dist - name: Upload artifacts to Release diff --git a/packages/aur/bin/.SRCINFO b/packages/aur/bin/.SRCINFO index 9bd84e0..efb6a14 100644 --- a/packages/aur/bin/.SRCINFO +++ b/packages/aur/bin/.SRCINFO @@ -1,17 +1,20 @@ pkgbase = pwsp-bin -pkgdesc = Lets you play audio files through your microphone (Pre-built binaries) -pkgver = 1.10.0 -pkgrel = 1 -url = https://github.com/arabianq/pipewire-soundpad -arch = x86_64 -license = MIT -depends = pipewire -depends = alsa-lib -provides = pwsp -conflicts = pwsp -source = pwsp-bin-1.10.0.zip :: https://github.com/arabianq/pipewire-soundpad/releases/download/v1.10.0/pwsp-v1.10.0-linux-x64.zip -source = pipewire-soundpad-1.10.0.tar.gz :: https://github.com/arabianq/pipewire-soundpad/archive/refs/tags/v1.10.0.tar.gz -sha256sums = SKIP -sha256sums = SKIP + pkgdesc = Lets you play audio files through your microphone (Pre-built binaries) + pkgver = 1.10.0 + pkgrel = 1 + url = https://github.com/arabianq/pipewire-soundpad + arch = x86_64 + arch = aarch64 + license = MIT + depends = pipewire + depends = alsa-lib + provides = pwsp + conflicts = pwsp + source = pipewire-soundpad-1.10.0.tar.gz :: https://github.com/arabianq/pipewire-soundpad/archive/refs/tags/v1.10.0.tar.gz + sha256sums = SKIP + source_x86_64 = pwsp-1.10.0-x86_64.zip :: https://github.com/arabianq/pipewire-soundpad/releases/download/v1.10.0/pwsp-v1.10.0-linux-x64.zip + sha256sums_x86_64 = SKIP + source_aarch64 = pwsp-1.10.0-aarch64.zip :: https://github.com/arabianq/pipewire-soundpad/releases/download/v1.10.0/pwsp-v1.10.0-linux-arm64.zip + sha256sums_aarch64 = SKIP pkgname = pwsp-bin diff --git a/packages/aur/bin/PKGBUILD b/packages/aur/bin/PKGBUILD index fea2a62..2ad4012 100644 --- a/packages/aur/bin/PKGBUILD +++ b/packages/aur/bin/PKGBUILD @@ -4,18 +4,20 @@ _pkgname=pipewire-soundpad pkgver=1.10.0 pkgrel=1 pkgdesc="Lets you play audio files through your microphone (Pre-built binaries)" -arch=('x86_64') +arch=('x86_64' 'aarch64') url="https://github.com/arabianq/pipewire-soundpad" license=('MIT') depends=('pipewire' 'alsa-lib') provides=('pwsp') conflicts=('pwsp') -source=("${pkgname}-${pkgver}.zip::https://github.com/arabianq/$_pkgname/releases/download/v$pkgver/pwsp-v$pkgver-linux-x64.zip" - "${_pkgname}-${pkgver}.tar.gz::https://github.com/arabianq/$_pkgname/archive/refs/tags/v$pkgver.tar.gz") +source_x86_64=("pwsp-${pkgver}-x86_64.zip::https://github.com/arabianq/$_pkgname/releases/download/v$pkgver/pwsp-v$pkgver-linux-x64.zip") +source_aarch64=("pwsp-${pkgver}-aarch64.zip::https://github.com/arabianq/$_pkgname/releases/download/v$pkgver/pwsp-v$pkgver-linux-arm64.zip") +source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/arabianq/$_pkgname/archive/refs/tags/v$pkgver.tar.gz") -sha256sums=('SKIP' - 'SKIP') +sha256sums=('SKIP') +sha256sums_x86_64=('SKIP') +sha256sums_aarch64=('SKIP') package() { _srcsrc="${srcdir}/${_pkgname}-${pkgver}" diff --git a/packages/aur/standart/.SRCINFO b/packages/aur/standart/.SRCINFO index 9ff19ae..b449135 100644 --- a/packages/aur/standart/.SRCINFO +++ b/packages/aur/standart/.SRCINFO @@ -3,7 +3,8 @@ pkgbase = pwsp pkgver = 1.10.0 pkgrel = 1 url = https://github.com/arabianq/pipewire-soundpad - arch = any + arch = x86_64 + arch = aarch64 license = MIT makedepends = clang makedepends = rust diff --git a/packages/aur/standart/PKGBUILD b/packages/aur/standart/PKGBUILD index 569224e..e0999a5 100644 --- a/packages/aur/standart/PKGBUILD +++ b/packages/aur/standart/PKGBUILD @@ -4,7 +4,7 @@ pkgname=pwsp pkgver=1.10.0 pkgrel=1 pkgdesc="Lets you play audio files through your microphone" -arch=('any') +arch=('x86_64' 'aarch64') url="https://github.com/arabianq/pipewire-soundpad" license=('MIT') makedepends=(clang rust cargo cmake pipewire alsa-lib)