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
2 changes: 1 addition & 1 deletion .github/actions/test-capture-variant/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ runs:
build-type: ${{ inputs.preset == 'debug' && 'Debug' || 'Release' }}
macos-arch: ${{ inputs.macos-arch }}
- name: Save verified variant Cargo cache
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' && steps.cache.outputs.cache-hit != 'true'
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && steps.cache.outputs.cache-hit != 'true'
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ${{ steps.variant.outputs.cargo-dir }}
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ jobs:
build-dir: ${{ env.BUILD_DIR }}

- name: Test installed standard SDK
if: github.ref == 'refs/heads/main'
uses: ./.github/actions/test-sdk-bundle
with:
bundle-dir: sdk-out/livekit-sdk-${{ matrix.name }}
Expand Down Expand Up @@ -211,14 +212,6 @@ jobs:
with:
build-dir: ${{ env.BUILD_DIR }}

- name: Test installed capture SDK
if: matrix.name != 'macos-x64'
uses: ./.github/actions/test-sdk-bundle
with:
bundle-dir: sdk-out/livekit-sdk-${{ matrix.name }}-capture
capture: 'all'
macos-arch: ${{ matrix.macos_arch || '' }}

- name: Upload capture SDK bundle
if: matrix.name != 'macos-x64'
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
Expand Down
32 changes: 31 additions & 1 deletion .github/workflows/make-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,19 @@ jobs:
name: ubuntu-22.04-arm64
- os: ubuntu-24.04
name: ubuntu-24.04-x64
selective_capture: true
- os: ubuntu-24.04-arm
name: ubuntu-24.04-arm64
- os: macos-26-xlarge
name: macos-arm64
selective_capture: true
- os: macos-26-large
name: macos-x64
macos_arch: x86_64
# Pinned to Windows 2022 for current VS 17 implementation
- os: windows-2022
name: windows-x64
selective_capture: true

name: Build (${{ matrix.name }})
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -106,6 +109,24 @@ jobs:

- name: Set up base SDK dependencies
uses: ./.github/actions/setup-sdk-deps
with:
linux-extra-packages: ${{ matrix.selective_capture && 'mesa-vulkan-drivers libvulkan1' || '' }}

- name: Configure software Vulkan for capture source checks
if: runner.os == 'Linux' && matrix.selective_capture
shell: bash
run: |
set -euo pipefail
icds=(/usr/share/vulkan/icd.d/lvp_icd*.json)
test -f "${icds[0]}"
runtime_dir="$RUNNER_TEMP/capture-runtime"
mkdir -p "$runtime_dir"
chmod 700 "$runtime_dir"
{
echo "VK_ICD_FILENAMES=${icds[0]}"
echo "WGPU_BACKEND=vulkan"
echo "XDG_RUNTIME_DIR=$runtime_dir"
} >> "$GITHUB_ENV"

# ---------- Rust toolchain ----------
- name: Install Rust (stable)
Expand Down Expand Up @@ -195,8 +216,16 @@ jobs:
macos-arch: ${{ matrix.macos_arch || '' }}
version: ${{ steps.version.outputs.version }}

- name: Test selective capture bundles
if: matrix.selective_capture
uses: ./.github/actions/test-capture-variants
with:
preset: release
combinations: 'true'
verify-pixel-sources: ${{ runner.os != 'Windows' }}

- name: Set up capture dependencies
if: matrix.name != 'macos-x64'
if: matrix.name != 'macos-x64' && !matrix.selective_capture
uses: ./.github/actions/setup-capture

