1111 required : true
1212 type : string
1313
14+ permissions :
15+ contents : read
16+
1417env :
1518 CARGO_TERM_COLOR : always
1619 VCPKG_BINARY_SOURCES : " clear;x-gha,readwrite"
4750 name : windows-x64
4851 generator : " Visual Studio 17 2022"
4952
53+ - os : ubuntu-22.04
54+ name : ubuntu-22.04-x64-capture
55+ generator : Ninja
56+ capture : true
57+ - os : ubuntu-22.04-arm
58+ name : ubuntu-22.04-arm64-capture
59+ generator : Ninja
60+ capture : true
61+ - os : ubuntu-24.04
62+ name : ubuntu-24.04-x64-capture
63+ generator : Ninja
64+ capture : true
65+ - os : ubuntu-24.04-arm
66+ name : ubuntu-24.04-arm64-capture
67+ generator : Ninja
68+ capture : true
69+ - os : macos-26-xlarge
70+ name : macos-arm64-capture
71+ generator : Ninja
72+ capture : true
73+ - os : macos-26-large
74+ name : macos-x64-capture
75+ generator : Ninja
76+ # Pinned to Windows 2022 for current VS 17 implementation
77+ capture : true
78+ - os : windows-2022
79+ name : windows-x64-capture
80+ generator : " Visual Studio 17 2022"
81+ capture : true
82+
5083 name : Build (${{ matrix.name }})
5184 runs-on : ${{ matrix.os }}
5285
@@ -140,14 +173,18 @@ jobs:
140173 brew update
141174 brew install cmake ninja protobuf abseil
142175
176+ - name : Set up capture dependencies
177+ if : matrix.capture == true
178+ uses : ./.github/actions/setup-capture
179+
143180 # ---------- Rust toolchain ----------
144181 - name : Install Rust (stable)
145182 uses : dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772
146183 with :
147184 toolchain : stable
148185
149186 - name : Install Rust cross-compilation target
150- if : matrix.name == 'macos-x64'
187+ if : startsWith( matrix.name, 'macos-x64')
151188 run : rustup target add x86_64-apple-darwin
152189
153190 # ---------- Cache Cargo ----------
@@ -217,10 +254,12 @@ jobs:
217254 exit 1
218255 fi
219256
220- if [[ "${{ matrix.name }}" == "macos-x64" ]]; then
221- ./build.sh release-examples --version "$version" --bundle --prefix "$bundleDir" --macos-arch x86_64
257+ capture_args=()
258+ if [[ "${{ matrix.capture }}" == "true" ]]; then capture_args+=(--capture); fi
259+ if [[ "${{ matrix.name }}" == macos-x64* ]]; then
260+ ./build.sh release-examples "${capture_args[@]}" --version "$version" --bundle --prefix "$bundleDir" --macos-arch x86_64
222261 else
223- ./build.sh release-examples --version "$version" --bundle --prefix "$bundleDir"
262+ ./build.sh release-examples "${capture_args[@]}" --version "$version" --bundle --prefix "$bundleDir"
224263 fi
225264
226265 # List bundle contents
@@ -257,7 +296,10 @@ jobs:
257296 $bundleDir = "sdk-out/livekit-sdk-${{ matrix.name }}-$version"
258297
259298 if ([string]::IsNullOrWhiteSpace($version)) { throw "version is empty" }
260- .\build.cmd release-examples --version "$version" --bundle --prefix "$bundleDir"
299+ $captureArgs = @()
300+ if ("${{ matrix.capture }}" -eq "true") { $captureArgs += "--capture" }
301+ .\build.cmd release-examples @captureArgs --version "$version" --bundle --prefix "$bundleDir"
302+ if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
261303
262304 Write-Host "Bundle contents:"
263305 Get-ChildItem -Recurse -File $bundleDir | Select-Object -First 200 | ForEach-Object { $_.FullName }
@@ -338,6 +380,31 @@ jobs:
338380 throw "Build info is missing livekit-ffi version"
339381 }
340382
383+ - name : Smoke-test installed capture SDK (Unix)
384+ if : matrix.capture == true && runner.os != 'Windows'
385+ shell : bash
386+ run : |
387+ bundle="$GITHUB_WORKSPACE/sdk-out/livekit-sdk-${{ matrix.name }}-${{ steps.version.outputs.version }}"
388+ arch_args=()
389+ if [[ "${{ matrix.name }}" == macos-x64* ]]; then arch_args+=(-DCMAKE_OSX_ARCHITECTURES=x86_64); fi
390+ cmake -S scripts/capture-bundle-smoke -B capture-smoke -G Ninja \
391+ -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$bundle" "${arch_args[@]}"
392+ cmake --build capture-smoke
393+ ./capture-smoke/capture_bundle_smoke
394+
395+ - name : Smoke-test installed capture SDK (Windows)
396+ if : matrix.capture == true && runner.os == 'Windows'
397+ shell : pwsh
398+ run : |
399+ $bundle = Join-Path $env:GITHUB_WORKSPACE "sdk-out/livekit-sdk-${{ matrix.name }}-${{ steps.version.outputs.version }}"
400+ cmake -S scripts/capture-bundle-smoke -B capture-smoke -DCMAKE_PREFIX_PATH="$bundle"
401+ if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
402+ cmake --build capture-smoke --config Release
403+ if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
404+ $env:PATH = "$bundle\bin;$env:PATH"
405+ & .\capture-smoke\Release\capture_bundle_smoke.exe
406+ if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
407+
341408 # ---------- Upload artifact (raw directory, no pre-compression) ----------
342409 - name : Upload build artifact
343410 uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
@@ -412,14 +479,14 @@ jobs:
412479 echo "Artifacts downloaded:"
413480 ls -la
414481
415- # Create tar.gz for Ubuntu and macOS
482+ # Standard and capture-enabled Ubuntu and macOS bundles.
416483 for platform in ubuntu-22.04-x64 ubuntu-22.04-arm64 ubuntu-24.04-x64 ubuntu-24.04-arm64 macos-arm64 macos-x64; do
417- dirName="livekit-sdk-${platform}-${VERSION}"
418- if [[ -d "${dirName}" ]]; then
419- echo "Creating archive for ${platform}... "
484+ for suffix in "" "-capture"; do
485+ dirName="livekit-sdk-${platform}${suffix}-${VERSION}"
486+ test -d "${dirName} "
420487 tar -czf "${{ github.workspace }}/release-assets/${dirName}.tar.gz" "${dirName}"
421488 echo "Created: ${dirName}.tar.gz"
422- fi
489+ done
423490 done
424491
425492 # Deprecated compatibility aliases for existing Linux release consumers.
@@ -437,13 +504,12 @@ jobs:
437504 fi
438505 done
439506
440- # Create zip for Windows
441- dirName="livekit-sdk-windows-x64-${VERSION}"
442- if [[ -d "${dirName}" ]]; then
443- echo "Creating archive for windows-x64... "
507+ # Standard and capture-enabled Windows bundles.
508+ for suffix in "" "-capture"; do
509+ dirName="livekit-sdk-windows-x64${suffix}-${VERSION}"
510+ test -d "${dirName} "
444511 zip -r "${{ github.workspace }}/release-assets/${dirName}.zip" "${dirName}"
445- echo "Created: ${dirName}.zip"
446- fi
512+ done
447513
448514 - name : List release assets
449515 run : ls -la ${{ github.workspace }}/release-assets/
0 commit comments