This is an automated email from the ASF dual-hosted git repository.
lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git
The following commit(s) were added to refs/heads/main by this push:
new f6672119 chore(ci): run clang-tidy in parallel (#914)
f6672119 is described below
commit f66721194c76e8c2dd48ecad79609db51ae3d0e1
Author: David Li <[email protected]>
AuthorDate: Wed Jul 19 08:20:52 2023 -0400
chore(ci): run clang-tidy in parallel (#914)
Fixes #899.
---
.github/workflows/native-unix.yml | 3 ++-
ci/conda_env_cpp_lint.txt | 19 +++++++++++++++++++
ci/scripts/cpp_clang_tidy.sh | 9 +++++----
3 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/native-unix.yml
b/.github/workflows/native-unix.yml
index 92e8b7b6..208c34a8 100644
--- a/.github/workflows/native-unix.yml
+++ b/.github/workflows/native-unix.yml
@@ -216,7 +216,8 @@ jobs:
shell: bash -l {0}
run: |
mamba install -c conda-forge \
- --file ci/conda_env_cpp.txt
+ --file ci/conda_env_cpp.txt \
+ --file ci/conda_env_cpp_lint.txt
- name: clang-tidy
shell: bash -l {0}
diff --git a/ci/conda_env_cpp_lint.txt b/ci/conda_env_cpp_lint.txt
new file mode 100644
index 00000000..471ef0de
--- /dev/null
+++ b/ci/conda_env_cpp_lint.txt
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+clang=14
+clang-tools=14
diff --git a/ci/scripts/cpp_clang_tidy.sh b/ci/scripts/cpp_clang_tidy.sh
index 16ffc26a..5c972ffb 100755
--- a/ci/scripts/cpp_clang_tidy.sh
+++ b/ci/scripts/cpp_clang_tidy.sh
@@ -65,10 +65,11 @@ build_subproject() {
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}"
- clang-tidy \
- -p "${build_dir}/compile_commands.json" \
- --fix \
- --quiet \
+ run-clang-tidy \
+ -j $(nproc) \
+ -p "${build_dir}" \
+ -fix \
+ -quiet \
$(jq -r ".[] | .file" "${build_dir}/compile_commands.json")
set +x