xref: /aosp_15_r20/external/cronet/third_party/libc++/src/utils/ci/buildkite-pipeline.yml (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
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
44environment_definitions:
45  _common_env: &common_env
46      ENABLE_CLANG_TIDY: "On"
47      LLVM_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer-${LLVM_HEAD_VERSION}"
48      CLANG_CRASH_DIAGNOSTICS_DIR: "crash_diagnostics"
49      CC: clang-${LLVM_HEAD_VERSION}
50      CXX: clang++-${LLVM_HEAD_VERSION}
51
52  _absolute_path_clang: &absolute_path_clang
53    # Note modules require and absolute path for clang-scan-deps
54    # https://github.com/llvm/llvm-project/issues/61006
55    CC: /usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang
56    CXX: /usr/lib/llvm-${LLVM_HEAD_VERSION}/bin/clang++
57
58
59steps:
60- group: ':mac: Apple'
61  steps:
62  - label: MacOS x86_64
63    command: libcxx/utils/ci/run-buildbot generic-cxx23
64    agents:
65      queue: libcxx-builders
66      os: macos
67      arch: x86_64
68    <<: *common
69
70  - label: MacOS arm64
71    command: libcxx/utils/ci/run-buildbot generic-cxx23
72    agents:
73      queue: libcxx-builders
74      os: macos
75      arch: arm64
76    <<: *common
77
78  - label: MacOS with Modules
79    command: libcxx/utils/ci/run-buildbot generic-modules
80    agents:
81      queue: libcxx-builders
82      os: macos
83    <<: *common
84
85  - label: MacOS with C++03
86    command: libcxx/utils/ci/run-buildbot generic-cxx03
87    agents:
88      queue: libcxx-builders
89      os: macos
90    <<: *common
91
92    # Build with the configuration we use to generate libc++.dylib on Apple platforms
93  - label: Apple system
94    command: libcxx/utils/ci/run-buildbot apple-system
95    agents:
96      queue: libcxx-builders
97      os: macos
98      arch: arm64 # This can technically run on any architecture, but we have more resources on arm64 so we pin this job to arm64
99    <<: *common
100
101  - label: Apple back-deployment macosx10.13
102    command: libcxx/utils/ci/run-buildbot apple-system-backdeployment-10.13
103    agents:
104      queue: libcxx-builders
105      os: macos
106      arch: x86_64 # We need to use x86_64 for back-deployment CI on this target since macOS didn't support arm64 back then
107    <<: *common
108
109  - label: Apple back-deployment macosx10.15
110    command: libcxx/utils/ci/run-buildbot apple-system-backdeployment-10.15
111    agents:
112      queue: libcxx-builders
113      os: macos
114      arch: x86_64 # We need to use x86_64 for back-deployment CI on this target since macOS didn't support arm64 back then
115    <<: *common
116
117  - label: Apple back-deployment with hardening enabled
118    command: libcxx/utils/ci/run-buildbot apple-system-backdeployment-hardened-11.0
119    agents:
120      queue: libcxx-builders
121      os: macos
122      arch: x86_64 # TODO: Remove this once we are able to run back-deployment on arm64 again, since this isn't x86_64 specific
123    <<: *common
124
125- group: ARM
126  steps:
127  - label: AArch64
128    command: libcxx/utils/ci/run-buildbot aarch64
129    agents:
130      queue: libcxx-builders-linaro-arm
131      arch: aarch64
132    <<: *common
133
134  - label: AArch64 -fno-exceptions
135    command: libcxx/utils/ci/run-buildbot aarch64-no-exceptions
136    agents:
137      queue: libcxx-builders-linaro-arm
138      arch: aarch64
139    <<: *common
140
141  - label: Armv8
142    command: libcxx/utils/ci/run-buildbot armv8
143    agents:
144      queue: libcxx-builders-linaro-arm
145      arch: armv8l
146    <<: *common
147
148  - label: Armv8 -fno-exceptions
149    command: libcxx/utils/ci/run-buildbot armv8-no-exceptions
150    agents:
151      queue: libcxx-builders-linaro-arm
152      arch: armv8l
153    <<: *common
154
155  - label: Armv7
156    command: libcxx/utils/ci/run-buildbot armv7
157    agents:
158      queue: libcxx-builders-linaro-arm
159      arch: armv8l
160    <<: *common
161
162  - label: Armv7 -fno-exceptions
163    command: libcxx/utils/ci/run-buildbot armv7-no-exceptions
164    agents:
165      queue: libcxx-builders-linaro-arm
166      arch: armv8l
167    <<: *common
168
169  - label: Armv7-M picolibc
170    command: libcxx/utils/ci/run-buildbot armv7m-picolibc
171    agents:
172      queue: libcxx-builders-linaro-arm
173      arch: aarch64
174    <<: *common
175
176  - label: Armv7-M picolibc -fno-exceptions
177    command: libcxx/utils/ci/run-buildbot armv7m-picolibc-no-exceptions
178    agents:
179      queue: libcxx-builders-linaro-arm
180      arch: aarch64
181    <<: *common
182
183- group: AIX
184  steps:
185  - label: AIX (32-bit)
186    command: libcxx/utils/ci/run-buildbot aix
187    env:
188      CC: clang
189      CXX: clang++
190      OBJECT_MODE: '32'
191    agents:
192      queue: libcxx-builders
193      os: aix
194    <<: *common
195
196  - label: AIX (64-bit)
197    command: libcxx/utils/ci/run-buildbot aix
198    env:
199      CC: clang
200      CXX: clang++
201      OBJECT_MODE: '64'
202    agents:
203      queue: libcxx-builders
204      os: aix
205    <<: *common
206
207- group: ':freebsd: FreeBSD'
208  steps:
209  - label: FreeBSD 13 amd64
210    command: libcxx/utils/ci/run-buildbot generic-cxx26
211    env:
212      CC: clang17
213      CXX: clang++17
214    agents:
215      queue: libcxx-builders
216      os: freebsd
217    <<: *common
218
219- group: ':android: Android'
220  steps:
221  - label: Android 5.0, x86 NDK
222    command: libcxx/utils/ci/run-buildbot android-ndk-21-def-x86
223    agents:
224      queue: libcxx-builders
225      os: android
226    <<: *common
227
228  - label: Android 13, x86_64 NDK
229    command: libcxx/utils/ci/run-buildbot android-ndk-33-goog-x86_64
230    agents:
231      queue: libcxx-builders
232      os: android
233    <<: *common
234
235
236    # TODO: Re-enable this once we've figured out how to run back-deployment testing on arm64 on recent OSes
237    # - label: "Apple back-deployment macosx11.0 arm64"
238    #   command: "libcxx/utils/ci/run-buildbot apple-system-backdeployment-11.0"
239    #   artifact_paths:
240    #     - "**/test-results.xml"
241    #     - "**/*.abilist"
242    #   agents:
243    #     queue: "libcxx-builders"
244    #     os: "macos"
245    #     arch: "arm64"
246    #   retry:
247    #     automatic:
248    #       - exit_status: -1  # Agent was lost
249    #         limit: 2
250    #   timeout_in_minutes: 120
251