[libcxx-commits] [libcxx] 40f360c - [libc++] Update continous integration scripts

Mikhail Goncharov via libcxx-commits libcxx-commits at lists.llvm.org
Thu Oct 22 02:00:41 PDT 2020


Author: Mikhail Goncharov
Date: 2020-10-22T10:49:40+02:00
New Revision: 40f360c2e90bd833f648a614db441020eeabe925

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

LOG: [libc++] Update continous integration scripts

Now libc++ pipeline will be triggered from the "premerge-checks" and the
combined result are going to be returned to Harbormaster.

Reviewed-by: ldionne

Differential Revision: https://reviews.llvm.org/D89113

Added: 
    libcxx/utils/ci/buildkite-pipeline-premerge.sh
    libcxx/utils/ci/buildkite-pipeline-snapshot.sh

Modified: 
    libcxx/utils/ci/buildkite-pipeline.yml
    libcxx/utils/ci/run-buildbot.sh

Removed: 
    


################################################################################
diff  --git a/libcxx/utils/ci/buildkite-pipeline-premerge.sh b/libcxx/utils/ci/buildkite-pipeline-premerge.sh
new file mode 100755
index 000000000000..ba6b5ae6b1ac
--- /dev/null
+++ b/libcxx/utils/ci/buildkite-pipeline-premerge.sh
@@ -0,0 +1,42 @@
+#!/usr/bin/env bash
+#===----------------------------------------------------------------------===##
+#
+# 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.
+# See https://buildkite.com/docs/agent/v3/cli-pipeline#pipeline-format.
+#
+# Invoked by CI on pre-merge check for a commit.
+#
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+
+if ! git 
diff  --name-only HEAD~1 | grep -q -E "libcxx/|libcxxabi/"; then
+  # libcxx is not affected
+  exit 0
+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"
+    build:
+      message: "${buildMessage}"
+      commit: "${BUILDKITE_COMMIT}"
+      branch: "${BUILDKITE_BRANCH}"
+EOF
+
+

diff  --git a/libcxx/utils/ci/buildkite-pipeline-snapshot.sh b/libcxx/utils/ci/buildkite-pipeline-snapshot.sh
new file mode 100755
index 000000000000..b48aad791c78
--- /dev/null
+++ b/libcxx/utils/ci/buildkite-pipeline-snapshot.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+#===----------------------------------------------------------------------===##
+#
+# 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 jobs.
+# See https://buildkite.com/docs/agent/v3/cli-pipeline#pipeline-format.
+#
+# Invoked by CI on full builds.
+#
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+cat <<EOF
+steps:
+  - trigger: "libcxx-ci"
+    build:
+      message: "${BUILDKITE_MESSAGE}"
+      commit: "${BUILDKITE_COMMIT}"
+      branch: "${BUILDKITE_BRANCH}"
+EOF

diff  --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml
index 6d416a36cba2..76cf1c4a7666 100644
--- a/libcxx/utils/ci/buildkite-pipeline.yml
+++ b/libcxx/utils/ci/buildkite-pipeline.yml
@@ -16,86 +16,119 @@
 
 steps:
   - label: "C++03"
-    command: "set -o pipefail && libcxx/utils/ci/run-buildbot.sh generic-cxx03 | libcxx/utils/ci/phabricator-report"
+    command: "libcxx/utils/ci/run-buildbot.sh generic-cxx03"
+    artifact_paths:
+      - "**/test-results.xml"
     agents:
       queue: "libcxx-builders"
 
   - label: "C++11"
-    command: "set -o pipefail && libcxx/utils/ci/run-buildbot.sh generic-cxx11 | libcxx/utils/ci/phabricator-report"
+    command: "libcxx/utils/ci/run-buildbot.sh generic-cxx11"
+    artifact_paths:
+    - "**/test-results.xml"
     agents:
       queue: "libcxx-builders"
 
   - label: "C++14"
-    command: "set -o pipefail && libcxx/utils/ci/run-buildbot.sh generic-cxx14 | libcxx/utils/ci/phabricator-report"
+    command: "libcxx/utils/ci/run-buildbot.sh generic-cxx14"
+    artifact_paths:
+    - "**/test-results.xml"
     agents:
       queue: "libcxx-builders"
 
   - label: "C++17"
-    command: "set -o pipefail && libcxx/utils/ci/run-buildbot.sh generic-cxx17 | libcxx/utils/ci/phabricator-report"
+    command: "libcxx/utils/ci/run-buildbot.sh generic-cxx17"
+    artifact_paths:
+    - "**/test-results.xml"
     agents:
       queue: "libcxx-builders"
 
   - label: "C++20"
