[libcxx-commits] [libcxx] d689a64 - [libc++][ci] Add a script to describe when to trigger libc++ CI builds

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Sep 29 12:32:39 PDT 2020


Author: Louis Dionne
Date: 2020-09-29T15:32:26-04:00
New Revision: d689a64edd568e3048eb33976aa148251614d510

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

LOG: [libc++][ci] Add a script to describe when to trigger libc++ CI builds

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 000000000000..333cc285ab7c
--- /dev/null
+++ b/libcxx/utils/ci/buildkite-pipeline-trigger.sh
@@ -0,0 +1,37 @@
+#===----------------------------------------------------------------------===##
+#
+# 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 file generates a Buildkite pipeline that triggers the libc++ CI
+# job(s) if needed. The intended usage of this script is to be piped
+# into `buildkite-agent pipeline upload`.
+#
+
+if git 
diff  --name-only HEAD~ | grep -q -E "libcxx/|libcxxabi/"; then
+  skip="false"
+else
+  skip="The commit does not touch libc++ or libc++abi"
+fi
+
+reviewID="$(git log --format=%B -n 1 | sed -nE 's/^Review-ID:[[:space:]]*(.+)$/\1/p')"
+if [[ "${reviewID}" != "" ]]; then
+  buildMessage="https://llvm.org/${reviewID}"
+else
+  buildMessage="Push to branch ${BUILDKITE_BRANCH}"
+fi
+
+cat <<EOF
+steps:
+  - trigger: "libcxx-ci"
+    async: true
+    build:
+      message: "${buildMessage}"
+      commit: "${BUILDKITE_COMMIT}"
+      branch: "${BUILDKITE_BRANCH}"
+    skip: "${skip}"
+EOF


        


More information about the libcxx-commits mailing list