diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2932eee6..bc7a4628 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,6 +36,7 @@ jobs: sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-16 160 sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-16 160 sudo update-alternatives --install /usr/bin/lli lli /usr/bin/lli-16 160 + sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-16 160 - name: Setup LLVM and GCC (MacOS) if: ${{ runner.os == 'macOS' }} @@ -57,6 +58,10 @@ jobs: python -m pip install --upgrade pip pip install pytest pytest-xdist + - name: Check formatting + if: ${{ runner.os == 'Linux' }} + run: find . -iname '*.h' -o -iname '*.cpp' | xargs clang-format -Werror --dry-run --style=LLVM --verbose + - name: Build run: | mkdir build