Skip to content

Commit 5f15991

Browse files
client-sdk-cpp base first, then install gstreamer and build capture
1 parent 2ab4fb3 commit 5f15991

7 files changed

Lines changed: 121 additions & 166 deletions

File tree

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Copyright 2026 LiveKit, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Set up base SDK dependencies
16+
description: Install base SDK packages and the build compiler, without capture dependencies.
17+
inputs:
18+
vcpkg-commit:
19+
description: Pinned vcpkg revision for Windows builds.
20+
default: fb87e2bb3fe69e16c224989acb5a61349166c782
21+
linux-extra-packages:
22+
description: Optional space-separated Linux packages to install with the base dependencies.
23+
default: ''
24+
runs:
25+
using: composite
26+
steps:
27+
- name: Setup vcpkg (Windows only)
28+
if: runner.os == 'Windows'
29+
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
30+
with:
31+
vcpkgGitCommitId: ${{ inputs.vcpkg-commit }}
32+
33+
- name: Install base deps (Ubuntu)
34+
if: runner.os == 'Linux'
35+
shell: bash
36+
env:
37+
SDK_EXTRA_PACKAGES: ${{ inputs.linux-extra-packages }}
38+
run: |
39+
set -eux
40+
extra_packages=()
41+
if [[ -n "$SDK_EXTRA_PACKAGES" ]]; then
42+
read -r -a extra_packages <<< "$SDK_EXTRA_PACKAGES"
43+
fi
44+
sudo apt-get update
45+
sudo apt-get install -y \
46+
build-essential cmake ninja-build pkg-config \
47+
llvm-dev libclang-dev clang \
48+
libva-dev libdrm-dev libgbm-dev libx11-dev libgl1-mesa-dev \
49+
libxext-dev libxcomposite-dev libxdamage-dev libxfixes-dev \
50+
libxrandr-dev libxi-dev libxkbcommon-dev \
51+
libasound2-dev libpulse-dev \
52+
libssl-dev \
53+
libprotobuf-dev protobuf-compiler \
54+
libabsl-dev \
55+
libcurl4-openssl-dev \
56+
libwayland-dev libdecor-0-dev \
57+
"${extra_packages[@]}"
58+
59+
# libwebrtc ships hermetic libc++ headers that require a newer clang than
60+
# Ubuntu provides. The submodule script exports CC/CXX for later steps.
61+
- name: Install clang for libwebrtc
62+
if: runner.os == 'Linux'
63+
shell: bash
64+
run: client-sdk-rust/.github/scripts/install-clang.sh
65+
66+
- name: Install base deps (macOS)
67+
if: runner.os == 'macOS'
68+
shell: bash
69+
run: |
70+
set -eux
71+
brew update
72+
brew install cmake ninja protobuf abseil

‎.github/workflows/builds.yml‎

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -90,45 +90,10 @@ jobs:
9090
restore-keys: |
9191
${{ runner.os }}-${{ matrix.name }}-vcpkg-binary-${{ env.VCPKG_TARGET_TRIPLET }}-${{ env.VCPKG_GIT_COMMIT }}-
9292
93-
- name: Setup vcpkg (Windows only)
94-
if: runner.os == 'Windows'
95-
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
93+
- name: Set up base SDK dependencies
94+
uses: ./.github/actions/setup-sdk-deps
9695
with:
97-
vcpkgGitCommitId: ${{ env.VCPKG_GIT_COMMIT }}
98-
99-
# ---------- OS-specific deps ----------
100-
- name: Install deps (Ubuntu)
101-
if: runner.os == 'Linux'
102-
run: |
103-
set -eux
104-
sudo apt-get update
105-
sudo apt-get install -y \
106-
build-essential cmake ninja-build pkg-config \
107-
llvm-dev libclang-dev clang \
108-
libva-dev libdrm-dev libgbm-dev libx11-dev libgl1-mesa-dev \
109-
libxext-dev libxcomposite-dev libxdamage-dev libxfixes-dev \
110-
libxrandr-dev libxi-dev libxkbcommon-dev \
111-
libasound2-dev libpulse-dev \
112-
libssl-dev \
113-
libprotobuf-dev protobuf-compiler \
114-
libabsl-dev \
115-
libcurl4-openssl-dev \
116-
libwayland-dev libdecor-0-dev
117-
118-
# The libwebrtc artifact ships a hermetic libc++ built from LLVM trunk.
119-
# Distro clang (14 on Ubuntu 22.04, 18 on 24.04) cannot compile its
120-
# headers; the submodule script installs LLVM 21 and exports CC/CXX.
121-
- name: Install clang for libwebrtc
122-
if: runner.os == 'Linux'
123-
shell: bash
124-
run: client-sdk-rust/.github/scripts/install-clang.sh
125-
126-
- name: Install deps (macOS)
127-
if: runner.os == 'macOS'
128-
run: |
129-
set -eux
130-
brew update
131-
brew install cmake ninja protobuf abseil
96+
vcpkg-commit: ${{ env.VCPKG_GIT_COMMIT }}
13297

