From c6bf7cd39baa1a07124f66f9112adce5e1b3ddd2 Mon Sep 17 00:00:00 2001 From: Dave Allie Date: Mon, 15 Dec 2025 19:40:16 +1100 Subject: [PATCH] Install matching clang-format version in CI --- .github/workflows/ci.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb1d8ac..015565f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,14 +18,23 @@ jobs: - uses: actions/setup-python@v6 with: python-version: '3.14' + - name: Install PlatformIO Core run: pip install --upgrade platformio + - name: Install clang-format-21 + run: | + wget https://apt.llvm.org/llvm.sh + chmod +x llvm.sh + sudo ./llvm.sh 21 + sudo apt-get update + sudo apt-get install -y clang-format-21 + - name: Run cppcheck run: pio check --fail-on-defect medium --fail-on-defect high - name: Run clang-format - run: bin/clang-format-fix && git diff --exit-code + run: PATH="/usr/lib/llvm-21/bin:$PATH" ./bin/clang-format-fix && git diff --exit-code || (echo "Please run 'bin/clang-format-fix' to fix formatting issues" && exit 1) - name: Build CrossPoint run: pio run