- name: Rebuild with capture
Expand All @@ -221,6 +250,7 @@ jobs:
with:
bundle-dir: sdk-out/livekit-sdk-${{ matrix.name }}-capture-${{ steps.version.outputs.version }}
capture: 'all'
verify-pixel-sources: ${{ matrix.selective_capture && runner.os != 'Windows' }}
macos-arch: ${{ matrix.macos_arch || '' }}
version: ${{ steps.version.outputs.version }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ jobs:
stress_timeout_minutes: 120
artifact_retention_days: 14
run_coverage: false
extended_capture_sources: true
run_capture_bundle_tests: true
secrets: inherit
38 changes: 19 additions & 19 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ name: Tests
on:
workflow_call:
inputs:
extended_capture_sources:
description: Test pair combinations and selective bundles on macOS/Windows as well as Linux.
run_capture_bundle_tests:
description: Enable extended capture bundle coverage for nightly tests.
required: false
type: boolean
default: false
Expand Down Expand Up @@ -61,11 +61,6 @@ on:
default: true
workflow_dispatch:
inputs:
extended_capture_sources:
description: Test pair combinations and selective bundles on macOS/Windows as well as Linux.
required: false
type: boolean
default: false
build_type:
description: Debug or release test build.
required: false
Expand Down Expand Up @@ -162,7 +157,7 @@ jobs:
e2e-testing: true
- os: macos-26-xlarge
name: macos-arm64
extended_capture: true
selective_capture: true
e2e-testing: true
- os: macos-26-large
name: macos-x64
Expand All @@ -171,7 +166,7 @@ jobs:
# Pinned to Windows 2022 for current VS 17 implementation
- os: windows-2022
name: windows-x64
extended_capture: true
selective_capture: true
e2e-testing: true

name: Test (${{ matrix.name }})
Expand Down Expand Up @@ -224,7 +219,7 @@ jobs:
linux-extra-packages: libunwind-dev libjpeg-dev gdb jq ${{ matrix.selective_capture && 'mesa-vulkan-drivers libvulkan1' || '' }}

- name: Configure software Vulkan for capture source checks
if: matrix.selective_capture
if: runner.os == 'Linux' && matrix.selective_capture
shell: bash
run: |
set -euo pipefail
Expand Down Expand Up @@ -320,6 +315,7 @@ jobs:
macos-arch: ${{ matrix.macos_arch || '' }}

- name: Test installed standard SDK
if: github.ref == 'refs/heads/main'
uses: ./.github/actions/test-sdk-bundle
with:
bundle-dir: sdk-out/test-sdk-standard
Expand All @@ -328,16 +324,18 @@ jobs:
build-type: ${{ inputs.build_type == 'debug' && 'Debug' || 'Release' }}

- name: Test selective capture bundles
if: matrix.name != 'macos-x64' && (matrix.selective_capture || (inputs.extended_capture_sources && matrix.extended_capture))
id: capture_bundles
if: >-
github.event_name != 'pull_request' && matrix.selective_capture &&
(inputs.run_capture_bundle_tests || (github.ref == 'refs/heads/main' && runner.os == 'Linux'))
uses: ./.github/actions/test-capture-variants
with:
preset: ${{ inputs.build_type }}
combinations: ${{ inputs.extended_capture_sources }}
verify-pixel-sources: ${{ matrix.selective_capture || runner.os == 'macOS' }}
macos-arch: ${{ matrix.macos_arch || '' }}
combinations: ${{ inputs.run_capture_bundle_tests }}
verify-pixel-sources: ${{ runner.os != 'Windows' }}

- name: Set up capture dependencies
if: ${{ matrix.name != 'macos-x64' && !(matrix.selective_capture || (inputs.extended_capture_sources && matrix.extended_capture)) }}
if: matrix.name != 'macos-x64' && steps.capture_bundles.outcome == 'skipped'
uses: ./.github/actions/setup-capture

- name: Build SDK with tests
Expand All @@ -348,13 +346,15 @@ jobs:
bundle-dir: sdk-out/test-sdk-tests
macos-arch: ${{ matrix.macos_arch || '' }}

- name: Test installed SDK used by tests
- name: Test installed capture SDK
if: >-
github.event_name != 'pull_request' && matrix.name != 'macos-x64' &&
(github.ref == 'refs/heads/main' || inputs.run_capture_bundle_tests)
uses: ./.github/actions/test-sdk-bundle
with:
bundle-dir: sdk-out/test-sdk-tests
capture: ${{ matrix.name == 'macos-x64' && 'none' || 'all' }}
verify-pixel-sources: ${{ matrix.selective_capture || (inputs.extended_capture_sources && runner.os == 'macOS' && matrix.extended_capture) }}
macos-arch: ${{ matrix.macos_arch || '' }}
capture: 'all'
verify-pixel-sources: ${{ matrix.selective_capture && runner.os != 'Windows' }}
build-type: ${{ inputs.build_type == 'debug' && 'Debug' || 'Release' }}

# ---------- Run unit tests ----------
Expand Down
16 changes: 11 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,12 +420,18 @@ all filtered stages; normal pull requests and pushes use the path filters.
- `.github/workflows/ci.yml` — Top-level PR/push/manual aggregator and path
filter owner.
- `.github/workflows/builds.yml` — Reusable SDK and example-collection build

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wonder if these are all overkill with the idea being AI is good enough at just getting the context it needs from the files themselves. It feels like we are updating another form of docs vs guiding AI with larger architecture or non self evident things.

matrix. Each platform job builds, validates, and uploads the standard SDK,
then enables capture in the same CMake tree and produces a separate capture
bundle. Save the Cargo target cache only after both builds complete.
matrix. Each platform job builds and uploads the standard SDK, validating its
installed bundle only on `main`, then enables capture in the same CMake tree
and produces a separate capture bundle. Save the Cargo target cache only
after both builds complete.
- `.github/workflows/tests.yml` — Reusable unit/integration test matrix.
Each platform job first validates an installed standard SDK, then rebuilds
with capture enabled and runs the complete test suite once.
Each platform job builds a standard SDK (validating its installed bundle only
on `main`), then rebuilds with capture enabled and runs the complete test
suite once.
Capture bundle packaging runs on `main`, in nightly tests, and in releases.
Nightly tests and releases check singleton and pair variants on Ubuntu 24.04
x64, macOS arm64, and Windows x64. All three check all-sources bundles on
every capture-supported platform.
The build, test, and release jobs use the shared actions under
`.github/actions/`; keep platform-specific build and bundle checks there.
- `.github/workflows/cpp-tools.yml` — Reusable SDK-specific `clang-format` and
Expand Down
37 changes: 17 additions & 20 deletions docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,33 +147,30 @@ capture-enabled CI release jobs, the expectation is explicitly `ON`; a disabled
bundle cannot pass by rejecting source creation. On Windows, add the installed
SDK's `bin` directory and GStreamer's `bin` directory to `PATH` before running CTest.

### Selective capture in CI
### Capture packaging in CI

PR CI runs capture builds and runtime tests. Packaging checks for the standard
SDK run on `main` and in releases. On `main`, the test workflow checks
singleton capture bundles on Ubuntu 24.04 x64 and all-sources bundles on every
capture-supported platform.

Intel macOS CI runs the standard SDK tests only; capture builds and checks are
not supported on that platform.

The Ubuntu 24.04 x64 test job checks `none`, each singleton source, and `all`.
Singleton builds reuse the C++ build tree and do not compile the unit/integration
suites. Pattern and clock builds run before GStreamer installation. This runner
uses Mesa software Vulkan, and pixel-source creation must succeed. The full test
suite runs once after rebuilding with all sources.

The reusable `test-capture-variants` action uses `build-sdk` and
`test-sdk-bundle`. The latter accepts `expected-sources` and
`verify-pixel-sources`, so build, test, and release workflows share one installed
consumer test. Nightly runs enable `extended_capture_sources`, adding the three
two-source combinations on Linux and selective bundles on macOS arm64 and
Windows x64. Windows validates exact metadata and source availability, allowing
an explicit missing-adapter error for enabled pixel sources. Successful pixel
creation is required on Linux and macOS. Manual test-workflow runs can enable
the same coverage.
Nightly runs and releases also check singleton and pair combinations on
Ubuntu 24.04 x64, macOS arm64, and Windows x64 using `test-capture-variants`.
These builds reuse the C++ build tree without compiling the unit/integration
suites. Pattern and clock builds run before GStreamer installation. Linux uses
Mesa software Vulkan. Pixel-source creation must succeed on Linux and macOS;
Windows allows an explicit missing-adapter error for enabled pixel sources.
All-sources bundles are checked on every capture-supported platform. Releases
also verify the final bundle's version metadata before publication.

Cargo caches include the build configuration, build type, and source selection.
Each variant reports elapsed time and cache hits in the job summary.
Each selective variant has its own cache, saved after its installed-bundle check
passes on trusted main runs. The variant's temporary Cargo directory is then
removed to bound disk usage. Standard/all outputs use the existing shared cache,
saved after the full suite passes. Rust variants still compile separately on
passes on trusted main or version-tag runs. The variant's temporary Cargo
directory is then removed to bound disk usage. Standard/all outputs use the
existing shared cache, saved after successful builds. Rust variants still compile separately on
cold runs even though C++ dependencies are reused.

## Test coverage
Expand Down
Loading