Skip to content

Commit fc6490c

Browse files
committed
ci: add examples building and testing to all platforms
1 parent d8a16f5 commit fc6490c

File tree

3 files changed

+66
-21
lines changed

3 files changed

+66
-21
lines changed

.github/workflows/builds.yml

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ jobs:
4141
matrix:
4242
include:
4343
- os: ubuntu-latest
44-
preset: linux-release
44+
preset: linux-release-examples
4545
- os: macos-latest
46-
preset: macos-release
46+
preset: macos-release-examples
4747
- os: windows-latest
48-
preset: windows-release
48+
preset: windows-release-examples
4949
name: ${{ matrix.os }}
5050
runs-on: ${{ matrix.os }}
5151

@@ -84,7 +84,8 @@ jobs:
8484
libasound2-dev libpulse-dev \
8585
libssl-dev \
8686
libprotobuf-dev protobuf-compiler \
87-
libabsl-dev
87+
libabsl-dev \
88+
libwayland-dev libdecor-0-dev # For SDL3
8889
8990
- name: Install system deps (macOS)
9091
if: runner.os == 'macOS'
@@ -128,23 +129,29 @@ jobs:
128129
- name: Build
129130
run: cmake --build --preset ${{ matrix.preset }}
130131

131-
- name: Smoke test example (Unix)
132+
- name: Smoke test examples (Unix)
132133
if: runner.os != 'Windows'
133134
shell: bash
134135
run: |
135-
if [[ -x build/bin/SimpleRoom ]]; then
136-
build/bin/SimpleRoom --help || true
137-
elif [[ -x build/examples/SimpleRoom ]]; then
138-
build/examples/SimpleRoom --help || true
139-
fi
140-
141-
- name: Smoke test example (Windows)
136+
set -x
137+
# Find and test examples
138+
for exe in SimpleRoom SimpleRpc SimpleDataStream; do
139+
if [[ -x "build/bin/${exe}" ]]; then
140+
build/bin/${exe} --help || true
141+
fi
142+
done
143+
144+
- name: Smoke test examples (Windows)
142145
if: runner.os == 'Windows'
143146
shell: pwsh
144147
run: |
145-
$exePath = "build/bin/release/SimpleRoom.exe"
146-
if (Test-Path $exePath) {
147-
& $exePath --help
148+
$examples = @('SimpleRoom', 'SimpleRpc', 'SimpleDataStream')
149+
foreach ($exe in $examples) {
150+
$exePath = "build/bin/Release/${exe}.exe"
151+
if (Test-Path $exePath) {
152+
Write-Host "Testing ${exe}..."
153+
& $exePath --help
154+
}
148155
}
149156
150157
- name: Upload build artifacts
@@ -154,6 +161,7 @@ jobs:
154161
path: |
155162
build/lib/
156163
build/include/
164+
build/bin/
157165
retention-days: 7
158166

159167
- name: Clean after build (best-effort)

DEPENDENCIES.md

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,37 @@ The LiveKit SDK consists of two static libraries:
88
- `livekit.lib` (or `liblivekit.a` on Unix)
99
- `livekit_ffi.lib` (or `liblivekit_ffi.a` on Unix)
1010

11-
**IMPORTANT**:
12-
- **Windows**: All dependencies (protobuf, abseil) are included as DLLs in the distribution. You just need to copy them alongside your executable.
13-
- **Linux/macOS**: You must install protobuf and abseil via your system package manager (apt/brew). The SDK links dynamically against these libraries.
11+
## Distribution Model
12+
13+
The SDK uses different distribution strategies per platform:
14+
15+
### Windows (Complete Package)
16+
**Ready to use** - All dependencies included:
17+
- `livekit.lib` - Main SDK static library
18+
- `livekit_ffi.dll` + `livekit_ffi.dll.lib` - Rust FFI layer
19+
- `libprotobuf.dll` + `libprotobuf.lib` - Protocol Buffers runtime
20+
- `abseil_dll.dll` + `abseil_dll.lib` - Abseil C++ library
21+
22+
**User action**: Copy all DLLs alongside your executable. No additional installation required.
23+
24+
### Linux (Minimal Package)
25+
⚠️ **Requires system dependencies**:
26+
- `liblivekit.a` - Main SDK static library (included)
27+
- `liblivekit_ffi.a` - Rust FFI layer (included)
28+
- `libprotobuf` - Must install via `apt install libprotobuf-dev`
29+
- `libssl` - Must install via `apt install libssl-dev`
30+
- `libabsl` - Only if built with Protobuf 6.0+: `apt install libabsl-dev`
31+
32+
**User action**: Install required packages on target system before linking.
33+
34+
### macOS (Minimal Package)
35+
⚠️ **Requires system dependencies**:
36+
- `liblivekit.a` - Main SDK static library (included)
37+
- `liblivekit_ffi.a` - Rust FFI layer (included)
38+
- `protobuf` - Must install via `brew install protobuf`
39+
- `abseil` - Only if built with Protobuf 6.0+: `brew install abseil`
40+
41+
**User action**: Install required packages on target system before linking.
1442

1543
---
1644

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,18 @@ This SDK enables native C++ applications to connect to LiveKit servers for real-
1212
You must install Git LFS before cloning or pulling the repo if you want to run the examples.
1313

1414
**Platform-Specific Requirements:**
15-
- **Windows:** Visual Studio 2019+, vcpkg (dependencies bundled in distribution)
16-
- **Linux:** `sudo apt install libprotobuf-dev libabsl-dev libssl-dev`
17-
- **macOS:** `brew install protobuf abseil`
15+
16+
### For Building the SDK:
17+
- **Windows:** Visual Studio 2019+, vcpkg
18+
- **Linux:** `sudo apt install libprotobuf-dev libssl-dev` (protobuf 3.x)
19+
- **macOS:** `brew install protobuf` (protobuf 3.x)
20+
21+
### For Using the Pre-built SDK:
22+
- **Windows:** ✅ All dependencies included (DLLs bundled) - ready to use
23+
- **Linux:** ⚠️ Requires `libprotobuf` and `libssl-dev` installed on target system
24+
- **macOS:** ⚠️ Requires `protobuf` installed via Homebrew on target system
25+
26+
> **Note**: If the SDK was built with Protobuf 6.0+, you also need `libabsl-dev` (Linux) or `abseil` (macOS).
1827
1928
## 🧩 Clone the Repository
2029

0 commit comments

Comments
 (0)