@@ -539,7 +539,6 @@ jobs:
539539 cmake -S . -B build -DLIVEKIT_LOCAL_SDK_DIR=/opt/livekit-sdk
540540 cmake --build build --parallel
541541 '
542-
543542 build-collections-x64 :
544543 name : Build (cpp-example-collection-x64)
545544 runs-on : ubuntu-latest
@@ -586,108 +585,3 @@ jobs:
586585 cmake -S . -B build -DLIVEKIT_LOCAL_SDK_DIR=/opt/livekit-sdk
587586 cmake --build build --parallel
588587 '
589-
590- clang-format :
591- name : clang-format
592- runs-on : ubuntu-latest
593- continue-on-error : false
594- permissions :
595- contents : read
596-
597- steps :
598- - name : Checkout
599- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
600- with :
601- # No submodules: scripts/clang-format.sh only walks our own src/ tree
602- fetch-depth : 1
603-
604- - name : Install clang-format 22
605- run : |
606- set -eux
607- # Pin clang-format 22 to match the current macOS Homebrew LLVM
608- # Ubuntu 24.04's default clang-format ships with LLVM 18
609- sudo install -m 0755 -d /etc/apt/keyrings
610- wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key \
611- | sudo tee /etc/apt/keyrings/llvm.asc >/dev/null
612- sudo chmod a+r /etc/apt/keyrings/llvm.asc
613- codename=$(lsb_release -cs)
614- echo "deb [signed-by=/etc/apt/keyrings/llvm.asc] http://apt.llvm.org/${codename}/ llvm-toolchain-${codename}-22 main" \
615- | sudo tee /etc/apt/sources.list.d/llvm-22.list >/dev/null
616- sudo apt-get update
617- sudo apt-get install -y clang-format-22
618- sudo ln -sf /usr/bin/clang-format-22 /usr/local/bin/clang-format
619- clang-format --version
620-
621- - name : Run clang-format
622- env :
623- FORMAT_BLOB_SHA : ${{ github.event.pull_request.head.sha || github.sha }}
624- run : ./scripts/clang-format.sh
625-
626- clang-tidy :
627- name : clang-tidy
628- runs-on : ubuntu-latest
629- continue-on-error : false
630- permissions :
631- contents : read
632-
633- steps :
634- - name : Checkout (with submodules)
635- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
636- with :
637- submodules : recursive
638- fetch-depth : 1
639-
640- - name : Install dependencies
641- run : |
642- set -eux
643- sudo apt-get update
644- sudo apt-get install -y \
645- build-essential cmake ninja-build pkg-config \
646- llvm-dev libclang-dev clang \
647- libssl-dev wget ca-certificates gnupg
648-
649- - name : Install clang-tidy 19 (for ExcludeHeaderFilterRegex support)
650- run : |
651- set -eux
652- # Ubuntu 24.04 apt ships clang-tidy 18, which doesn't understand
653- # ExcludeHeaderFilterRegex (added in 19). Pull clang-tidy 19 from
654- # the upstream LLVM apt repository and pin the unversioned names.
655- sudo install -m 0755 -d /etc/apt/keyrings
656- wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key \
657- | sudo tee /etc/apt/keyrings/llvm.asc >/dev/null
658- sudo chmod a+r /etc/apt/keyrings/llvm.asc
659- codename=$(lsb_release -cs)
660- echo "deb [signed-by=/etc/apt/keyrings/llvm.asc] http://apt.llvm.org/${codename}/ llvm-toolchain-${codename}-19 main" \
661- | sudo tee /etc/apt/sources.list.d/llvm-19.list >/dev/null
662- sudo apt-get update
663- sudo apt-get install -y clang-tidy-19 clang-tools-19
664- sudo ln -sf /usr/bin/clang-tidy-19 /usr/local/bin/clang-tidy
665- sudo ln -sf /usr/bin/run-clang-tidy-19 /usr/local/bin/run-clang-tidy
666- clang-tidy --version
667- run-clang-tidy --help | head -1 || true
668-
669- - name : Install Rust (stable)
670- uses : dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
671- with :
672- toolchain : stable
673-
674- - name : Set Linux build environment
675- run : |
676- echo "CXXFLAGS=-Wno-deprecated-declarations" >> "$GITHUB_ENV"
677- echo "CFLAGS=-Wno-deprecated-declarations" >> "$GITHUB_ENV"
678- LLVM_VERSION=$(llvm-config --version | cut -d. -f1)
679- echo "LIBCLANG_PATH=/usr/lib/llvm-${LLVM_VERSION}/lib" >> "$GITHUB_ENV"
680-
681- - name : CMake configure
682- run : cmake --preset linux-release
683-
684- - name : Generate protobuf headers
685- run : cmake --build build-release --target livekit_proto
686-
687- - name : Run clang-tidy
688- env :
689- TIDY_BLOB_SHA : ${{ github.event.pull_request.head.sha || github.sha }}
690- # This script is intended to be run locally and in CI. It will auto-detect
691- # the GHA environment and add PR annotations and a run summary.
692- # As of writing all warnings are treateded as errors to avoid tech debt build up
693- run : ./scripts/clang-tidy.sh --fail-on-warning
0 commit comments