Skip to content

[libc++] Remove anchors for agent queues from the BuildKite pipeline configuration #75359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented Dec 13, 2023

We didn't save that much boilerplate with those anchors, but it made the pipeline description harder to understand because the definition of the jobs and the agents they run on were so far apart. Anchors are useful for the other common boilerplate we truly share between all jobs, but it seems reasonable to define agent queues in-line.

@ldionne ldionne requested a review from a team as a code owner December 13, 2023 17:07
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Dec 13, 2023
@llvmbot
Copy link
Member

llvmbot commented Dec 13, 2023

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

Changes

We didn't save that much boilerplate with those anchors, but it made the pipeline description harder to understand because the definition of the jobs and the agents they run on were so far apart. Anchors are useful for the other common boilerplate we truly share between all jobs, but it seems reasonable to define agent queues in-line.


Full diff: https://github.com/llvm/llvm-project/pull/75359.diff

1 Files Affected:

  • (modified) libcxx/utils/ci/buildkite-pipeline.yml (+76-65)
diff --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml
index 51b9999026247f..446f345bce980a 100644
--- a/libcxx/utils/ci/buildkite-pipeline.yml
+++ b/libcxx/utils/ci/buildkite-pipeline.yml
@@ -41,45 +41,6 @@ definitions:
       - "**/*.abilist"
       - "**/crash_diagnostics/*"
 
-# Define agents using YAML anchors to reduce duplication
-agents_definitions:
-  _windows_agent: &windows_agent
-    agents:
-      queue: windows
-
-  # Mac OS Builders
-  _mac_agent_x86: &mac_agent_x86
-    agents:
-      queue: libcxx-builders
-      os: macos
-      arch: x86_64
-  _mac_agent_arm64: &mac_agent_arm64
-    agents:
-      queue: libcxx-builders
-      os: macos
-      arch: arm64
-  _mac_agent_any_arch: &mac_agent_any_arch
-    agents:
-      queue: libcxx-builders
-      os: macos
-  _arm_agent_aarch64: &arm_agent_aarch64
-    agents:
-      queue: libcxx-builders-linaro-arm
-      arch: aarch64
-  _arm_agent_armv8l: &arm_agent_armv8l
-    agents:
-      queue: libcxx-builders-linaro-arm
-      arch: armv8l
-  _aix_agent: &aix_agent
-    agents:
-      queue: libcxx-builders
-      os: aix
-  _android_agent: &android_agent
-    agents:
-      queue: libcxx-builders
-      os: android
-
-
 environment_definitions:
   _common_env: &common_env
       ENABLE_CLANG_TIDY: "On"
@@ -101,117 +62,159 @@ steps:
   steps:
   - label: Clang-cl (DLL)
     command: bash libcxx/utils/ci/run-buildbot clang-cl-dll
-    <<: *windows_agent
+    agents:
+      queue: windows
     <<: *common
 
   - label: Clang-cl (Static)
     command: bash libcxx/utils/ci/run-buildbot clang-cl-static
-    <<: *windows_agent
+    agents:
+      queue: windows
     <<: *common
 
   - label: Clang-cl (no vcruntime exceptions)
     command: bash libcxx/utils/ci/run-buildbot clang-cl-no-vcruntime
     <<: *common
-    <<: *windows_agent
+    agents:
+      queue: windows
 
   - label: Clang-cl (Debug mode)
     command: bash libcxx/utils/ci/run-buildbot clang-cl-debug
-    <<: *windows_agent
+    agents:
+      queue: windows
     <<: *common
 
   - label: Clang-cl (Static CRT)
     command: bash libcxx/utils/ci/run-buildbot clang-cl-static-crt
-    <<: *windows_agent
+    agents:
+      queue: windows
     <<: *common
 
   - label: MinGW (DLL, x86_64)
     command: bash libcxx/utils/ci/run-buildbot mingw-dll
-    <<: *windows_agent
+    agents:
+      queue: windows
     <<: *common
 
   - label: MinGW (Static, x86_64)
     command: bash libcxx/utils/ci/run-buildbot mingw-static
-    <<: *windows_agent
+    agents:
+      queue: windows
     <<: *common
 
   - label: MinGW (DLL, i686)
     command: bash libcxx/utils/ci/run-buildbot mingw-dll-i686
-    <<: *windows_agent
+    agents:
+      queue: windows
     <<: *common
 
 - group: ':mac: Apple'
   steps:
   - label: MacOS x86_64
     command: libcxx/utils/ci/run-buildbot generic-cxx23
-    <<: *mac_agent_x86
+    agents:
+      queue: libcxx-builders
+      os: macos
+      arch: x86_64
     <<: *common
 
   - label: MacOS arm64
     command: libcxx/utils/ci/run-buildbot generic-cxx23
-    <<: *mac_agent_arm64
+    agents:
+      queue: libcxx-builders
+      os: macos
+      arch: arm64
     <<: *common
 
   - label: MacOS with Modules
     command: libcxx/utils/ci/run-buildbot generic-modules
-    <<: *mac_agent_any_arch
+    agents:
+      queue: libcxx-builders
+      os: macos
     <<: *common
 
     # Build with the configuration we use to generate libc++.dylib on Apple platforms
   - label: Apple system
     command: libcxx/utils/ci/run-buildbot apple-system
