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
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ env:

# Self-hosted jobs run on the netcup server's `audiobridge` runner, which already has the
# toolchains (Rust + targets, JDK 17, Android SDK/NDK r30, cargo-ndk 4.x, cargo-xwin + LLVM).
# The Linux desktop job also needs the PipeWire 1.x SDK (headers, pkg-config, libclang); on the
# runner it is unpacked without root under ~/opt/pipewire-sdk and enabled by its env.sh.
# Fork PRs are never executed there. CARGO_BUILD_JOBS=2 leaves half of its 4 cores free.
jobs:
rust:
Expand Down Expand Up @@ -56,6 +58,29 @@ jobs:
path: target/x86_64-pc-windows-msvc/release/AudioBridge.exe
if-no-files-found: error

linux:
name: Linux desktop (PipeWire)
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: [self-hosted, audiobridge]
env:
CARGO_BUILD_JOBS: 2
steps:
- uses: actions/checkout@v4
- name: Clippy
run: . "$HOME/opt/pipewire-sdk/env.sh" && cargo clippy -p audiobridge-desktop --all-targets -- -D warnings
- name: Tests
run: . "$HOME/opt/pipewire-sdk/env.sh" && cargo test -p audiobridge-desktop
- name: Build + package (tar.gz, pacman)
run: |
. "$HOME/opt/pipewire-sdk/env.sh"
cargo build -p audiobridge-desktop --release
scripts/package-linux.sh
- uses: actions/upload-artifact@v4
with:
name: AudioBridge-linux-x86_64
path: target/dist/*
if-no-files-found: error

android:
name: Android APK
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
Expand Down
43 changes: 34 additions & 9 deletions AGENTS.md

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ cargo test -p audiobridge-android

`cargo test -p audiobridge-core` also runs real-network integration tests. They are timing-sensitive, so run them on an idle machine.

On Linux, `audiobridge-desktop` builds the PipeWire version and needs the PipeWire development files (`pkg-config libpipewire-0.3`) and `clang`; on Windows (or with `cargo xwin … --target x86_64-pc-windows-msvc`) it builds the WASAPI version. Platform code must compile cleanly on both.

For Android changes: `cd android; .\gradlew.bat :app:testDebugUnitTest :app:lintDebug`.

## Ground rules

- **Real-time audio code** (`CaptureHandle::push`, `PlayoutHandle::fill`, the mixer and playout) must never allocate, lock or block. `tests/rt_alloc.rs` enforces this.
- The **wire format** (`crates/core/src/proto.rs`, `pairing.rs`) is shared by both apps. An incompatible change must bump the protocol or pairing version.
- **UI text** is Russian, code, comments and logs are English.
- Things that can't be unit-tested (WASAPI, AAudio, the UI, the Android service) need a short note in the PR on how you checked them on real hardware.
- Things that can't be unit-tested (WASAPI, PipeWire, AAudio, the UI, the Android service) need a short note in the PR on how you checked them on real hardware.

See [AGENTS.md](AGENTS.md) for the architecture and conventions.
Loading
Loading