Skip to content

Commit 0dc302c

Browse files
authored
Revert "[mlir-tensorrt] Add commit message check to CI" (#259)
Reverts #255
1 parent 1f10b30 commit 0dc302c

File tree

1 file changed

+3
-29
lines changed

1 file changed

+3
-29
lines changed

.github/workflows/mlir-tensorrt-ci.yml

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
fetch-depth: 5
4444

4545
# Run initial format check
46-
- name: Run commit message, python format, and c++ clang format check
46+
- name: Run python format and clang check
4747
uses: addnab/docker-run-action@v3
4848
with:
4949
image: ${{ env.DEFAULT_IMAGE }}
@@ -52,41 +52,15 @@ jobs:
5252
username: ${{ github.actor }}
5353
password: ${{ secrets.GITHUB_TOKEN }}
5454
# This step does two things
55-
# 1. Check if commit message is in the canonical format
56-
# 2. Check if Python files follow black format
57-
# 3. Check if C++ files follow clang format
55+
# 1. Check if Python files follow black format
56+
# 2. Check if C++ files follow clang format
5857
# NOTE: We are placed at the root directory ('/') inside the container.
5958
run: |
6059
cd tensorrt-incubator
6160
git config --global --add safe.directory /tensorrt-incubator
62-
cat > commit_message_checker.py <<EOF
63-
#!/usr/bin/python3
64-
import re
65-
import sys
66-
match = re.search(r"^(\[bot\].+|NFC: .+|(.+\n\n+.+\n+.+))$", sys.argv[1], re.DOTALL)
67-
if match:
68-
sys.exit(0)
69-
sys.exit(1)
70-
EOF
71-
7261
cat > run_format_check.sh <<EOF
7362
#!/bin/bash
7463
set -e
75-
head_commit_message=$(git rev-list --max-count=1 --format=%B --no-commit-header HEAD)
76-
python3 commit_message_checker.py "$head_commit_message"
77-
if [[ $? == 0 ]] ; then
78-
echo "Commit message is in the canonical form :)"
79-
else
80-
echo "Commit message is not in the canonical form!"
81-
echo "${head_commit_message}"
82-
echo ""
83-
echo "Expected format is, "
84-
echo "<subject>"
85-
echo ""
86-
echo "<body>"
87-
echo "body should be at least two lines."
88-
exit 1
89-
fi
9064
python3 -m black --check --exclude='.*\.pyi' mlir-tensorrt/test/
9165
python3 -m black --check --exclude='.*\.pyi' mlir-tensorrt/python/
9266
git clang-format HEAD~1 --diff

0 commit comments

Comments
 (0)