@@ -25,14 +25,15 @@ jobs:
2525 - uses : actions/setup-python@v5
2626 with :
2727 python-version : " 3.x"
28+
2829 - name : Install pinned clang-format
2930 run : |
3031 python -m pip install --upgrade pip
3132 python -m pip install "clang-format==${CF_VERSION}"
3233 clang-format --version
3334
3435 # Check formatting ONLY for C/C++ files under top-level src/
35- - name : Check formatting ( src/* only)
36+ - name : Run clang-format # src/* only
3637 shell : bash
3738 run : |
3839 git -c core.quotePath=false ls-files -z -- 'src' \
@@ -48,32 +49,37 @@ jobs:
4849 image : ubuntu:24.04
4950
5051 steps :
51- - name : Checkout
52- uses : actions/checkout@v4
53- with :
54- fetch-depth : 0
52+ - name : Install Git
53+ shell : bash
54+ run : |
55+ set -euxo pipefail
56+ export DEBIAN_FRONTEND=noninteractive
57+ apt-get -o Acquire::Retries=3 update
58+ apt-get -o Dpkg::Use-Pty=0 install -y --no-install-recommends git ca-certificates
59+ git config --global --add safe.directory "$GITHUB_WORKSPACE"
5560
56- - uses : ./.github/actions/setup-linux-build-container
61+ - uses : actions/checkout@v4
62+
63+ - uses : ./.github/actions/linux-container-build-setup
5764
5865 - uses : actions/setup-python@v5
5966 with :
6067 python-version : " 3.x"
68+
6169 - name : Install pinned clang-tidy
6270 run : |
6371 python -m pip install "clang-tidy==${CT_VERSION}"
6472 clang-tidy --version
6573
66- - name : Configure ( dev preset -> compile_commands.json in build/dev/)
74+ - name : Configure # dev preset -> compile_commands.json in build/dev/
6775 run : cmake --preset dev
6876
6977 # Run clang-tidy ONLY for C/C++ sources under top-level src/.
7078 # Header filter also restricted to src/ to avoid build-tree deps.
71- - name : Run clang-tidy ( src/* only)
79+ - name : Run clang-tidy # src/* only
7280 shell : bash
7381 run : |
74- git -c core.quotePath=false ls-files -z -- 'src' \
75- | grep -z -E '\.(c|cc|cpp|cxx|m|mm)$' \
76- | xargs -0 -r -n1 -P"$(nproc)" \
77- clang-tidy -p build/dev \
78- --header-filter='(^|.*/)(src)/' \
79- --warnings-as-errors='*' --
82+ git -c safe.directory="$GITHUB_WORKSPACE" -c core.quotePath=false \
83+ ls-files -z -- 'src' -- '*.c' '*.cc' '*.cpp' '*.cxx' '*.m' '*.mm' \
84+ | xargs -0 -r -n32 -P"$(nproc)" \
85+ clang-tidy -p build/dev --config-file=.clang-tidy -quiet
0 commit comments