Skip to content

Commit

Permalink
Add format check
Browse files Browse the repository at this point in the history
Summary: Migration to GitHub actions

Reviewed By: junjieqi

Differential Revision: D56745520

fbshipit-source-id: 5311a549842f19672ae574edaa8be3ea5a580dbc
  • Loading branch information
ramilbakhshyiev authored and facebook-github-bot committed Apr 30, 2024
1 parent 3121fc6 commit c92b480
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,31 @@ env:
OMP_NUM_THREADS: '10'
MKL_THREADING_LAYER: GNU
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Install clang-format
run: |
sudo apt-get update -y
sudo apt-get install -y wget
sudo apt install -y lsb-release wget software-properties-common gnupg
wget https://apt.llvm.org/llvm.sh
chmod u+x llvm.sh
sudo ./llvm.sh 18
sudo apt-get install -y git-core clang-format-18
- name: Verify clang-format
run: |
git ls-files | grep -E '\.(cpp|h|cu|cuh)$' | xargs clang-format-18 -i
if git diff --quiet; then
echo "Formatting OK!"
else
echo "Formatting not OK!"
echo "------------------"
git --no-pager diff --color
exit 1
fi
linux-x86_64-cmake:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit c92b480

Please sign in to comment.