Skip to content

Commit

Permalink
check formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbkoch committed Jul 27, 2024
1 parent 5634e10 commit d35764e
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -479,3 +479,30 @@ jobs:
flags: bdist_${{ matrix.name }}
name: codecov_bdist_${{ matrix.name }}
token: ${{ secrets.CODECOV_TOKEN }}

format_clang:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Check C++ code formatting with clang-format
continue-on-error: true
run: |
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" | sudo tee /etc/apt/sources.list.d/llvm-toolchain-jammy-16.list
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/llvm-archive-keyring.gpg
sudo apt --yes update
sudo apt --yes install clang-format-16
find shared/libebm \( -iname "*.cpp" -o -iname "*.h" -o -iname "*.hpp" \) | xargs clang-format-16 -i -style=file
git diff --exit-code
format_black:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Check python matches black format
continue-on-error: true
run: |
cd python/interpret-core
python -m pip install --upgrade black
black --check .

0 comments on commit d35764e

Please sign in to comment.