• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#===----------------------------------------------------------------------===##
2#
3# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4# See https://llvm.org/LICENSE.txt for license information.
5# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6#
7#===----------------------------------------------------------------------===##
8
9#
10# This file describes the various pre-commit CI bots used to test libc++.
11#
12# This file should never contain logic -- all the logic must be offloaded
13# into scripts. This is critical to being able to reproduce CI issues outside
14# of the CI environment, which is important for debugging.
15#
16# It is also worth noting that this script is split into several sections, the
17# goal being to reduce the load on testers when a commit is known to fail.
18#
19
20# The Linux CI runners use the nightly ToT build provided by the Docker image.
21# (Note the image isn't updated daily.) The LLVM_HEAD_VERSION contains that
22# version number. The Linux CI runners for GCC use the latest stable version.
23# Theses numbers are available in all runners, making it easier to update the
24# version number.
25env:
26    # LLVM POST-BRANCH bump version
27    # LLVM POST-BRANCH add compiler test for ToT - 1, e.g. "Clang 17"
28    # LLVM RELEASE bump remove compiler ToT - 3, e.g. "Clang 15"
29    LLVM_HEAD_VERSION: "18"   # Used compiler, update POST-BRANCH.
30    GCC_STABLE_VERSION: "13"
31
32definitions:
33  _common: &common
34    timeout_in_minutes: 120
35    retry:
36      automatic:
37        - exit_status: -1  # Agent was lost
38          limit: 2
39    artifact_paths:
40      - "**/test-results.xml"
41      - "**/*.abilist"
42      - "**/crash_diagnostics/*"
43
44# Define agents using YAML anchors to reduce duplication
45agents_definitions:
46  _windows_agent: &windows_agent
47    agents:
48      queue: windows
49
50  # Mac OS Builders
51  _mac_agent_x86: &mac_agent_x86
52    agents:
53      queue: libcxx-builders
54      os: macos
55      arch: x86_64
56  _mac_agent_arm64: &mac_agent_arm64
57    agents:
58      queue: libcxx-builders
59      os: macos
60      arch: arm64
61  _mac_agent_any_arch: &mac_agent_any_arch
62    agents:
63      queue: libcxx-builders
64      os: macos
65  _arm_agent_aarch64: &arm_agent_aarch64
66    agents:
67      queue: libcxx-builders-linaro-arm
68      arch: aarch64
69  _arm_agent_armv8l: &arm_agent_armv8l
70    agents:
71      queue: libcxx-builders-linaro-arm
72      arch: armv8l
73  _aix_agent: &aix_agent
74    agents:
75      queue: libcxx-builders
76      os: aix
77  _android_agent: &android_agent
78    agents:
79      queue: libcxx-builders
80      os: android
81
82
83environment_definitions:
84  _common_env: &common_env
85      ENABLE_CLANG_TIDY: "On"
86      LLVM_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer-${LLVM_HEAD_VERSION}"
87      CLANG_CRASH_DIAGNOSTICS_DIR: "crash_diagnostics"
88      CC: clang-${LLVM_HEAD_VERSION}
89      CXX: clang++-${LLVM_HEAD_VERSION}
90      CMAKE: /opt/bin/cmake
91
92  _absolute_path_clang: &absolute_path_clang
93    # Note modules require and absolute path for clang-scan-deps
94    # https://github.com/llvm/llvm-project/issues/61006
95    CC: /usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang
96    CXX: /usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang++
97
98
99steps:
100- group: ':windows: Windows'
101  steps:
102  - label: Clang-cl (DLL)
103    command: bash libcxx/utils/ci/run-buildbot clang-cl-dll
104    <<: *windows_agent
105    <<: *common
106
107  - label: Clang-cl (Static)
108    command: bash libcxx/utils/ci/run-buildbot clang-cl-static
109    <<: *windows_agent
110    <<: *common
111
112  - label: Clang-cl (no vcruntime exceptions)
113    command: bash libcxx/utils/ci/run-buildbot clang-cl-no-vcruntime
114    <<: *common
115    <<: *windows_agent
116
117  - label: Clang-cl (Debug mode)
118    command: bash libcxx/utils/ci/run-buildbot clang-cl-debug
119    <<: *windows_agent
120    <<: *common
121
122  - label: Clang-cl (Static CRT)
123    command: bash libcxx/utils/ci/run-buildbot clang-cl-static-crt
124    <<: *windows_agent
125    <<: *common
126
127  - label: MinGW (DLL, x86_64)
128    command: bash libcxx/utils/ci/run-buildbot mingw-dll
129    <<: *windows_agent
130    <<: *common
131
132  - label: MinGW (Static, x86_64)
133    command: bash libcxx/utils/ci/run-buildbot mingw-static
134    <<: *windows_agent
135    <<: *common
136
137  - label: MinGW (DLL, i686)
138    command: bash libcxx/utils/ci/run-buildbot mingw-dll-i686
139    <<: *windows_agent
140    <<: *common
141
142- group: ':mac: Apple'
143  steps:
144  - label: MacOS x86_64
145    command: libcxx/utils/ci/run-buildbot generic-cxx23
146    <<: *mac_agent_x86
147    <<: *common
148
149  - label: MacOS arm64
150    command: libcxx/utils/ci/run-buildbot generic-cxx23
151    <<: *mac_agent_arm64
152    <<: *common
153
154  - label: MacOS with Modules
155    command: libcxx/utils/ci/run-buildbot generic-modules
156    <<: *mac_agent_any_arch
157    <<: *common
158
159    # Build with the configuration we use to generate libc++.dylib on Apple platforms
160  - label: Apple system
161    command: libcxx/utils/ci/run-buildbot apple-system
162    <<: *mac_agent_arm64  # This can technically run on any architecture, but we have more resources on arm64 so we pin this job to arm64
163    <<: *common
164
165  - label: Apple back-deployment macosx10.13
166    command: libcxx/utils/ci/run-buildbot apple-system-backdeployment-10.13
167    <<: *mac_agent_x86 # We need to use x86_64 for back-deployment CI on this target since macOS didn't support arm64 back then
168    <<: *common
169
170  - label: Apple back-deployment macosx10.15
171    command: libcxx/utils/ci/run-buildbot apple-system-backdeployment-10.15
172    <<: *mac_agent_x86 # We need to use x86_64 for back-deployment CI on this target since macOS didn't support arm64 back then
173    <<: *common
174
175  - label: Apple back-deployment with hardening enabled
176    command: libcxx/utils/ci/run-buildbot apple-system-backdeployment-hardened-11.0
177    <<: *mac_agent_x86  # TODO: Remove this once we are able to run back-deployment on arm64 again, since this isn't x86_64 specific
178    <<: *common
179
180- group: ARM
181  steps:
182  - label: AArch64
183    command: libcxx/utils/ci/run-buildbot aarch64
184    <<: *arm_agent_aarch64
185    <<: *common
186
187  - label: AArch64 -fno-exceptions
188    command: libcxx/utils/ci/run-buildbot aarch64-no-exceptions
189    <<: *arm_agent_aarch64
190    <<: *common
191
192  - label: Armv8
193    command: libcxx/utils/ci/run-buildbot armv8
194    <<: *arm_agent_armv8l
195    <<: *common
196
197  - label: Armv8 -fno-exceptions
198    command: libcxx/utils/ci/run-buildbot armv8-no-exceptions
199    <<: *arm_agent_armv8l
200    <<: *common
201
202  - label: Armv7
203    command: libcxx/utils/ci/run-buildbot armv7
204    <<: *arm_agent_armv8l
205    <<: *common
206
207  - label: Armv7 -fno-exceptions
208    command: libcxx/utils/ci/run-buildbot armv7-no-exceptions
209    <<: *arm_agent_armv8l
210    <<: *common
211
212  - label: Armv7-M picolibc
213    command: libcxx/utils/ci/run-buildbot armv7m-picolibc
214    <<: *arm_agent_aarch64
215    <<: *common
216
217- group: AIX
218  steps:
219  - label: AIX (32-bit)
220    command: libcxx/utils/ci/run-buildbot aix
221    env:
222      CC: clang
223      CXX: clang++
224      OBJECT_MODE: '32'
225    <<: *aix_agent
226    <<: *common
227
228  - label: AIX (64-bit)
229    command: libcxx/utils/ci/run-buildbot aix
230    env:
231      CC: clang
232      CXX: clang++
233      OBJECT_MODE: '64'
234    <<: *aix_agent
235    <<: *common
236
237- group: ':freebsd: FreeBSD'
238  steps:
239  - label: FreeBSD 13 amd64
240    command: libcxx/utils/ci/run-buildbot generic-cxx23
241    env:
242      CC: clang16
243      CXX: clang++16
244      ENABLE_STD_MODULES: 'Off'
245    agents:
246      queue: libcxx-builders
247      os: freebsd
248    <<: *common
249
250- group: ':android: Android'
251  steps:
252  - label: Android 5.0, x86 NDK
253    command: libcxx/utils/ci/run-buildbot android-ndk-21-def-x86
254    <<: *android_agent
255    <<: *common
256
257  - label: Android 13, x86_64 NDK
258    command: libcxx/utils/ci/run-buildbot android-ndk-33-goog-x86_64
259    <<: *android_agent
260    <<: *common
261
262
263    # TODO: Re-enable this once we've figured out how to run back-deployment testing on arm64 on recent OSes
264    # - label: "Apple back-deployment macosx11.0 arm64"
265    #   command: "libcxx/utils/ci/run-buildbot apple-system-backdeployment-11.0"
266    #   artifact_paths:
267    #     - "**/test-results.xml"
268    #     - "**/*.abilist"
269    #   agents:
270    #     queue: "libcxx-builders"
271    #     os: "macos"
272    #     arch: "arm64"
273    #   retry:
274    #     automatic:
275    #       - exit_status: -1  # Agent was lost
276    #         limit: 2
277    #   timeout_in_minutes: 120
278