|
11 | 11 | required: true |
12 | 12 | type: string |
13 | 13 |
|
| 14 | +permissions: |
| 15 | + contents: read |
| 16 | + |
14 | 17 | env: |
15 | 18 | CARGO_TERM_COLOR: always |
16 | 19 | VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" |
|
47 | 50 | name: windows-x64 |
48 | 51 | generator: "Visual Studio 17 2022" |
49 | 52 |
|
| 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 | + |
50 | 83 | name: Build (${{ matrix.name }}) |
51 | 84 | runs-on: ${{ matrix.os }} |
52 | 85 |
|
@@ -140,14 +173,18 @@ jobs: |
140 | 173 | brew update |
141 | 174 | brew install cmake ninja protobuf abseil |
142 | 175 |
|
| 176 | + - name: Set up capture dependencies |
| 177 | + if: matrix.capture == true |
| 178 | + uses: ./.github/actions/setup-capture |
| 179 | + |
143 | 180 | # ---------- Rust toolchain ---------- |
144 | 181 | - name: Install Rust (stable) |
145 | 182 | uses: dtolnay/rust-toolchain@7e38f4b43b4db5c8dd498af069a4f6196df1d067 |
146 | 183 | with: |
147 | 184 | toolchain: stable |
148 | 185 |
|
149 | 186 | - name: Install Rust cross-compilation target |
150 | | - if: matrix.name == 'macos-x64' |
| 187 | + if: startsWith(matrix.name, 'macos-x64') |
151 | 188 | run: rustup target add x86_64-apple-darwin |
152 | 189 |
|
153 | 190 | # ---------- Cache Cargo ---------- |
@@ -217,10 +254,12 @@ jobs: |
217 | 254 | exit 1 |
218 | 255 | fi |
219 | 256 |
|
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 |
222 | 261 | else |
223 | | - ./build.sh release-examples --version "$version" --bundle --prefix "$bundleDir" |
| 262 | + ./build.sh release-examples "${capture_args[@]}" --version "$version" --bundle --prefix "$bundleDir" |
224 | 263 | fi |
225 | 264 |
|
226 | 265 | # List bundle contents |
@@ -257,7 +296,10 @@ jobs: |
257 | 296 | $bundleDir = "sdk-out/livekit-sdk-${{ matrix.name }}-$version" |
258 | 297 |
|
259 | 298 | 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 } |
261 | 303 |
|
262 | 304 | Write-Host "Bundle contents:" |
263 | 305 | Get-ChildItem -Recurse -File $bundleDir | Select-Object -First 200 | ForEach-Object { $_.FullName } |
@@ -338,6 +380,31 @@ jobs: |
338 | 380 | throw "Build info is missing livekit-ffi version" |
339 | 381 | } |
340 | 382 |
|
| 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 | +
|
341 | 408 | # ---------- Upload artifact (raw directory, no pre-compression) ---------- |
342 | 409 | - name: Upload build artifact |
343 | 410 | uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 |
@@ -412,23 +479,22 @@ jobs: |
412 | 479 | echo "Artifacts downloaded:" |
413 | 480 | ls -la |
414 | 481 | |
415 | | - # Create tar.gz for Ubuntu and macOS |
| 482 | + # Standard and capture-enabled Ubuntu and macOS bundles. |
416 | 483 | 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}" |
420 | 487 | tar -czf "${{ github.workspace }}/release-assets/${dirName}.tar.gz" "${dirName}" |
421 | 488 | echo "Created: ${dirName}.tar.gz" |
422 | | - fi |
| 489 | + done |
423 | 490 | done |
424 | 491 |
|
425 | | - # Create zip for Windows |
426 | | - dirName="livekit-sdk-windows-x64-${VERSION}" |
427 | | - if [[ -d "${dirName}" ]]; then |
428 | | - echo "Creating archive for windows-x64..." |
| 492 | + # Standard and capture-enabled Windows bundles. |
| 493 | + for suffix in "" "-capture"; do |
| 494 | + dirName="livekit-sdk-windows-x64${suffix}-${VERSION}" |
| 495 | + test -d "${dirName}" |
429 | 496 | zip -r "${{ github.workspace }}/release-assets/${dirName}.zip" "${dirName}" |
430 | | - echo "Created: ${dirName}.zip" |
431 | | - fi |
| 497 | + done |
432 | 498 |
|
433 | 499 | - name: List release assets |
434 | 500 | run: ls -la ${{ github.workspace }}/release-assets/ |
|
0 commit comments