From 3e539310ae19128bac088f61f13c3c36cfc4d829 Mon Sep 17 00:00:00 2001 From: Horuse <39675195+Horuse@users.noreply.github.com> Date: Tue, 18 Aug 2026 22:31:28 +0300 Subject: [PATCH 1/3] ci: check linux and windows in addition to macos Matrix the check job across macOS, Ubuntu 22.04 and Windows. Linux gets the PipeWire + GTK system deps the backend needs to compile; Windows gets the CMake 4.x policy override for audiopus_sys. Windows WASAPI code stays covered by the per-OS cfg gates on every PR instead of only at release. --- .github/workflows/ci.yml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6cacc1..b4e2c2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,15 @@ jobs: command: check licenses bans check: - runs-on: macos-latest + strategy: + fail-fast: false + matrix: + os: [macos-latest, ubuntu-22.04, windows-latest] + runs-on: ${{ matrix.os }} + env: + # windows-latest ships CMake 4.x, which rejects audiopus_sys's pre-3.5 + # policy version without this override (also set in src-tauri/.cargo/config.toml). + CMAKE_POLICY_VERSION_MINIMUM: '3.5' steps: - name: Checkout uses: actions/checkout@v4 @@ -47,6 +55,23 @@ jobs: - name: Install JS deps run: bun install --frozen-lockfile + # Each OS backend needs its native headers to compile. Linux installs + # PipeWire and the GTK stack explicitly; macOS and Windows runners ship + # their SDKs (CoreAudio / WASAPI + MSVC) preinstalled. + - name: Install Linux system deps + if: runner.os == 'Linux' + # PPA backports a libpipewire new enough for the libspa crate + run: | + sudo add-apt-repository -y ppa:pipewire-debian/pipewire-upstream + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + libwebkit2gtk-4.1-dev libjavascriptcoregtk-4.1-dev \ + libgtk-3-dev librsvg2-dev librsvg2-bin libgtk-3-bin \ + libayatana-appindicator3-dev libsoup-3.0-dev libssl-dev \ + libpipewire-0.3-dev clang libclang-dev \ + libasound2-dev libopus-dev libpulse-dev \ + desktop-file-utils xdg-utils patchelf + - name: Cargo test (also regenerates ts-rs bindings) working-directory: src-tauri run: cargo test From cdb20dadf7ca01c41f703a3b1ca8e220c1230037 Mon Sep 17 00:00:00 2001 From: Horuse <39675195+Horuse@users.noreply.github.com> Date: Tue, 18 Aug 2026 23:08:08 +0300 Subject: [PATCH 2/3] ci: start pipewire for linux hardware tests, compile-gate windows Linux smoke tests need a live PipeWire daemon and the runner has none, so the step boots one before cargo test. playback_pulls_samples hardcodes a real ALSA device and cannot pass without hardware, so it is skipped there. The Windows test binary cannot start because tauri embeds its Common-Controls v6 manifest into the app binary only, not test harnesses (tauri#13419), so Windows compiles with --no-run and tests run on macOS and Linux. --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b4e2c2e..7a15e43 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,11 +70,34 @@ jobs: libayatana-appindicator3-dev libsoup-3.0-dev libssl-dev \ libpipewire-0.3-dev clang libclang-dev \ libasound2-dev libopus-dev libpulse-dev \ - desktop-file-utils xdg-utils patchelf + desktop-file-utils xdg-utils patchelf pipewire + # Linux hardware smoke tests (device/app enumeration) need a live + # PipeWire daemon; the runner has none. playback_pulls_samples hardcodes + # a real ALSA device name and cannot pass without hardware, so it is + # skipped here. Windows: the test binary cannot start because tauri's + # manifest (Common-Controls v6) is embedded into the app binary only, + # not test harnesses (tauri-apps/tauri#13419, #14580) — a known + # workaround is to compile-gate Windows with --no-run and run tests on + # the other two OSes. - name: Cargo test (also regenerates ts-rs bindings) working-directory: src-tauri - run: cargo test + shell: bash + run: | + if [ "$RUNNER_OS" = "Linux" ]; then + export XDG_RUNTIME_DIR=/tmp/pipewire + mkdir -p "$XDG_RUNTIME_DIR" + chmod 700 "$XDG_RUNTIME_DIR" + pipewire & + sleep 2 + fi + if [ "$RUNNER_OS" = "Windows" ]; then + cargo test --no-run + elif [ "$RUNNER_OS" = "Linux" ]; then + cargo test -- --skip audio::playback::tests::playback_pulls_samples + else + cargo test + fi - name: TS-RS bindings up to date run: git diff --exit-code -- src/lib/modules/pipeline/generated From 4c67b3dbe66aca929f313fa4b09a1398b7fa0aa1 Mon Sep 17 00:00:00 2001 From: Horuse <39675195+Horuse@users.noreply.github.com> Date: Tue, 18 Aug 2026 23:36:18 +0300 Subject: [PATCH 3/3] fix(plugins): keep PluginFormat::Au in the type on every platform ts-rs emits the exported enum per platform, so cfg-gating the Au variant on macOS made the committed PluginFormat.ts ("clap" | "au" | "vst3") diverge from what Linux and Windows generate, failing the TS-RS bindings check. The format is data that the UI already expects everywhere; only the AU backend is macOS-only, so gate that instead and make the host dispatch panic for Au on non-macOS. --- src-tauri/src/audio/plugins/mod.rs | 1 - src-tauri/src/audio/plugins/registry.rs | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src-tauri/src/audio/plugins/mod.rs b/src-tauri/src/audio/plugins/mod.rs index 6e6a99e..1003132 100644 --- a/src-tauri/src/audio/plugins/mod.rs +++ b/src-tauri/src/audio/plugins/mod.rs @@ -42,7 +42,6 @@ pub use scan::scan_all; #[ts(export)] pub enum PluginFormat { Clap, - #[cfg(target_os = "macos")] Au, Vst3, } diff --git a/src-tauri/src/audio/plugins/registry.rs b/src-tauri/src/audio/plugins/registry.rs index 7178b1d..c8c64aa 100644 --- a/src-tauri/src/audio/plugins/registry.rs +++ b/src-tauri/src/audio/plugins/registry.rs @@ -23,6 +23,8 @@ fn host_for(format: PluginFormat) -> &'static dyn PluginHost { PluginFormat::Clap => &ClapHost, #[cfg(target_os = "macos")] PluginFormat::Au => &AuHost, + #[cfg(not(target_os = "macos"))] + PluginFormat::Au => panic!("Audio Unit plugins are only supported on macOS"), PluginFormat::Vst3 => &Vst3Host, } }