[clang] eb27be9 - [clang] Add a Windows build in the Clang pre-commit CI

Louis Dionne via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 30 06:17:28 PDT 2023


Author: Louis Dionne
Date: 2023-08-30T09:15:55-04:00
New Revision: eb27be95a4c648707ad93e48049b3d463260a747

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

LOG: [clang] Add a Windows build in the Clang pre-commit CI

This patch adds a CI job for Clang on Windows that is separate from
the monolithic job that gets added automatically via the Phabricator
integration with Buildkite. This way, we will retain the Windows testing
for Clang when we move to GitHub Pull Requests.

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/utils/ci/buildkite-pipeline.yml b/clang/utils/ci/buildkite-pipeline.yml
index 621817c3ce52f5..92793480217932 100644
--- a/clang/utils/ci/buildkite-pipeline.yml
+++ b/clang/utils/ci/buildkite-pipeline.yml
@@ -31,7 +31,7 @@ steps:
 
   - wait
 
-  - label: "Building and testing clang"
+  - label: "Building and testing clang (Linux)"
     commands:
       - "clang/utils/ci/run-buildbot build-clang"
     agents:
@@ -42,6 +42,18 @@ steps:
           limit: 2
     timeout_in_minutes: 120
 
+  - label: "Building and testing clang (Windows)"
+    commands:
+      - "C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64"
+      - "bash clang/utils/ci/run-buildbot build-clang-windows"
+    agents:
+      queue: "windows"
+    retry:
+      automatic:
+        - exit_status: -1  # Agent was lost
+          limit: 2
+    timeout_in_minutes: 120
+
   - wait
 
   - label: "Running libc++ test suite in C++03"

diff  --git a/clang/utils/ci/run-buildbot b/clang/utils/ci/run-buildbot
index 9314f8fe5bc76e..d117fccc7e3fbd 100755
--- a/clang/utils/ci/run-buildbot
+++ b/clang/utils/ci/run-buildbot
@@ -95,6 +95,21 @@ build-clang)
 
     ninja -C ${BUILD_DIR} check-clang
 ;;
+build-clang-windows)
+    cmake -S llvm -B ${BUILD_DIR} -G Ninja                                      \
+        -D CMAKE_C_COMPILER_LAUNCHER=sccache                                    \
+        -D CMAKE_CXX_COMPILER_LAUNCHER=sccache                                  \
+        -D CMAKE_BUILD_TYPE=Release                                             \
+        -D CMAKE_INSTALL_PREFIX=install-windows                                 \
+        -D LLVM_ENABLE_PROJECTS="clang;compiler-rt"                             \
+        -D LLVM_ENABLE_ASSERTIONS=ON                                            \
+        -D LLVM_BUILD_EXAMPLES=ON                                               \
+        -D COMPILER_RT_BUILD_LIBFUZZER=OFF                                      \
+        -D COMPILER_RT_BUILD_ORC=OFF
+
+    ninja -C ${BUILD_DIR} install-clang install-clang-resource-headers
+    ninja -C ${BUILD_DIR} check-clang
+;;
 generic-cxx03)
     buildkite-agent artifact download install.tar.xz .
     tar -xvf install.tar.xz


        


More information about the cfe-commits mailing list