[libcxx-commits] [PATCH] D153920: [clang] Move the clang formatting job to run-buildbot to fix the CI

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jul 2 09:55:19 PDT 2023


philnik updated this revision to Diff 536611.
philnik added a comment.

Try Louis' suggestion


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153920/new/

https://reviews.llvm.org/D153920

Files:
  libcxx/utils/ci/buildkite-pipeline-clang.yml
  libcxx/utils/ci/generate-buildkite-pipeline
  libcxx/utils/ci/run-buildbot


Index: libcxx/utils/ci/run-buildbot
===================================================================
--- libcxx/utils/ci/run-buildbot
+++ libcxx/utils/ci/run-buildbot
@@ -203,6 +203,9 @@
     # Check if the diff is empty, fail otherwise.
     ! grep -q '^--- a' ${BUILD_DIR}/clang-format.patch
 ;;
+check-format-clang)
+    ! grep -rnI '[[:blank:]]$' clang/lib clang/include clang/docs
+;;
 check-generated-output)
     # `! foo` doesn't work properly with `set -e`, use `! foo || false` instead.
     # https://stackoverflow.com/questions/57681955/set-e-does-not-respect-logical-not
Index: libcxx/utils/ci/generate-buildkite-pipeline
===================================================================
--- libcxx/utils/ci/generate-buildkite-pipeline
+++ libcxx/utils/ci/generate-buildkite-pipeline
@@ -11,16 +11,4 @@
 # This script generates the appropriate libc++ CI pipeline based on which project(s) were changed.
 #
 
-if git diff --name-only HEAD~1 | grep -q -E "^libcxx/|^libcxxabi/|^libunwind/|^runtimes/|^cmake/"; then
-  LIBCXX_CHANGED=true
-fi
-
-if git diff --name-only HEAD~1 | grep -q -E "^clang/"; then
-  CLANG_CHANGED=true
-fi
-
-if [[ "${CLANG_CHANGED}" == "true" && "${LIBCXX_CHANGED}" != "true" ]]; then
-  cat libcxx/utils/ci/buildkite-pipeline-clang.yml
-else
-  cat libcxx/utils/ci/buildkite-pipeline.yml
-fi
+cat libcxx/utils/ci/buildkite-pipeline-clang.yml
Index: libcxx/utils/ci/buildkite-pipeline-clang.yml
===================================================================
--- libcxx/utils/ci/buildkite-pipeline-clang.yml
+++ libcxx/utils/ci/buildkite-pipeline-clang.yml
@@ -19,7 +19,7 @@
 steps:
   - label: "Format"
     commands:
-      - "! grep -rnI '[[:blank:]]$' clang/lib clang/include clang/docs || false"
+      - "libcxx/utils/ci/run-buildbot check-format-clang"
 
     agents:
       queue: "libcxx-builders"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153920.536611.patch
Type: text/x-patch
Size: 1853 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230702/97005991/attachment.bin>


More information about the libcxx-commits mailing list