[libcxx-commits] [libcxx] 05ebb36 - [libc++] Re-add a script to trigger the libc++ Buildkite pipeline (#146730)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jul 2 08:43:23 PDT 2025


Author: Louis Dionne
Date: 2025-07-02T11:43:19-04:00
New Revision: 05ebb363c901cf2c153a5c90293b202cc4540887

URL: https://github.com/llvm/llvm-project/commit/05ebb363c901cf2c153a5c90293b202cc4540887
DIFF: https://github.com/llvm/llvm-project/commit/05ebb363c901cf2c153a5c90293b202cc4540887.diff

LOG: [libc++] Re-add a script to trigger the libc++ Buildkite pipeline (#146730)

This was removed in 99cdc26c94 when the LLVM monorepo Buildkite setup
was removed. Libc++ previously relied on the LLVM monorepo pipeline to
trigger its own pipeline when needed. Since there is no LLVM monorepo
pipeline anymore, we must trigger the libc++ Buildkite pipeline on every
pull request and use this script to determine which jobs to actually
start based on the files that are touched by the PR.

Added: 
    libcxx/utils/ci/buildkite-pipeline-trigger.sh

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/libcxx/utils/ci/buildkite-pipeline-trigger.sh b/libcxx/utils/ci/buildkite-pipeline-trigger.sh
new file mode 100755
index 0000000000000..4661cd54fad42
--- /dev/null
+++ b/libcxx/utils/ci/buildkite-pipeline-trigger.sh
@@ -0,0 +1,34 @@
+# ===----------------------------------------------------------------------===##
+#
+# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+#
+# ===----------------------------------------------------------------------===##
+
+#
+# This script determines whether the libc++ Buildkite pipeline should be triggered
+# on a change. This is required because Buildkite gets notified for every PR in the
+# LLVM monorepo, and we make it a no-op unless the libc++ pipeline needs to be triggered.
+#
+
+# Set by buildkite
+: ${BUILDKITE_PULL_REQUEST_BASE_BRANCH:=}
+
+# Fetch origin to have an up to date merge base for the 
diff .
+git fetch origin
+# List of files affected by this commit
+: ${MODIFIED_FILES:=$(git 
diff  --name-only origin/${BUILDKITE_PULL_REQUEST_BASE_BRANCH}...HEAD)}
+
+echo "Files modified:" >&2
+echo "$MODIFIED_FILES" >&2
+modified_dirs=$(echo "$MODIFIED_FILES" | cut -d'/' -f1 | sort -u)
+echo "Directories modified:" >&2
+echo "$modified_dirs" >&2
+
+# If libc++ or one of the runtimes directories changed, trigger the libc++ Buildkite pipeline.
+if echo "$modified_dirs" | grep -q -E "^(libcxx|libcxxabi|libunwind|runtimes|cmake)$"; then
+    buildkite-agent pipeline upload libcxx/utils/ci/buildkite-pipeline.yml
+else
+    echo "No Buildkite jobs to trigger"
+fi


        


More information about the libcxx-commits mailing list