-    command: "set -o pipefail && libcxx/utils/ci/run-buildbot.sh generic-cxx2a | libcxx/utils/ci/phabricator-report"
+    command: "libcxx/utils/ci/run-buildbot.sh generic-cxx2a"
+    artifact_paths:
+    - "**/test-results.xml"
     agents:
       queue: "libcxx-builders"
 
   - label: "-fno-exceptions"
-    command: "set -o pipefail && libcxx/utils/ci/run-buildbot.sh generic-noexceptions | libcxx/utils/ci/phabricator-report"
+    command: "libcxx/utils/ci/run-buildbot.sh generic-noexceptions"
+    artifact_paths:
+    - "**/test-results.xml"
     agents:
       queue: "libcxx-builders"
 
   - label: "GCC/C++20"
-    command: "set -o pipefail && libcxx/utils/ci/run-buildbot.sh generic-gcc | libcxx/utils/ci/phabricator-report"
+    command: "libcxx/utils/ci/run-buildbot.sh generic-gcc"
+    artifact_paths:
+    - "**/test-results.xml"
     agents:
       queue: "libcxx-builders"
 
   - label: "ASAN"
-    command: "set -o pipefail && libcxx/utils/ci/run-buildbot.sh generic-asan | libcxx/utils/ci/phabricator-report"
+    command: "libcxx/utils/ci/run-buildbot.sh generic-asan"
+    artifact_paths:
+    - "**/test-results.xml"
     agents:
       queue: "libcxx-builders"
 
   - label: "TSAN"
-    command: "set -o pipefail && libcxx/utils/ci/run-buildbot.sh generic-tsan | libcxx/utils/ci/phabricator-report"
+    command: "libcxx/utils/ci/run-buildbot.sh generic-tsan"
+    artifact_paths:
+    - "**/test-results.xml"
     agents:
       queue: "libcxx-builders"
 
   - label: "UBSAN"
-    command: "set -o pipefail && libcxx/utils/ci/run-buildbot.sh generic-ubsan | libcxx/utils/ci/phabricator-report"
+    command: "libcxx/utils/ci/run-buildbot.sh generic-ubsan"
+    artifact_paths:
+    - "**/test-results.xml"
     agents:
       queue: "libcxx-builders"
 
   - label: "With LLVM's libunwind"
-    command: "set -o pipefail && libcxx/utils/ci/run-buildbot.sh generic-with_llvm_unwinder | libcxx/utils/ci/phabricator-report"
+    command: "libcxx/utils/ci/run-buildbot.sh generic-with_llvm_unwinder"
+    artifact_paths:
+    - "**/test-results.xml"
     agents:
       queue: "libcxx-builders"
 
   - label: "Single-threaded"
-    command: "set -o pipefail && libcxx/utils/ci/run-buildbot.sh generic-singlethreaded | libcxx/utils/ci/phabricator-report"
+    command: "libcxx/utils/ci/run-buildbot.sh generic-singlethreaded"
+    artifact_paths:
+    - "**/test-results.xml"
     agents:
       queue: "libcxx-builders"
 
   - label: "No debug mode"
-    command: "set -o pipefail && libcxx/utils/ci/run-buildbot.sh generic-nodebug | libcxx/utils/ci/phabricator-report"
+    command: "libcxx/utils/ci/run-buildbot.sh generic-nodebug"
+    artifact_paths:
+    - "**/test-results.xml"
     agents:
       queue: "libcxx-builders"
 
   - label: "No random device"
-    command: "set -o pipefail && libcxx/utils/ci/run-buildbot.sh generic-no-random_device | libcxx/utils/ci/phabricator-report"
+    command: "libcxx/utils/ci/run-buildbot.sh generic-no-random_device"
     agents:
       queue: "libcxx-builders"
 
   - label: "MacOS C++20"
-    command: "set -o pipefail && libcxx/utils/ci/run-buildbot.sh generic-cxx2a | libcxx/utils/ci/phabricator-report"
+    command: "libcxx/utils/ci/run-buildbot.sh generic-cxx2a"
+    artifact_paths:
+    - "**/test-results.xml"
     agents:
       queue: "libcxx-macos-builders"
 
   # Build with the configuration we use to generate libc++.dylib on Apple platforms
   - label: "Apple system"
-    command: "set -o pipefail && libcxx/utils/ci/run-buildbot.sh x86_64-apple-system | libcxx/utils/ci/phabricator-report"
+    command: "libcxx/utils/ci/run-buildbot.sh x86_64-apple-system"
+    artifact_paths:
+    - "**/test-results.xml"
     agents:
       queue: "libcxx-macos-builders"
+
   - label: "Apple system -fno-exceptions"
-    command: "set -o pipefail && libcxx/utils/ci/run-buildbot.sh x86_64-apple-system-noexceptions | libcxx/utils/ci/phabricator-report"
+    command: "libcxx/utils/ci/run-buildbot.sh x86_64-apple-system-noexceptions"
+    artifact_paths:
+    - "**/test-results.xml"
     agents:
       queue: "libcxx-macos-builders"