13398
# ---------- Rust toolchain ----------
13499
- name: Install Rust (stable)

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
- .github/workflows/ci.yml
5151
- .github/workflows/builds.yml
5252
- .github/workflows/make-release.yml
53+
- .github/actions/setup-sdk-deps/**
5354
- .github/actions/setup-capture/**
5455
- .github/actions/build-sdk/**
5556
- .github/actions/cargo-target-root/**
@@ -73,6 +74,7 @@ jobs:
7374
- .github/workflows/ci.yml
7475
- .github/workflows/tests.yml
7576
- .github/workflows/nightly.yml
77+
- .github/actions/setup-sdk-deps/**
7678
- .github/actions/setup-capture/**
7779
- .github/actions/build-sdk/**
7880
- .github/actions/cargo-target-root/**

‎.github/workflows/make-release.yml‎

Lines changed: 19 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -104,48 +104,8 @@ jobs:
104104
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
105105
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
106106
107-
- name: Setup vcpkg (Windows only)
108-
if: runner.os == 'Windows'
109-
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
110-
with:
111-
vcpkgGitCommitId: 'fb87e2bb3fe69e16c224989acb5a61349166c782'
112-
113-
# ---------- OS-specific deps ----------
114-
- name: Install deps (Ubuntu)
115-
if: runner.os == 'Linux'
116-
run: |
117-
set -eux
118-
sudo apt-get update
119-
sudo apt-get install -y \
120-
build-essential cmake ninja-build pkg-config \
121-
llvm-dev libclang-dev clang \
122-
libva-dev libdrm-dev libgbm-dev libx11-dev libgl1-mesa-dev \
123-
libxext-dev libxcomposite-dev libxdamage-dev libxfixes-dev \
124-
libxrandr-dev libxi-dev libxkbcommon-dev \
125-
libasound2-dev libpulse-dev \
126-
libssl-dev \
127-
libprotobuf-dev protobuf-compiler \
128-
libabsl-dev \
129-
libcurl4-openssl-dev \
130-
libwayland-dev libdecor-0-dev
131-
132-
# The libwebrtc artifact ships a hermetic libc++ built from LLVM trunk.
133-
# Distro clang cannot compile its headers; install the same LLVM version
134-
# used by the Linux build and test workflows.
135-
- name: Install clang for libwebrtc
136-
if: runner.os == 'Linux'
137-
shell: bash
138-
run: client-sdk-rust/.github/scripts/install-clang.sh
139-
140-
- name: Install deps (macOS)
141-
if: runner.os == 'macOS'
142-
run: |
143-
set -eux
144-
brew update
145-
brew install cmake ninja protobuf abseil
146-
147-
- name: Set up capture dependencies
148-
uses: ./.github/actions/setup-capture
107+
- name: Set up base SDK dependencies
108+
uses: ./.github/actions/setup-sdk-deps
149109

150110
# ---------- Rust toolchain ----------
151111
- name: Install Rust (stable)
@@ -218,15 +178,6 @@ jobs:
218178
version: ${{ steps.version.outputs.version }}
219179
macos-arch: ${{ matrix.macos_arch || '' }}
220180

221-
- name: Rebuild with capture
222-
uses: ./.github/actions/build-sdk
223-
with:
224-
preset: release-examples
225-
capture: 'ON'
226-
bundle-dir: sdk-out/livekit-sdk-${{ matrix.name }}-capture-${{ steps.version.outputs.version }}
227-
version: ${{ steps.version.outputs.version }}
228-
macos-arch: ${{ matrix.macos_arch || '' }}
229-
230181
# ---------- Verify exported ABI: no third-party symbol leaks ----------
231182
- name: Setup Python
232183
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
@@ -238,11 +189,6 @@ jobs:
238189
with:
239190
bundle-dir: sdk-out/livekit-sdk-${{ matrix.name }}-${{ steps.version.outputs.version }}
240191

241-
- name: Symbol leak check (capture SDK)
242-
uses: ./.github/actions/check-sdk-abi
243-
with:
244-
bundle-dir: sdk-out/livekit-sdk-${{ matrix.name }}-capture-${{ steps.version.outputs.version }}
245-
246192
- name: Test installed standard SDK
247193
uses: ./.github/actions/test-sdk-bundle
248194
with:
@@ -251,6 +197,23 @@ jobs:
251197
macos-arch: ${{ matrix.macos_arch || '' }}
252198
version: ${{ steps.version.outputs.version }}
253199

200+
- name: Set up capture dependencies
201+
uses: ./.github/actions/setup-capture
202+
203+
- name: Rebuild with capture
204+
uses: ./.github/actions/build-sdk
205+
with:
206+
preset: release-examples
207+
capture: 'ON'
208+
bundle-dir: sdk-out/livekit-sdk-${{ matrix.name }}-capture-${{ steps.version.outputs.version }}
209+
version: ${{ steps.version.outputs.version }}
210+
macos-arch: ${{ matrix.macos_arch || '' }}
211+
212+
- name: Symbol leak check (capture SDK)
213+
uses: ./.github/actions/check-sdk-abi
214+
with:
215+
bundle-dir: sdk-out/livekit-sdk-${{ matrix.name }}-capture-${{ steps.version.outputs.version }}
216+
254217
- name: Test installed capture SDK
255218
uses: ./.github/actions/test-sdk-bundle
256219
with:

‎.github/workflows/tests.yml‎

Lines changed: 12 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -204,47 +204,11 @@ jobs:
204204
restore-keys: |
205205
${{ runner.os }}-${{ matrix.name }}-vcpkg-binary-${{ env.VCPKG_TARGET_TRIPLET }}-${{ env.VCPKG_GIT_COMMIT }}-
206206
207-
- name: Setup vcpkg (Windows only)
208-
if: runner.os == 'Windows'
209-
uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5
207+
- name: Set up base SDK dependencies
208+
uses: ./.github/actions/setup-sdk-deps
210209
with:
211-
vcpkgGitCommitId: ${{ env.VCPKG_GIT_COMMIT }}
212-
213-
# ---------- OS-specific deps ----------
214-
- name: Install deps (Ubuntu)
215-
if: runner.os == 'Linux'
216-
run: |
217-
set -eux
218-
sudo apt-get update
219-
sudo apt-get install -y \
220-
build-essential cmake ninja-build pkg-config \
221-
llvm-dev libclang-dev clang \
222-
libva-dev libdrm-dev libgbm-dev libx11-dev libgl1-mesa-dev \
223-
libxext-dev libxcomposite-dev libxdamage-dev libxfixes-dev \
224-
libxrandr-dev libxi-dev libxkbcommon-dev \
225-
libasound2-dev libpulse-dev \
226-
libssl-dev \
227-
libprotobuf-dev protobuf-compiler \
228-
libabsl-dev \
229-
libcurl4-openssl-dev \
230-
libwayland-dev libdecor-0-dev \
231-
libunwind-dev libjpeg-dev \
232-
gdb jq
233-
234-
# The libwebrtc artifact ships a hermetic libc++ built from LLVM trunk.
235-
# Distro clang (14 on Ubuntu 22.04, 18 on 24.04) cannot compile its
236-
# headers; the submodule script installs LLVM 21 and exports CC/CXX.
237-
- name: Install clang for libwebrtc
238-
if: runner.os == 'Linux'
239-
shell: bash
240-
run: client-sdk-rust/.github/scripts/install-clang.sh
241-
242-
- name: Install deps (macOS)
243-
if: runner.os == 'macOS'
244-
run: |
245-
set -eux
246-
brew update
247-
brew install cmake ninja protobuf abseil
210+
vcpkg-commit: ${{ env.VCPKG_GIT_COMMIT }}
211+
linux-extra-packages: libunwind-dev libjpeg-dev gdb jq
248212

249213
# ---------- Rust toolchain ----------
250214
- name: Install Rust (stable)
@@ -515,35 +479,18 @@ jobs:
515479
docker-images: true
516480
swap-storage: false
517481

518-
# ---------- OS deps ----------
519-
- name: Install deps
520-
run: |
521-
set -eux
522-
sudo apt-get update
523-
sudo apt-get install -y \
524-
build-essential cmake ninja-build pkg-config \
525-
llvm-dev libclang-dev clang \
526-
libva-dev libdrm-dev libgbm-dev libx11-dev libgl1-mesa-dev \
527-
libxext-dev libxcomposite-dev libxdamage-dev libxfixes-dev \
528-
libxrandr-dev libxi-dev libxkbcommon-dev \
529-
libasound2-dev libpulse-dev \
530-
libssl-dev \
531-
libprotobuf-dev protobuf-compiler \
532-
libabsl-dev \
533-
libcurl4-openssl-dev \
534-
libwayland-dev libdecor-0-dev \
535-
libunwind-dev libjpeg-dev
536-
pip install --break-system-packages gcovr
482+
- name: Set up base SDK dependencies
483+
uses: ./.github/actions/setup-sdk-deps
484+
with:
485+
linux-extra-packages: libunwind-dev libjpeg-dev
537486

487+
- name: Install coverage tools
488+
run: pip install --break-system-packages gcovr
489+
490+
# Coverage only needs the instrumented capture variant.
538491
- name: Set up capture dependencies
539492
uses: ./.github/actions/setup-capture
540493

541-
# The coverage build compiles the Rust FFI too, so it needs the same
542-
# compiler floor as the normal Linux build/test matrices.
543-
- name: Install clang for libwebrtc
544-
shell: bash
545-
run: client-sdk-rust/.github/scripts/install-clang.sh
546-
547494
# ---------- Rust toolchain ----------
548495
- name: Install Rust (stable)
549496
uses: dtolnay/rust-toolchain@7e38f4b43b4db5c8dd498af069a4f6196df1d067

‎AGENTS.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Be sure to update the directory layout in this file if the directory layout chan
9595
| `docs/` | Documentation root. `docs/` holds hand-written long-form Markdown intended to also read well on GitHub. |
9696
| `docs/doxygen/` | Doxygen tool config, theme assets, and Doxygen-only content (`Doxyfile`, `index.md` mainpage, `customization/*.css`, `customization/header.html`, `customization/favicon.ico`). Files here use Doxygen-only syntax (`@ref`, `@brief`, …) and are not intended for human reading on their own. |
9797
| `src/tests/packaging/` | Standalone CTest integration tests consuming installed SDK bundles |
98-
| `.github/actions/` | Shared CI actions for SDK builds, Cargo paths, capture dependencies, example smoke checks, packaging tests, and exported ABI checks |
98+
| `.github/actions/` | Shared CI actions for base and capture dependencies, SDK builds, Cargo paths, example smoke checks, packaging tests, and exported ABI checks |
9999
| `.github/workflows/` | GitHub Actions CI workflows |
100100

101101
### Key Types
@@ -405,6 +405,7 @@ When adding new client facing functionality, add benchmarking to understand the
405405
expensive stages. Manual `workflow_dispatch` runs intentionally opt back into
406406
all filtered stages; normal pull requests and pushes use the path filters.
407407

408+
408409
- `.github/workflows/ci.yml` — Top-level PR/push/manual aggregator and path
409410
filter owner.
410411
- `.github/workflows/builds.yml` — Reusable SDK and example-collection build

‎docs/building.md‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -398,18 +398,23 @@ the installation's `bin` directory on `PATH` and `lib/pkgconfig` directory on
398398
Capture bundles require GStreamer at runtime, including when using pattern or
399399
clock sources. The SDK does not redistribute GStreamer libraries or plugins.
400400

401-
CI builds both variants in one job per platform. It first builds and bundles
402-
the standard SDK, then runs the build script with `--capture` in the same CMake
403-
build directory. Unchanged C++ dependencies and generated protobuf outputs are
404-
reused. Both bundles have separate install directories and artifact names, and
405-
both are checked through the installed-SDK packaging tests. Release jobs also
406-
check version metadata and exported symbols in both bundles.
401+
CI and release jobs build both variants in one job per platform. The shared
402+
`setup-sdk-deps` action installs base dependencies first. Each job builds and
403+
validates the standard SDK before the `setup-capture` action installs GStreamer.
404+
It then runs the build script with `--capture` in the same CMake build directory.
405+
Unchanged C++ dependencies and generated protobuf outputs are reused. Both
406+
bundles have separate install directories and artifact names, and both are
407+
checked through the installed-SDK packaging tests. Release jobs also check
408+
version metadata and exported symbols in both bundles.
407409

408410
Test jobs validate the standard installed SDK first, then enable capture and
409411
run the full unit, integration, and optional stress suites once. Rust outputs
410412
remain separate for each feature configuration; the shared Cargo cache stores
411413
both configurations.
412414

415+
Coverage shares the dependency setup actions and builds only the instrumented
416+
capture variant.
417+
413418
Rust artifacts are stored under `client-sdk-rust/target/cpp-<feature-hash>/`,
414419
with separate directories for capture-enabled and disabled builds. Generated
415420
`build.h` files live in each CMake build directory, so feature metadata follows

0 commit comments

Comments
 (0)