PHILO-HE commented on code in PR #5941:
URL: https://github.com/apache/incubator-gluten/pull/5941#discussion_r1625203396
##########
.github/workflows/code_style.yml:
##########
@@ -14,43 +14,56 @@
# limitations under the License.
name: Code style checks
-
on:
- pull_request
-
+ pull_request:
+ paths:
+ - '.github/workflows/code_style.yml'
+ - 'cpp/**'
+ - 'cpp-ch/**'
concurrency:
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{
github.workflow }}
cancel-in-progress: true
jobs:
- formatting-check:
- name: Formatting Check
+ CPP-format-check:
+ name: CPP Format Check
runs-on: ubuntu-latest
strategy:
matrix:
path:
- - check: 'cpp/core'
- exclude: ''
- - check: 'cpp/velox'
+ - check: 'cpp'
exclude: ''
steps:
- uses: actions/checkout@v4
- - name: Run clang-format style check for C/C++ programs.
+ - name: Run clang-format style check for C/C++
uses: jidicula/[email protected]
with:
clang-format-version: '15'
check-path: ${{ matrix.path['check'] }}
fallback-style: 'Google' # optional
- license-check:
- name: License Header Check
+ CMake-format-check:
+ name: CMake Format Check
runs-on: ubuntu-latest
-
+ container: ubuntu:22.04
steps:
- - uses: actions/checkout@v3
-
- - name: Check License Header
+ - name: Install tools
+ run: |
+ apt update -y
+ apt install git python3-pip -y
+ pip3 install --user cmake-format
+ - uses: actions/checkout@v4
+ - name: Check CMake format
run: |
- git fetch --recurse-submodules=no origin main
${{github.event.pull_request.base.sha}}
- pip install regex
- dev/check.sh ${{github.event.pull_request.base.sha}}
+ git config --global --add safe.directory $GITHUB_WORKSPACE
+ cd $GITHUB_WORKSPACE/
+ fileList=$(find ./cpp ./cpp-ch -name CMakeLists.txt -o -name *.cmake)
Review Comment:
@zzcclp, I'm adding to CI job to format CMake code (CMakeLists.txt &
*.cmake), which also covers cpp-ch module. Please take a look to see if it's ok
to you. Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]