File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5656 - name : clang-debug
5757 cc : clang
5858 cxx : clang++
59- fetch_depth : 0
60- build_args : --check_clang_tidy
59+ fetch_depth : 0 # fetch the PR target branch history for clang-tidy
60+ build_args : >-
61+ --check_clang_tidy
62+ --lint_git_target_commit "origin/${{ github.base_ref || github.event.repository.default_branch }}"
6163 steps :
6264 - name : Checkout paimon-cpp
6365 uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
Original file line number Diff line number Diff line change 1717set -eux
1818
1919usage () {
20- echo " Usage: $0 --source_dir <path> [--enable_asan] [--enable_ubsan] [--enable_tsan] [--check_clang_tidy] [--build_type <type>]"
20+ echo " Usage: $0 --source_dir <path> [--enable_asan] [--enable_ubsan] [--enable_tsan] [--check_clang_tidy] [--build_type <type>] [--lint_git_target_commit <commit-or-branch>] "
2121}
2222
2323source_dir=" "
@@ -26,6 +26,7 @@ enable_ubsan="false"
2626enable_tsan=" false"
2727check_clang_tidy=" false"
2828build_type=" Debug"
29+ lint_git_target_commit=" origin/main"
2930
3031while [[ $# -gt 0 ]]; do
3132 case " $1 " in
@@ -63,6 +64,15 @@ while [[ $# -gt 0 ]]; do
6364 build_type=$2
6465 shift 2
6566 ;;
67+ --lint_git_target_commit)
68+ if [[ $# -lt 2 ]]; then
69+ echo " Missing value for --lint_git_target_commit" >&2
70+ usage >&2
71+ exit 1
72+ fi
73+ lint_git_target_commit=$2
74+ shift 2
75+ ;;
6676 -h | --help)
6777 usage
6878 exit 0
@@ -126,6 +136,7 @@ CMAKE_ARGS=(
126136 " -DPAIMON_ENABLE_LUMINA=${ENABLE_LUMINA} "
127137 " -DPAIMON_ENABLE_LUCENE=ON"
128138 " -DPAIMON_ENABLE_TANTIVY=${ENABLE_TANTIVY} "
139+ " -DPAIMON_LINT_GIT_TARGET_COMMIT=${lint_git_target_commit} "
129140)
130141
131142if [[ " ${enable_asan} " == " true" ]]; then
You can’t perform that action at this time.
0 commit comments