clang-tidy environmental consistency #500
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Builds | |
| on: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - src/** | |
| - include/** | |
| - cpp-example-collection/** | |
| - bridge/** | |
| - client-sdk-rust/** | |
| - CMakeLists.txt | |
| - build.sh | |
| - build.cmd | |
| - vcpkg.json | |
| - CMakePresets.json | |
| - docker/Dockerfile.base | |
| - docker/Dockerfile.sdk | |
| - .github/workflows/** | |
| pull_request: | |
| branches: ["main"] | |
| paths: | |
| - src/** | |
| - include/** | |
| - cpp-example-collection/** | |
| - bridge/** | |
| - client-sdk-rust/** | |
| - CMakeLists.txt | |
| - build.sh | |
| - build.cmd | |
| - vcpkg.json | |
| - CMakePresets.json | |
| - docker/Dockerfile.base | |
| - docker/Dockerfile.sdk | |
| - .github/workflows/** | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| actions: read | |
| packages: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| # Pinned commit for cpp-example-collection smoke build (https://github.com/livekit-examples/cpp-example-collection) | |
| CPP_EXAMPLE_COLLECTION_REF: f231c0c75028d1dcf13edcecd369d030d2c7c8d4 | |
| # vcpkg binary caching for Windows | |
| VCPKG_DEFAULT_TRIPLET: x64-windows-static-md | |
| VCPKG_DEFAULT_HOST_TRIPLET: x64-windows-static-md | |
| VCPKG_TARGET_TRIPLET: x64-windows-static-md | |
| jobs: | |
| license-check: | |
| name: License Check | |
| uses: ./.github/workflows/license_check.yml | |
| pin-check: | |
| name: Pin Check | |
| uses: ./.github/workflows/pin_check.yml | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| name: linux-x64 | |
| build_cmd: ./build.sh release-all | |
| build_dir: build-release | |
| - os: ubuntu-24.04-arm | |
| name: linux-arm64 | |
| build_cmd: ./build.sh release-all | |
| build_dir: build-release | |
| - os: macos-latest | |
| name: macos-arm64 | |
| build_cmd: ./build.sh release-all | |
| build_dir: build-release | |
| - os: macos-latest | |
| name: macos-x64 | |
| build_cmd: ./build.sh release-all --macos-arch x86_64 | |
| build_dir: build-release | |
| - os: windows-latest | |
| name: windows-x64 | |
| build_cmd: .\build.cmd release-all | |
| build_dir: build-release | |
| name: Build (${{ matrix.name }}) | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout (with submodules) | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 1 | |
| - name: Pull LFS files | |
| run: git lfs pull | |
| # ---------- vcpkg caching for Windows ---------- | |
| - name: Export GitHub Actions cache environment variables | |
| if: runner.os == 'Windows' | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 | |
| with: | |
| script: | | |
| core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | |
| core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | |
| - name: Setup vcpkg (Windows only) | |
| if: runner.os == 'Windows' | |
| uses: lukka/run-vcpkg@6fe69898af670ac05f4a8427cc5cff4fb361cee5 # v11.5 | |
| with: | |
| vcpkgGitCommitId: 'fb87e2bb3fe69e16c224989acb5a61349166c782' | |
| # ---------- OS-specific deps ---------- | |
| - name: Install deps (Ubuntu) | |
| if: runner.os == 'Linux' | |
| run: | | |
| set -eux | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential cmake ninja-build pkg-config \ | |
| llvm-dev libclang-dev clang \ | |
| libva-dev libdrm-dev libgbm-dev libx11-dev libgl1-mesa-dev \ | |
| libxext-dev libxcomposite-dev libxdamage-dev libxfixes-dev \ | |
| libxrandr-dev libxi-dev libxkbcommon-dev \ | |
| libasound2-dev libpulse-dev \ | |
| libssl-dev \ | |
| libprotobuf-dev protobuf-compiler \ | |
| libabsl-dev \ | |
| libwayland-dev libdecor-0-dev \ | |
| libspdlog-dev | |
| - name: Install deps (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| set -eux | |
| brew update | |
| brew install cmake ninja protobuf abseil spdlog | |
| # ---------- Rust toolchain ---------- | |
| - name: Install Rust (stable) | |
| uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 | |
| with: | |
| toolchain: stable | |
| - name: Install Rust cross-compilation target | |
| if: matrix.name == 'macos-x64' | |
| run: rustup target add x86_64-apple-darwin | |
| # ---------- Cache Cargo ---------- | |
| - name: Cache Cargo registry | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| key: ${{ runner.os }}-${{ matrix.name }}-cargo-reg-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-${{ matrix.name }}-cargo-reg- | |
| - name: Cache Cargo target | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| with: | |
| path: client-sdk-rust/target | |
| key: ${{ runner.os }}-${{ matrix.name }}-cargo-target-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ matrix.name }}-cargo-target- | |
| # ---------- Build environment setup ---------- | |
| - name: Set Linux build environment | |
| if: runner.os == 'Linux' | |
| run: | | |
| echo "CXXFLAGS=-Wno-deprecated-declarations" >> $GITHUB_ENV | |
| echo "CFLAGS=-Wno-deprecated-declarations" >> $GITHUB_ENV | |
| LLVM_VERSION=$(llvm-config --version | cut -d. -f1) | |
| echo "LIBCLANG_PATH=/usr/lib/llvm-${LLVM_VERSION}/lib" >> $GITHUB_ENV | |
| # ---------- Build ---------- | |
| - name: Build (Unix) | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: | | |
| chmod +x build.sh | |
| ${{ matrix.build_cmd }} | |
| - name: Build (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: ${{ matrix.build_cmd }} | |
| # ---------- Smoke test cpp-example-collection binaries ---------- | |
| # Built under cpp-example-collection-build/ (not build-dir/bin). Visual Studio | |
| # multi-config places executables in per-target Release/ (or Debug/) subdirs. | |
| - name: Smoke test examples (Unix) | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: | | |
| set -x | |
| failed=false | |
| examples_base="${{ matrix.build_dir }}/cpp-example-collection-build" | |
| resolve_exe() { | |
| local dir="$1" name="$2" | |
| local p="${examples_base}/${dir}/${name}" | |
| if [[ -x "${p}" ]]; then | |
| printf '%s' "${p}" | |
| return 0 | |
| fi | |
| p="${examples_base}/${dir}/Release/${name}" | |
| if [[ -x "${p}" ]]; then | |
| printf '%s' "${p}" | |
| return 0 | |
| fi | |
| return 1 | |
| } | |
| for pair in "SimpleRoom:simple_room" "SimpleRpc:simple_rpc" "SimpleDataStream:simple_data_stream"; do | |
| exe="${pair%%:*}" | |
| dir="${pair#*:}" | |
| if ! exe_path="$(resolve_exe "${dir}" "${exe}")"; then | |
| echo "ERROR: ${exe} not found under ${examples_base}/${dir}/" | |
| failed=true | |
| continue | |
| fi | |
| echo "Testing ${exe}..." | |
| output=$("${exe_path}" --help 2>&1) || true | |
| if [[ -z "${output}" ]]; then | |
| echo "ERROR: ${exe} produced no output" | |
| failed=true | |
| else | |
| echo "${output}" | |
| echo "${exe} ran successfully" | |
| fi | |
| done | |
| if [[ "$failed" == "true" ]]; then exit 1; fi | |
| - name: Smoke test examples (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| $ErrorActionPreference = 'Continue' | |
| $examplesBase = "${{ matrix.build_dir }}/cpp-example-collection-build" | |
| $examples = @( | |
| @{ Name = 'SimpleRoom'; Dir = 'simple_room' }, | |
| @{ Name = 'SimpleRpc'; Dir = 'simple_rpc' }, | |
| @{ Name = 'SimpleDataStream'; Dir = 'simple_data_stream' } | |
| ) | |
| $failed = $false | |
| foreach ($ex in $examples) { | |
| $name = $ex.Name | |
| $dir = $ex.Dir | |
| $inDir = Join-Path $examplesBase $dir | |
| $candidates = @( | |
| (Join-Path $inDir "$name.exe"), | |
| (Join-Path (Join-Path $inDir 'Release') "$name.exe") | |
| ) | |
| $exePath = $null | |
| foreach ($p in $candidates) { | |
| if (Test-Path -LiteralPath $p) { | |
| $exePath = $p | |
| break | |
| } | |
| } | |
| if ($null -ne $exePath) { | |
| Write-Host "Testing ${name}..." | |
| $pinfo = New-Object System.Diagnostics.ProcessStartInfo | |
| $pinfo.FileName = $exePath | |
| $pinfo.Arguments = "--help" | |
| $pinfo.RedirectStandardOutput = $true | |
| $pinfo.RedirectStandardError = $true | |
| $pinfo.UseShellExecute = $false | |
| $p = New-Object System.Diagnostics.Process | |
| $p.StartInfo = $pinfo | |
| $p.Start() | Out-Null | |
| $stdout = $p.StandardOutput.ReadToEnd() | |
| $stderr = $p.StandardError.ReadToEnd() | |
| $p.WaitForExit() | |
| $output = $stdout + $stderr | |
| if ([string]::IsNullOrWhiteSpace($output)) { | |
| Write-Host "ERROR: ${name} produced no output" | |
| $failed = $true | |
| } else { | |
| Write-Host $output | |
| Write-Host "${name} ran successfully" | |
| } | |
| } else { | |
| Write-Host "ERROR: ${name} not found under ${examplesBase}/${dir}/" | |
| $failed = $true | |
| } | |
| } | |
| if ($failed) { exit 1 } else { exit 0 } | |
| # ---------- Run unit tests ---------- | |
| - name: Run unit tests (Unix) | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: | | |
| ${{ matrix.build_dir }}/bin/livekit_unit_tests \ | |
| --gtest_output=xml:${{ matrix.build_dir }}/unit-test-results.xml | |
| - name: Run unit tests (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| & "${{ matrix.build_dir }}/bin/livekit_unit_tests.exe" ` | |
| --gtest_output=xml:${{ matrix.build_dir }}/unit-test-results.xml | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: test-results-${{ matrix.name }} | |
| path: ${{ matrix.build_dir }}/unit-test-results.xml | |
| retention-days: 7 | |
| # ---------- Upload artifacts ---------- | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: livekit-sdk-${{ matrix.name }} | |
| path: | | |
| ${{ matrix.build_dir }}/lib/ | |
| ${{ matrix.build_dir }}/include/ | |
| ${{ matrix.build_dir }}/bin/ | |
| retention-days: 7 | |
| # ---------- Cleanup ---------- | |
| - name: Clean after build (best-effort) | |
| if: always() | |
| shell: bash | |
| run: | | |
| if [[ "$RUNNER_OS" == "Windows" ]]; then | |
| rm -rf build-release build-debug || true | |
| else | |
| ./build.sh clean-all || true | |
| fi | |
| docker-build-x64: | |
| name: Build (docker-linux-x64) | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - name: Checkout (with submodules) | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Check if Dockerfile.base changed | |
| id: base_changed | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| if git diff --name-only "origin/${{ github.base_ref }}...HEAD" | grep -q '^docker/Dockerfile\.base$'; then | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "changed=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Free disk space | |
| uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 | |
| with: | |
| tool-cache: false | |
| android: true | |
| dotnet: true | |
| haskell: true | |
| large-packages: true | |
| docker-images: true | |
| swap-storage: true | |
| - name: Pull base image from GHCR | |
| if: steps.base_changed.outputs.changed == 'false' | |
| shell: bash | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| set -euxo pipefail | |
| owner="$(echo "${GITHUB_REPOSITORY_OWNER}" | tr '[:upper:]' '[:lower:]')" | |
| echo "${GITHUB_TOKEN}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin | |
| docker pull "ghcr.io/${owner}/client-sdk-cpp-base:base-main-amd64" | |
| docker tag "ghcr.io/${owner}/client-sdk-cpp-base:base-main-amd64" \ | |
| "livekit-cpp-sdk-base-x64:${{ github.sha }}" | |
| - name: Build base Docker image | |
| if: steps.base_changed.outputs.changed == 'true' | |
| run: | | |
| docker build \ | |
| --build-arg TARGETARCH=amd64 \ | |
| -t livekit-cpp-sdk-base-x64:${{ github.sha }} \ | |
| -f docker/Dockerfile.base \ | |
| docker | |
| - name: Build SDK Docker image | |
| run: | | |
| docker build \ | |
| --build-arg BASE_IMAGE=livekit-cpp-sdk-base-x64:${{ github.sha }} \ | |
| -t livekit-cpp-sdk-x64:${{ github.sha }} \ | |
| . \ | |
| -f docker/Dockerfile.sdk | |
| - name: Verify installed SDK inside image | |
| run: | | |
| docker run --rm livekit-cpp-sdk-x64:${{ github.sha }} bash -c \ | |
| 'test -f /opt/livekit-sdk/lib/cmake/LiveKit/LiveKitConfig.cmake' | |
| - name: Save Docker image artifact | |
| run: | | |
| docker save livekit-cpp-sdk-x64:${{ github.sha }} | gzip > livekit-cpp-sdk-x64-docker.tar.gz | |
| - name: Upload Docker image artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: livekit-cpp-sdk-docker-x64 | |
| path: livekit-cpp-sdk-x64-docker.tar.gz | |
| retention-days: 7 | |
| docker-build-linux-arm64: | |
| name: Build (docker-linux-arm64) | |
| runs-on: ubuntu-24.04-arm | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - name: Checkout (with submodules) | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Check if Dockerfile.base changed | |
| id: base_changed | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| if git diff --name-only "origin/${{ github.base_ref }}...HEAD" | grep -q '^docker/Dockerfile\.base$'; then | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "changed=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Free disk space | |
| uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 | |
| with: | |
| tool-cache: false | |
| android: true | |
| dotnet: true | |
| haskell: true | |
| large-packages: true | |
| docker-images: true | |
| swap-storage: true | |
| - name: Pull base image from GHCR | |
| if: steps.base_changed.outputs.changed == 'false' | |
| shell: bash | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| set -euxo pipefail | |
| owner="$(echo "${GITHUB_REPOSITORY_OWNER}" | tr '[:upper:]' '[:lower:]')" | |
| echo "${GITHUB_TOKEN}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin | |
| docker pull "ghcr.io/${owner}/client-sdk-cpp-base:base-main-arm64" | |
| docker tag "ghcr.io/${owner}/client-sdk-cpp-base:base-main-arm64" \ | |
| "livekit-cpp-sdk-base-arm64:${{ github.sha }}" | |
| - name: Build base Docker image | |
| if: steps.base_changed.outputs.changed == 'true' | |
| run: | | |
| docker build \ | |
| --build-arg TARGETARCH=arm64 \ | |
| -t livekit-cpp-sdk-base-arm64:${{ github.sha }} \ | |
| -f docker/Dockerfile.base \ | |
| docker | |
| - name: Build SDK Docker image | |
| run: | | |
| docker build \ | |
| --build-arg BASE_IMAGE=livekit-cpp-sdk-base-arm64:${{ github.sha }} \ | |
| -t livekit-cpp-sdk:${{ github.sha }} \ | |
| . \ | |
| -f docker/Dockerfile.sdk | |
| - name: Verify installed SDK inside image | |
| run: | | |
| docker run --rm livekit-cpp-sdk:${{ github.sha }} bash -c \ | |
| 'test -f /opt/livekit-sdk/lib/cmake/LiveKit/LiveKitConfig.cmake' | |
| - name: Save Docker image artifact | |
| run: | | |
| docker save livekit-cpp-sdk:${{ github.sha }} | gzip > livekit-cpp-sdk-arm64-docker.tar.gz | |
| - name: Upload Docker image artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: livekit-cpp-sdk-docker-arm64 | |
| path: livekit-cpp-sdk-arm64-docker.tar.gz | |
| retention-days: 7 | |
| build-collections-linux-arm64: | |
| name: Build (cpp-example-collection-linux-arm64) | |
| runs-on: ubuntu-24.04-arm | |
| needs: docker-build-linux-arm64 | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - name: Download Docker image artifact | |
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 | |
| with: | |
| name: livekit-cpp-sdk-docker-arm64 | |
| - name: Load Docker image | |
| run: gzip -dc livekit-cpp-sdk-arm64-docker.tar.gz | docker load | |
| - name: Build cpp-example-collection against installed SDK | |
| run: | | |
| docker run -e CPP_EX_REF="${{ env.CPP_EXAMPLE_COLLECTION_REF }}" --rm livekit-cpp-sdk:${{ github.sha }} bash -lc ' | |
| set -euxo pipefail | |
| git clone https://github.com/livekit-examples/cpp-example-collection.git /tmp/cpp-example-collection | |
| cd /tmp/cpp-example-collection | |
| git fetch --depth 1 origin "$CPP_EX_REF" | |
| git checkout "$CPP_EX_REF" | |
| cmake -S . -B build -DLIVEKIT_LOCAL_SDK_DIR=/opt/livekit-sdk | |
| cmake --build build --parallel | |
| ' | |
| build-collections-x64: | |
| name: Build (cpp-example-collection-x64) | |
| runs-on: ubuntu-latest | |
| needs: docker-build-x64 | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - name: Download Docker image artifact | |
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 | |
| with: | |
| name: livekit-cpp-sdk-docker-x64 | |
| - name: Load Docker image | |
| run: gzip -dc livekit-cpp-sdk-x64-docker.tar.gz | docker load | |
| - name: Build cpp-example-collection against installed SDK | |
| run: | | |
| docker run -e CPP_EX_REF="${{ env.CPP_EXAMPLE_COLLECTION_REF }}" --rm livekit-cpp-sdk-x64:${{ github.sha }} bash -lc ' | |
| set -euxo pipefail | |
| git clone https://github.com/livekit-examples/cpp-example-collection.git /tmp/cpp-example-collection | |
| cd /tmp/cpp-example-collection | |
| git fetch --depth 1 origin "$CPP_EX_REF" | |
| git checkout "$CPP_EX_REF" | |
| cmake -S . -B build -DLIVEKIT_LOCAL_SDK_DIR=/opt/livekit-sdk | |
| cmake --build build --parallel | |
| ' | |
| clang-tidy: | |
| name: clang-tidy | |
| runs-on: ubuntu-latest | |
| continue-on-error: false | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout (with submodules) | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 1 | |
| - name: Install dependencies | |
| run: | | |
| set -eux | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential cmake ninja-build pkg-config \ | |
| llvm-dev libclang-dev clang \ | |
| libssl-dev wget ca-certificates gnupg | |
| - name: Install clang-tidy 19 (for ExcludeHeaderFilterRegex support) | |
| run: | | |
| set -eux | |
| # Ubuntu 24.04 apt ships clang-tidy 18, which doesn't understand | |
| # ExcludeHeaderFilterRegex (added in 19). Pull clang-tidy 19 from | |
| # the upstream LLVM apt repository and pin the unversioned names. | |
| sudo install -m 0755 -d /etc/apt/keyrings | |
| wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key \ | |
| | sudo tee /etc/apt/keyrings/llvm.asc >/dev/null | |
| sudo chmod a+r /etc/apt/keyrings/llvm.asc | |
| codename=$(lsb_release -cs) | |
| echo "deb [signed-by=/etc/apt/keyrings/llvm.asc] http://apt.llvm.org/${codename}/ llvm-toolchain-${codename}-19 main" \ | |
| | sudo tee /etc/apt/sources.list.d/llvm-19.list >/dev/null | |
| sudo apt-get update | |
| sudo apt-get install -y clang-tidy-19 clang-tools-19 | |
| sudo ln -sf /usr/bin/clang-tidy-19 /usr/local/bin/clang-tidy | |
| sudo ln -sf /usr/bin/run-clang-tidy-19 /usr/local/bin/run-clang-tidy | |
| clang-tidy --version | |
| run-clang-tidy --help | head -1 || true | |
| - name: Install Rust (stable) | |
| uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 | |
| with: | |
| toolchain: stable | |
| - name: Set Linux build environment | |
| run: | | |
| echo "CXXFLAGS=-Wno-deprecated-declarations" >> $GITHUB_ENV | |
| echo "CFLAGS=-Wno-deprecated-declarations" >> $GITHUB_ENV | |
| LLVM_VERSION=$(llvm-config --version | cut -d. -f1) | |
| echo "LIBCLANG_PATH=/usr/lib/llvm-${LLVM_VERSION}/lib" >> $GITHUB_ENV | |
| - name: CMake configure | |
| run: cmake --preset linux-release | |
| - name: Generate protobuf headers | |
| run: cmake --build build-release --target livekit_proto | |
| - name: Run clang-tidy | |
| # tidy.sh auto-detects $GITHUB_ACTIONS and emits ::warning/::error | |
| # workflow commands so findings surface as PR file annotations. | |
| # It exits non-zero only when a finding is promoted to an error via | |
| # WarningsAsErrors in .clang-tidy; pure warnings annotate but don't | |
| # fail the build. | |
| run: ./tidy.sh |