Skip to content

Commit 51bceee

Browse files
committed
chore: add clang tidy check workflow
1 parent a1a3ff3 commit 51bceee

File tree

6 files changed

+93
-12
lines changed

6 files changed

+93
-12
lines changed

.github/workflows/clang_test.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024-present Alibaba Inc.
1+
# Copyright 2025-present Alibaba Inc.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -29,9 +29,6 @@ concurrency:
2929
permissions:
3030
contents: read
3131

32-
env:
33-
PAIMON_HOME: /tmp/paimon
34-
3532
jobs:
3633
ubuntu:
3734
name: AMD64 Ubuntu 24.04

.github/workflows/gcc_test.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ concurrency:
2929
permissions:
3030
contents: read
3131

32-
env:
33-
PAIMON_HOME: /tmp/paimon
34-
3532
jobs:
3633
ubuntu:
3734
name: AMD64 Ubuntu 24.04

.github/workflows/pre-commit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024-present Alibaba Inc.
1+
# Copyright 2025-present Alibaba Inc.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Copyright 2025-present Alibaba Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Run Clang Tidy
16+
17+
on:
18+
push:
19+
branches:
20+
- '**'
21+
tags:
22+
- '**'
23+
pull_request:
24+
25+
concurrency:
26+
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
27+
cancel-in-progress: true
28+
29+
permissions:
30+
contents: read
31+
32+
jobs:
33+
ubuntu:
34+
name: AMD64 Ubuntu 24.04
35+
runs-on: ubuntu-24.04
36+
timeout-minutes: 120
37+
strategy:
38+
fail-fast: false
39+
steps:
40+
- name: Checkout paimon-cpp
41+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
42+
with:
43+
lfs: true
44+
- name: Run Paimon Clang Tidy
45+
shell: bash
46+
env:
47+
CC: clang
48+
CXX: clang++
49+
run: ci/scripts/run_clang_tidy.sh $(pwd)

.github/workflows/test_with_sanitizer.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024-present Alibaba Inc.
1+
# Copyright 2025-present Alibaba Inc.
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -29,9 +29,6 @@ concurrency:
2929
permissions:
3030
contents: read
3131

32-
env:
33-
PAIMON_HOME: /tmp/paimon
34-
3532
jobs:
3633
ubuntu:
3734
name: AMD64 Ubuntu 24.04

ci/scripts/run_clang_tidy.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright 2024-present Alibaba Inc.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -eux
18+
19+
source_dir=${1}
20+
build_dir=${1}/build
21+
22+
mkdir ${build_dir}
23+
pushd ${build_dir}
24+
25+
CMAKE_ARGS=(
26+
"-G Ninja"
27+
"-DCMAKE_BUILD_TYPE=Debug"
28+
"-DPAIMON_BUILD_TESTS=ON"
29+
"-DPAIMON_ENABLE_LANCE=ON"
30+
"-DPAIMON_ENABLE_JINDO=ON"
31+
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
32+
"-DPAIMON_LINT_GIT_TARGET_COMMIT=origin/${{git.merge_request.targetBranch}}"
33+
)
34+
35+
cmake "${CMAKE_ARGS[@]}" ${source_dir}
36+
cmake --build . -- -j$(nproc)
37+
ninja check-clang-tidy
38+
39+
popd
40+
41+
rm -rf ${build_dir}

0 commit comments

Comments
 (0)