diff  --git a/libcxx/utils/ci/run-buildbot.sh b/libcxx/utils/ci/run-buildbot.sh
index 736aef41b061..df166b9ed40d 100755
--- a/libcxx/utils/ci/run-buildbot.sh
+++ b/libcxx/utils/ci/run-buildbot.sh
@@ -23,43 +23,43 @@ case "${BUILDER}" in
 generic-cxx03)
     export CC=clang
     export CXX=clang++
-    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported")
+    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported --xunit-xml-output test-results.xml")
     args+=("-C${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx03.cmake")
 ;;
 generic-cxx11)
     export CC=clang
     export CXX=clang++
-    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported")
+    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported --xunit-xml-output test-results.xml")
     args+=("-C${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx11.cmake")
 ;;
 generic-cxx14)
     export CC=clang
     export CXX=clang++
-    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported")
+    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported --xunit-xml-output test-results.xml")
     args+=("-C${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx14.cmake")
 ;;
 generic-cxx17)
     export CC=clang
     export CXX=clang++
-    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported")
+    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported --xunit-xml-output test-results.xml")
     args+=("-C${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx17.cmake")
 ;;
 generic-cxx2a)
     export CC=clang
     export CXX=clang++
-    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported")
+    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported --xunit-xml-output test-results.xml")
     args+=("-C${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx2a.cmake")
 ;;
 generic-noexceptions)
     export CC=clang
     export CXX=clang++
-    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported")
+    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported --xunit-xml-output test-results.xml")
     args+=("-C${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-noexceptions.cmake")
 ;;
 generic-32bit)
     export CC=clang
     export CXX=clang++
-    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported")
+    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported --xunit-xml-output test-results.xml")
     args+=("-C${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-32bits.cmake")
 ;;
 generic-gcc)
@@ -67,66 +67,66 @@ generic-gcc)
     export CXX=g++
     # FIXME: Re-enable experimental testing on GCC. GCC cares about the order
     #        in which we link -lc++experimental, which causes issues.
-    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported --param enable_experimental=False")
+    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported --param enable_experimental=False --xunit-xml-output test-results.xml")
 ;;
 generic-asan)
     export CC=clang
     export CXX=clang++
-    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported")
+    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported --xunit-xml-output test-results.xml")
     args+=("-C${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-asan.cmake")
 ;;
 generic-msan)
     export CC=clang
     export CXX=clang++
-    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported")
+    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported --xunit-xml-output test-results.xml")
     args+=("-C${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-msan.cmake")
 ;;
 generic-tsan)
     export CC=clang
     export CXX=clang++
-    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported")
+    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported --xunit-xml-output test-results.xml")
     args+=("-C${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-tsan.cmake")
 ;;
 generic-ubsan)
     export CC=clang
     export CXX=clang++
-    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported")
+    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported --xunit-xml-output test-results.xml")
     args+=("-C${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-ubsan.cmake")
 ;;
 generic-with_llvm_unwinder)
     export CC=clang
     export CXX=clang++
-    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported")
+    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported --xunit-xml-output test-results.xml")
     args+=("-DLIBCXXABI_USE_LLVM_UNWINDER=ON")
 ;;
 generic-singlethreaded)
     export CC=clang
     export CXX=clang++
-    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported")
+    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported --xunit-xml-output test-results.xml")
     args+=("-C${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-singlethreaded.cmake")
 ;;
 generic-nodebug)
     export CC=clang
     export CXX=clang++
-    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported")
+    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported --xunit-xml-output test-results.xml")
     args+=("-C${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-nodebug.cmake")
 ;;
 generic-no-random_device)
     export CC=clang
     export CXX=clang++
-    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported")
+    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported --xunit-xml-output test-results.xml")
     args+=("-C${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-no-random_device.cmake")
 ;;
 x86_64-apple-system)
     export CC=clang
     export CXX=clang++
-    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported")
+    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported --xunit-xml-output test-results.xml")
     args+=("-C${MONOREPO_ROOT}/libcxx/cmake/caches/Apple.cmake")
 ;;
 x86_64-apple-system-noexceptions)
     export CC=clang
     export CXX=clang++
-    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported")
+    args+=("-DLLVM_LIT_ARGS=-sv --show-unsupported --xunit-xml-output test-results.xml")
     args+=("-C${MONOREPO_ROOT}/libcxx/cmake/caches/Apple.cmake")
     args+=("-DLIBCXX_ENABLE_EXCEPTIONS=OFF")
     args+=("-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF")


        


More information about the libcxx-commits mailing list