-    <<: *mac_agent_arm64  # This can technically run on any architecture, but we have more resources on arm64 so we pin this job to arm64
+    agents:
+      queue: libcxx-builders
+      os: macos
+      arch: arm64 # This can technically run on any architecture, but we have more resources on arm64 so we pin this job to arm64
     <<: *common
 
   - label: Apple back-deployment macosx10.13
     command: libcxx/utils/ci/run-buildbot apple-system-backdeployment-10.13
-    <<: *mac_agent_x86 # We need to use x86_64 for back-deployment CI on this target since macOS didn't support arm64 back then
+    agents:
+      queue: libcxx-builders
+      os: macos
+      arch: x86_64 # We need to use x86_64 for back-deployment CI on this target since macOS didn't support arm64 back then
     <<: *common
 
   - label: Apple back-deployment macosx10.15
     command: libcxx/utils/ci/run-buildbot apple-system-backdeployment-10.15
-    <<: *mac_agent_x86 # We need to use x86_64 for back-deployment CI on this target since macOS didn't support arm64 back then
+    agents:
+      queue: libcxx-builders
+      os: macos
+      arch: x86_64 # We need to use x86_64 for back-deployment CI on this target since macOS didn't support arm64 back then
     <<: *common
 
   - label: Apple back-deployment with hardening enabled
     command: libcxx/utils/ci/run-buildbot apple-system-backdeployment-hardened-11.0
-    <<: *mac_agent_x86  # TODO: Remove this once we are able to run back-deployment on arm64 again, since this isn't x86_64 specific
+    agents:
+      queue: libcxx-builders
+      os: macos
+      arch: x86_64 # TODO: Remove this once we are able to run back-deployment on arm64 again, since this isn't x86_64 specific
     <<: *common
 
 - group: ARM
   steps:
   - label: AArch64
     command: libcxx/utils/ci/run-buildbot aarch64
-    <<: *arm_agent_aarch64
+    agents:
+      queue: libcxx-builders-linaro-arm
+      arch: aarch64
     <<: *common
 
   - label: AArch64 -fno-exceptions
     command: libcxx/utils/ci/run-buildbot aarch64-no-exceptions
-    <<: *arm_agent_aarch64
+    agents:
+      queue: libcxx-builders-linaro-arm
+      arch: aarch64
     <<: *common
 
   - label: Armv8
     command: libcxx/utils/ci/run-buildbot armv8
-    <<: *arm_agent_armv8l
+    agents:
+      queue: libcxx-builders-linaro-arm
+      arch: armv8l
     <<: *common
 
   - label: Armv8 -fno-exceptions
     command: libcxx/utils/ci/run-buildbot armv8-no-exceptions
-    <<: *arm_agent_armv8l
+    agents:
+      queue: libcxx-builders-linaro-arm
+      arch: armv8l
     <<: *common
 
   - label: Armv7
     command: libcxx/utils/ci/run-buildbot armv7
-    <<: *arm_agent_armv8l
+    agents:
+      queue: libcxx-builders-linaro-arm
+      arch: armv8l
     <<: *common
 
   - label: Armv7 -fno-exceptions
     command: libcxx/utils/ci/run-buildbot armv7-no-exceptions
-    <<: *arm_agent_armv8l
+    agents:
+      queue: libcxx-builders-linaro-arm
+      arch: armv8l
     <<: *common
 
   - label: Armv7-M picolibc
     command: libcxx/utils/ci/run-buildbot armv7m-picolibc
-    <<: *arm_agent_aarch64
+    agents:
+      queue: libcxx-builders-linaro-arm
+      arch: aarch64
     <<: *common
 
 - group: AIX
@@ -222,7 +225,9 @@ steps:
       CC: clang
       CXX: clang++
       OBJECT_MODE: '32'
-    <<: *aix_agent
+    agents:
+      queue: libcxx-builders
+      os: aix
     <<: *common
 
   - label: AIX (64-bit)
@@ -231,7 +236,9 @@ steps:
       CC: clang
       CXX: clang++
       OBJECT_MODE: '64'
-    <<: *aix_agent
+    agents:
+      queue: libcxx-builders
+      os: aix
     <<: *common
 
 - group: ':freebsd: FreeBSD'
@@ -251,12 +258,16 @@ steps:
   steps:
   - label: Android 5.0, x86 NDK
     command: libcxx/utils/ci/run-buildbot android-ndk-21-def-x86
-    <<: *android_agent
+    agents:
+      queue: libcxx-builders
+      os: android
     <<: *common
 
   - label: Android 13, x86_64 NDK
     command: libcxx/utils/ci/run-buildbot android-ndk-33-goog-x86_64
-    <<: *android_agent
+    agents:
+      queue: libcxx-builders
+      os: android
     <<: *common
 
 

…configuration

We didn't save that much boilerplate with those anchors, but it made
the pipeline description harder to understand because the definition
of the jobs and the agents they run on were so far apart. Anchors are
useful for the other common boilerplate we truly share between all jobs,
but it seems reasonable to define agent queues in-line.
@ldionne ldionne force-pushed the review/less-yaml-anchors branch from 0b99966 to ec04c2d Compare December 14, 2023 14:52
@ldionne ldionne merged commit 4bd32cc into llvm:main Dec 14, 2023
@ldionne ldionne deleted the review/less-yaml-anchors branch December 14, 2023 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants