mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-04-28 14:31:23 +00:00
b2b83f5c32
* cargo fmt * deps: bump clap to 4.6.0 * deps: cargo update * Fix daemon autostart issue caused by sync pipewire retry loop (#43) (#44) At boot time, PipeWire takes some time to register the `pwsp-daemon` and `pwsp-virtual-mic` devices. Previously, the daemon's retry loop for `link_player_to_virtual_mic()` was synchronous and limited to 5 attempts (1.5 seconds total). This caused systemd autostarts to fail with a code 1 if the devices were not yet available. This change replaces the synchronous wait with an asynchronous `tokio::spawn` task. It will retry the link attempt up to 60 times with a 1-second delay without blocking the startup of the rest of the daemon. This prevents it from exiting abruptly during autostart. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> * deps: bump egui & eframe version to 0.34.1 * feat: replaced App::update with new App::logic and App::ui * deps: bump egui_material_icons to 0.6.0 * deps: bump egui_dnd to 0.15.0 * fix: use .codepoint for icons * refactor * refactor: replaced deprecated CentralPanel::show with CentralPanel::show_inside * refactor * change version to 1.6.3 * update rust toolchain in github actions * update freedesktop platform version to 25.08 for flaptak * update github actions for flatpak builds * add flatpak-builder installation inside actions * add flathub configuration to actions * add --user flag to flathub configuration * remove sudo from flatpak actions * Fix/dev flatpak actions 6082245116761610541 (#47) * remove sudo * remove steps --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
119 lines
3.1 KiB
YAML
119 lines
3.1 KiB
YAML
name: Build
|
|
|
|
permissions:
|
|
contents: write
|
|
packages: write
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
pull_request:
|
|
branches: [main, master]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
linux-build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Install apt deps (jq/zip + dev-libs)
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
zip jq \
|
|
libpipewire-0.3-dev \
|
|
libclang-dev \
|
|
libasound2-dev
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Rust toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: 1.94.1
|
|
|
|
- name: Extract all binary names
|
|
id: cargo-meta
|
|
run: |
|
|
set -euo pipefail
|
|
BIN_NAMES=$(cargo metadata --no-deps --format-version 1 \
|
|
| jq -r '.packages[0].targets[] | select(.kind[] | contains("bin")) | .name')
|
|
echo "bin_names<<EOF" >> $GITHUB_OUTPUT
|
|
echo "$BIN_NAMES" >> $GITHUB_OUTPUT
|
|
echo "EOF" >> $GITHUB_OUTPUT
|
|
|
|
- name: Build all release binaries
|
|
run: cargo build --release --locked
|
|
|
|
- name: Package all binaries into one archive
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
COMMIT_SHA="${{ github.sha }}"
|
|
ARCHIVE_NAME="pwsp-${COMMIT_SHA}-linux-x64.zip"
|
|
echo "Creating archive: $ARCHIVE_NAME"
|
|
|
|
FILES=()
|
|
while IFS= read -r BIN; do
|
|
[ -z "$BIN" ] && continue
|
|
FILES+=("target/release/$BIN")
|
|
done <<< "${{ steps.cargo-meta.outputs.bin_names }}"
|
|
|
|
if [ "${#FILES[@]}" -eq 0 ]; then
|
|
echo "Error: no binaries were discovered via cargo metadata." >&2
|
|
exit 1
|
|
fi
|
|
|
|
for f in "${FILES[@]}"; do
|
|
if [ ! -f "$f" ]; then
|
|
echo "Error: expected binary not found: $f" >&2
|
|
exit 1
|
|
fi
|
|
echo "Will add: $f"
|
|
done
|
|
|
|
zip -j "$ARCHIVE_NAME" "${FILES[@]}"
|
|
|
|
- name: Upload archive as artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: archive
|
|
path: pwsp-*.zip
|
|
retention-days: 7
|
|
|
|
- name: Install cargo-deb and create .deb
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
cargo install --locked cargo-deb
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
|
|
|
cargo-deb
|
|
|
|
- name: Upload .deb(s) as artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: deb-packages
|
|
path: target/debian/*.deb
|
|
retention-days: 7
|
|
|
|
flatpak-build:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: ghcr.io/flathub-infra/flatpak-github-actions:freedesktop-25.08
|
|
options: --privileged
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Build Flatpak
|
|
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
|
with:
|
|
bundle: ru.arabianq.pwsp.flatpak
|
|
manifest-path: packages/flatpak/ru.arabianq.pwsp.yaml
|
|
cache: true
|
|
branch: master
|
|
build-bundle: true |