[libcxx-commits] [llvm] [libcxx] [libc++] Use GitHub-provided runners for the windows CI (PR #79326)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 26 10:50:27 PST 2024


https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/79326

>From f9f75fdee711b3a6031a3a95fef5aaa7a8b299a2 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Wed, 24 Jan 2024 17:42:53 +0100
Subject: [PATCH] [libc++] Use GitHub-provided runners for the windows CI

---
 .github/workflows/libcxx-build-and-test.yaml | 41 ++++++++++++++++
 libcxx/trigger                               |  0
 libcxx/utils/ci/buildkite-pipeline.yml       | 50 --------------------
 runtimes/CMakeLists.txt                      |  3 ++
 4 files changed, 44 insertions(+), 50 deletions(-)
 create mode 100644 libcxx/trigger

diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index 5727b956dc6dd23..f473c959b9a0c0b 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -199,3 +199,44 @@ jobs:
             **/CMakeError.log
             **/CMakeOutput.log
             **/crash_diagnostics/*
+  windows:
+    runs-on: windows-2022
+    strategy:
+      fail-fast: false
+      matrix:
+        include:
+        - { config: clang-cl-dll, mingw: false }
+        - { config: clang-cl-static, mingw: false }
+        - { config: clang-cl-no-vcruntime, mingw: false }
+        - { config: clang-cl-debug, mingw: false }
+        - { config: clang-cl-static-crt, mingw: false }
+        - { config: mingw-dll, mingw: true }
+        - { config: mingw-static, mingw: true }
+        - { config: mingw-dll-i686, mingw: true }
+    steps:
+      - uses: actions/checkout at v4
+      - name: Install dependencies
+        run: |
+          choco install -y ninja wget
+          pip install psutil
+      - name: Install a current LLVM
+        if: ${{ matrix.mingw != true }}
+        run: |
+          choco install -y llvm --version=17.0.6
+      - name: Install llvm-mingw
+        if ${{ matrix.mingw == true }}
+        run: |
+          curl https://github.com/mstorsjo/llvm-mingw/releases/download/20231128/llvm-mingw-20231128-ucrt-x86_64.zip
+          powershell Expand-Archive llvm-mingw*.zip -DestinationPath .
+          del llvm-mingw*.zip
+          mv llvm-mingw* c:\llvm-mingw
+          echo "c:\llvm-mingw\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
+      - name: Add Git Bash to the path
+        run: |
+          echo "c:\Program Files\Git\usr\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
+      - name: Set up the MSVC dev environment
+        if: ${{ matrix.mingw != true }}
+        uses: ilammy/msvc-dev-cmd at v1
+      - name: Build and test
+        run: |
+          bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}
diff --git a/libcxx/trigger b/libcxx/trigger
new file mode 100644
index 000000000000000..e69de29bb2d1d64
diff --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml
index a7c44dab7093911..e42262620d5fb01 100644
--- a/libcxx/utils/ci/buildkite-pipeline.yml
+++ b/libcxx/utils/ci/buildkite-pipeline.yml
@@ -57,56 +57,6 @@ environment_definitions:
 
 
 steps:
-- group: ':windows: Windows'
-  steps:
-  - label: Clang-cl (DLL)
-    command: bash libcxx/utils/ci/run-buildbot clang-cl-dll
-    agents:
-      queue: windows
-    <<: *common
-
-  - label: Clang-cl (Static)
-    command: bash libcxx/utils/ci/run-buildbot clang-cl-static
-    agents:
-      queue: windows
-    <<: *common
-
-  - label: Clang-cl (no vcruntime exceptions)
-    command: bash libcxx/utils/ci/run-buildbot clang-cl-no-vcruntime
-    <<: *common
-    agents:
-      queue: windows
-
-  - label: Clang-cl (Debug mode)
-    command: bash libcxx/utils/ci/run-buildbot clang-cl-debug
-    agents:
-      queue: windows
-    <<: *common
-
-  - label: Clang-cl (Static CRT)
-    command: bash libcxx/utils/ci/run-buildbot clang-cl-static-crt
-    agents:
-      queue: windows
-    <<: *common
-
-  - label: MinGW (DLL, x86_64)
-    command: bash libcxx/utils/ci/run-buildbot mingw-dll
-    agents:
-      queue: windows
-    <<: *common
-
-  - label: MinGW (Static, x86_64)
-    command: bash libcxx/utils/ci/run-buildbot mingw-static
-    agents:
-      queue: windows
-    <<: *common
-
-  - label: MinGW (DLL, i686)
-    command: bash libcxx/utils/ci/run-buildbot mingw-dll-i686
-    agents:
-      queue: windows
-    <<: *common
-
 - group: ':mac: Apple'
   steps:
   - label: MacOS x86_64
diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt
index 742334328fd32af..634ffe710b06b8e 100644
--- a/runtimes/CMakeLists.txt
+++ b/runtimes/CMakeLists.txt
@@ -155,6 +155,9 @@ set(LLVM_COMPILER_CHECKED ON)
 include(AddLLVM)
 include(HandleLLVMOptions)
 
+# Loot at the PATH first to avoid a version mismatch between the command-line
+# python and the CMake-found version
+set(Python3_FIND_REGISTRY LAST)
 find_package(Python3 REQUIRED COMPONENTS Interpreter)
 
 # Host triple is used by tests to check if they are running natively.



More information about the libcxx-commits mailing list