[libcxx-commits] [libcxx] 5f68127 - [libc++] Enable clang-tidy from the buildkite pipeline instead of hard-coding it in run-buildbot
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jan 20 08:10:52 PST 2023
Author: Nikolas Klauser
Date: 2023-01-20T17:10:46+01:00
New Revision: 5f6812748e25f5240cc8b4ffee658cbd52e46bf4
URL: https://github.com/llvm/llvm-project/commit/5f6812748e25f5240cc8b4ffee658cbd52e46bf4
DIFF: https://github.com/llvm/llvm-project/commit/5f6812748e25f5240cc8b4ffee658cbd52e46bf4.diff
LOG: [libc++] Enable clang-tidy from the buildkite pipeline instead of hard-coding it in run-buildbot
Reviewed By: ldionne, #libc, Mordante, emaste
Spies: emaste, Mordante, libcxx-commits, arichardson
Differential Revision: https://reviews.llvm.org/D141294
Added:
Modified:
libcxx/utils/ci/buildkite-pipeline.yml
libcxx/utils/ci/run-buildbot
Removed:
################################################################################
diff --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml
index 49a66142ddf49..c6339e444918a 100644
--- a/libcxx/utils/ci/buildkite-pipeline.yml
+++ b/libcxx/utils/ci/buildkite-pipeline.yml
@@ -107,6 +107,7 @@ steps:
env:
CC: "clang-${LLVM_HEAD_VERSION}"
CXX: "clang++-${LLVM_HEAD_VERSION}"
+ ENABLE_CLANG_TIDY: "On"
agents:
queue: "libcxx-builders"
os: "linux"
@@ -141,6 +142,7 @@ steps:
env:
CC: "clang-${LLVM_HEAD_VERSION}"
CXX: "clang++-${LLVM_HEAD_VERSION}"
+ ENABLE_CLANG_TIDY: "On"
agents:
queue: "libcxx-builders"
os: "linux"
@@ -158,6 +160,7 @@ steps:
env:
CC: "clang-${LLVM_HEAD_VERSION}"
CXX: "clang++-${LLVM_HEAD_VERSION}"
+ ENABLE_CLANG_TIDY: "On"
agents:
queue: "libcxx-builders"
os: "linux"
@@ -180,6 +183,7 @@ steps:
env:
CC: "clang-${LLVM_HEAD_VERSION}"
CXX: "clang++-${LLVM_HEAD_VERSION}"
+ ENABLE_CLANG_TIDY: "On"
agents:
queue: "libcxx-builders"
os: "linux"
@@ -197,6 +201,7 @@ steps:
env:
CC: "clang-${LLVM_HEAD_VERSION}"
CXX: "clang++-${LLVM_HEAD_VERSION}"
+ ENABLE_CLANG_TIDY: "On"
agents:
queue: "libcxx-builders"
os: "linux"
@@ -214,6 +219,7 @@ steps:
env:
CC: "clang-${LLVM_HEAD_VERSION}"
CXX: "clang++-${LLVM_HEAD_VERSION}"
+ ENABLE_CLANG_TIDY: "On"
agents:
queue: "libcxx-builders"
os: "linux"
diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index fef6a2956825a..8ec401cb2db2a 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -42,6 +42,9 @@ GIT_CLANG_FORMAT The git-clang-format binary to use in the 'format' builder.
When the value is omitted, it defaults to
'git-clang-format'. This variable or its fallback must work
when running the 'format' builder.
+
+ENABLE_CLANG_TIDY Whether to compile and run clang-tidy checks. This variable
+ is optional
EOF
}
@@ -90,6 +93,10 @@ function clean() {
rm -rf "${BUILD_DIR}"
}
+if [ -z "${ENABLE_CLANG_TIDY}" ]; then
+ ENABLE_CLANG_TIDY=Off
+fi
+
function generate-cmake-base() {
echo "--- Generating CMake"
${CMAKE} \
@@ -101,6 +108,7 @@ function generate-cmake-base() {
-DLIBCXX_ENABLE_WERROR=YES \
-DLIBCXXABI_ENABLE_WERROR=YES \
-DLIBUNWIND_ENABLE_WERROR=YES \
+ -DLIBCXX_ENABLE_CLANG_TIDY=${ENABLE_CLANG_TIDY} \
-DLLVM_LIT_ARGS="-sv --show-unsupported --xunit-xml-output test-results.xml --timeout=1500 --time-tests" \
"${@}"
}
@@ -226,43 +234,37 @@ check-generated-output)
#
generic-cxx03)
clean
- generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx03.cmake" \
- -DLIBCXX_ENABLE_CLANG_TIDY=ON
+ generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx03.cmake"
check-runtimes
check-abi-list
;;
generic-cxx11)
clean
- generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx11.cmake" \
- -DLIBCXX_ENABLE_CLANG_TIDY=ON
+ generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx11.cmake"
check-runtimes
check-abi-list
;;
generic-cxx14)
clean
- generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx14.cmake" \
- -DLIBCXX_ENABLE_CLANG_TIDY=ON
+ generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx14.cmake"
check-runtimes
check-abi-list
;;
generic-cxx17)
clean
- generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx17.cmake" \
- -DLIBCXX_ENABLE_CLANG_TIDY=ON
+ generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx17.cmake"
check-runtimes
check-abi-list
;;
generic-cxx20)
clean
- generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx20.cmake" \
- -DLIBCXX_ENABLE_CLANG_TIDY=ON
+ generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx20.cmake"
check-runtimes
check-abi-list
;;
generic-cxx2b)
clean
- generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx2b.cmake" \
- -DLIBCXX_ENABLE_CLANG_TIDY=ON
+ generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx2b.cmake"
check-runtimes
check-abi-list
;;
More information about the libcxx-commits
mailing list