[libc++] Add a CI job to test the Runtimes build
authorLouis Dionne <ldionne.2@gmail.com>
Tue, 16 Mar 2021 18:57:42 +0000 (11:57 -0700)
committerLouis Dionne <ldionne.2@gmail.com>
Tue, 30 Mar 2021 13:00:30 +0000 (09:00 -0400)
Differential Revision: https://reviews.llvm.org/D97888

libcxx/utils/ci/buildkite-pipeline.yml
libcxx/utils/ci/run-buildbot

index b538bfc..c57f467 100644 (file)
@@ -288,6 +288,17 @@ steps:
         - exit_status: -1  # Agent was lost
           limit: 2
 
+  - label: "Runtimes build"
+    command: "libcxx/utils/ci/run-buildbot runtimes-build"
+    artifact_paths:
+      - "**/test-results.xml"
+    agents:
+      queue: "libcxx-builders"
+    retry:
+      automatic:
+        - exit_status: -1  # Agent was lost
+          limit: 2
+
   # All jobs defined before this `wait` will run whenever a CI job is started.
   # Jobs defined after the `wait` will run only if all the jobs above succeeded.
   # We use this to reduce the load on testers that have more constrained resources
index fec5c77..0b677cd 100755 (executable)
@@ -353,6 +353,28 @@ unified-standalone)
 
     check-cxx-cxxabi
 ;;
+runtimes-build)
+    export CC=clang
+    export CXX=clang++
+
+    clean
+
+    echo "--- Generating CMake"
+    cmake -S "${MONOREPO_ROOT}/llvm" \
+          -B "${BUILD_DIR}" \
+          -GNinja \
+          -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+          -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
+          -DLLVM_ENABLE_PROJECTS="clang" \
+          -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" \
+          -DLLVM_RUNTIME_TARGETS="x86_64-unknown-linux-gnu"
+
+    echo "+++ Running the libc++ and libc++abi tests"
+    ${NINJA} -C "${BUILD_DIR}" check-runtimes
+
+    echo "--- Installing libc++ and libc++abi to a fake location"
+    ${NINJA} -C "${BUILD_DIR}" install-cxx install-cxxabi
+;;
 legacy-standalone)
     export CC=clang
     export CXX=clang++