Debian Codegraph @

.evergreen/legacy_config_generator/evergreen_config_lib/variants.py

raw
1 # Copyright 2009-present MongoDB, Inc.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 from collections import OrderedDict as OD
16
17 from evergreen_config_generator.variants import Variant
18
19 mobile_flags = (
20 ' -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY'
21 ' -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY'
22 ' -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER'
23 ' -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY'
24 )
25
26
27 def days(n: int) -> int:
28 "Calculate the number of minutes in the given number of days"
29 return n * 24 * 60
30
31
32 all_variants = [
33 Variant(
34 'abi-compliance-check',
35 'ABI Compliance Check',
36 ['ubuntu2204-small', 'ubuntu2204-medium', 'ubuntu2204-large'],
37 ['abi-compliance-check'],
38 ),
39 Variant(
40 'smoke',
41 'Smoke Tests',
42 'ubuntu2204-small',
43 [
44 'make-docs',
45 'kms-divergence-check',
46 'release-compile',
47 'debug-compile-no-counters',
48 'compile-tracing',
49 'link-with-cmake',
50 'link-with-cmake-ssl',
51 'link-with-cmake-snappy',
52 'verify-headers',
53 OD([('name', 'link-with-cmake-mac'), ('distros', ['macos-14-arm64'])]),
54 OD([('name', 'link-with-cmake-windows'), ('distros', ['windows-2022-latest-large'])]),
55 OD([('name', 'link-with-cmake-windows-ssl'), ('distros', ['windows-2022-latest-large'])]),
56 OD([('name', 'link-with-cmake-windows-snappy'), ('distros', ['windows-2022-latest-large'])]),
57 OD([('name', 'link-with-cmake-mingw'), ('distros', ['windows-2022-latest-large'])]),
58 OD([('name', 'link-with-pkg-config'), ('distros', ['ubuntu2204-large'])]),
59 OD([('name', 'link-with-pkg-config-mac'), ('distros', ['macos-14-arm64'])]),
60 'link-with-pkg-config-ssl',
61 'link-with-bson',
62 OD([('name', 'link-with-bson-windows'), ('distros', ['windows-2022-latest-large'])]),
63 OD([('name', 'link-with-bson-mac'), ('distros', ['macos-14-arm64'])]),
64 OD([('name', 'link-with-bson-mingw'), ('distros', ['windows-2022-latest-large'])]),
65 'check-headers',
66 'debug-compile-with-warnings',
67 'install-libmongoc-after-libbson',
68 ],
69 {
70 # Disable the MongoDB legacy shell download, which is not available in 5.0 for u22
71 'SKIP_LEGACY_SHELL': '1'
72 },
73 tags=['pr-merge-gate'],
74 ),
75 Variant(
76 'clang12-i686',
77 'Clang 12 (i686) (Ubuntu 22.04)',
78 'ubuntu2204-large',
79 [
80 'release-compile',
81 'debug-compile-nosasl-nossl',
82 '.debug-compile !.sspi .nossl .nosasl',
83 '.latest .nossl .nosasl',
84 ],
85 {'CC': 'clang-12', 'MARCH': 'i686'},
86 ),
87 Variant(
88 'gcc82rhel',
89 'GCC 8.2 (RHEL 8.0)',
90 'rhel80-test',
91 [
92 '.hardened',
93 '.compression !.snappy !.zstd',
94 'release-compile',
95 'debug-compile-nosasl-nossl',
96 'debug-compile-nosasl-openssl',
97 'debug-compile-sasl-openssl',
98 '.authentication-tests .openssl',
99 '.latest .nossl',
100 ],
101 {'CC': 'gcc'},
102 ),
103 Variant(
104 'gcc102',
105 'GCC 10.2 (Debian 11.0)',
106 'debian11-latest-large',
107 ['release-compile', 'debug-compile-nosasl-nossl', '.7.0 .nossl'], # Test server 7.0. Debian 11 is EOL for 8.0.
108 {'CC': 'gcc'},
109 ),
110 Variant(
111 'gcc11-i686',
112 'GCC 11 (i686) (Ubuntu 22.04)',
113 'ubuntu2204-large',
114 ['release-compile', 'debug-compile-nosasl-nossl', '.latest .nossl .nosasl'],
115 {'CC': 'gcc', 'MARCH': 'i686'},
116 ),
117 Variant(
118 'gcc13',
119 'GCC 13 (Ubuntu 24.04)',
120 'ubuntu2404-large',
121 [
122 '.compression !.zstd',
123 'debug-compile-nosrv',
124 'release-compile',
125 'debug-compile-nosasl-nossl',
126 'debug-compile-sasl-openssl',
127 'debug-compile-nosasl-openssl',
128 '.authentication-tests .openssl',
129 '.authentication-tests .asan',
130 '.test-coverage',
131 '.latest .nossl',
132 'retry-true-latest-server',
133 'test-dns-openssl',
134 'test-dns-auth-openssl',
135 'test-dns-loadbalanced-openssl',
136 ],
137 {'CC': 'gcc'},
138 ),
139 Variant(
140 'darwin',
141 '*Darwin, macOS (Apple LLVM)',
142 'macos-14-arm64',
143 [
144 '.compression !.snappy',
145 'release-compile',
146 'debug-compile-nosasl-nossl',
147 'debug-compile-nosrv',
148 'debug-compile-sasl-darwinssl',
149 'debug-compile-nosasl-nossl',
150 '.authentication-tests .darwinssl',
151 '.latest .nossl',
152 'test-dns-darwinssl',
153 'test-dns-auth-darwinssl',
154 'debug-compile-lto',
155 'debug-compile-lto-thin',
156 'debug-compile-aws',
157 'test-aws-openssl-regular-latest',
158 ],
159 {'CC': 'clang'},
160 ),
161 Variant(
162 'darwin-intel',
163 '*Darwin, Intel macOS (Apple LLVM)',
164 'macos-14',
165 [
166 'debug-compile-aws',
167 'debug-compile-rdtscp',
168 'test-aws-openssl-regular-4.4',
169 ],
170 {'CC': 'clang'},
171 ),
172 Variant(
173 'windows-2017-32',
174 'Windows (i686) (VS 2017)',
175 'windows-vsCurrent-large',
176 ['debug-compile-nosasl-nossl', '.7.0 .nossl .nosasl'],
177 {'CC': 'Visual Studio 15 2017'},
178 ),
179 Variant(
180 'windows-2017',
181 'Windows (VS 2017)',
182 'windows-vsCurrent-large',
183 [
184 'release-compile',
185 'debug-compile-nosasl-nossl',
186 'debug-compile-nosasl-openssl',
187 'debug-compile-sspi-winssl',
188 'debug-compile-nosrv',
189 '.7.0 .nossl',
190 '.compression !.snappy !.zstd !.latest',
191 'debug-compile-aws',
192 'test-aws-openssl-regular-4.4',
193 # Authentication tests with OpenSSL on Windows are only run on the vs2017 variant.
194 # Older vs variants fail to verify certificates against Atlas tests.
195 '.authentication-tests .openssl !.sasl',
196 '.authentication-tests .winssl',
197 ],
198 {'CC': 'Visual Studio 15 2017 Win64'},
199 ),
200 Variant(
201 'windows-2022',
202 'Windows (VS 2022)',
203 'windows-2022-latest-large',
204 [
205 'debug-compile-aws',
206 'debug-compile-nosasl-nossl',
207 'debug-compile-sspi-winssl',
208 '.authentication-tests .winssl',
209 '.latest .nossl',
210 'test-aws-openssl-regular-latest',
211 'test-dns-auth-winssl',
212 'test-dns-winssl',
213 ],
214 {'CC': 'Visual Studio 17 2022 Win64'},
215 ),
216 Variant(
217 'mingw-windows2019',
218 'MinGW-W64 (Windows Server 2019)',
219 'windows-vsCurrent-large',
220 ['debug-compile-nosasl-nossl', '.7.0 .nossl .nosasl .server'],
221 {'CC': 'gcc'},
222 ),
223 Variant(
224 'rhel8-power',
225 'Power (ppc64le) (RHEL 8)',
226 'rhel8-power-large',
227 [
228 'release-compile',
229 'debug-compile-nosasl-nossl',
230 'debug-compile-sasl-openssl',
231 '.latest .nossl',
232 'test-dns-openssl',
233 ],
234 {'CC': 'gcc'},
235 patchable=False,
236 batchtime=days(1),
237 ),
238 Variant(
239 'arm-ubuntu2204',
240 '*ARM (aarch64) (Ubuntu 22.04)',
241 'ubuntu2204-arm64-large',
242 [
243 '.compression !.snappy !.zstd',
244 'release-compile',
245 'debug-compile-nosasl-nossl',
246 'debug-compile-nosasl-openssl',
247 'debug-compile-sasl-openssl',
248 '.authentication-tests .openssl',
249 '.latest .nossl',
250 'test-dns-openssl',
251 ],
252 {'CC': 'gcc'},
253 batchtime=days(1),
254 ),
255 Variant(
256 'zseries-rhel8',
257 '*zSeries',
258 'rhel8-zseries-large',
259 [
260 'release-compile',
261 # '.compression', --> TODO: waiting on ticket CDRIVER-3258
262 'debug-compile-nosasl-nossl',
263 'debug-compile-nosasl-openssl',
264 'debug-compile-sasl-openssl',
265 '.authentication-tests .openssl',
266 '.latest .nossl',
267 ],
268 {'CC': 'gcc'},
269 patchable=False,
270 batchtime=days(1),
271 ),
272 # Run AWS tests for MongoDB 4.4 and 5.0 on Ubuntu 20.04. AWS setup scripts
273 # expect Ubuntu 20.04+. MongoDB 4.4 and 5.0 are not available on 22.04.
274 Variant(
275 'aws-ubuntu2004',
276 'AWS Tests (Ubuntu 20.04)',
277 'ubuntu2004-small',
278 [
279 'debug-compile-aws',
280 '.test-aws .4.4',
281 '.test-aws .5.0',
282 ],
283 {'CC': 'clang'},
284 ),
285 Variant(
286 'aws-ubuntu2204',
287 'AWS Tests (Ubuntu 22.04)',
288 'ubuntu2004-small',
289 [
290 'debug-compile-aws',
291 '.test-aws .6.0',
292 '.test-aws .7.0',
293 '.test-aws .8.0',
294 '.test-aws .latest',
295 ],
296 {'CC': 'clang'},
297 ),
298 Variant(
299 'ocsp',
300 'OCSP tests',
301 'ubuntu2204-small',
302 [
303 OD([('name', 'debug-compile-nosasl-openssl')]),
304 OD([('name', 'debug-compile-nosasl-darwinssl'), ('distros', ['macos-14-arm64'])]),
305 OD([('name', 'debug-compile-nosasl-winssl'), ('distros', ['windows-vsCurrent-large'])]),
306 OD([('name', '.ocsp-openssl')]),
307 OD([('name', '.ocsp-darwinssl'), ('distros', ['macos-14-arm64'])]),
308 OD([('name', '.ocsp-winssl'), ('distros', ['windows-vsCurrent-large'])]),
309 ],
310 {},
311 batchtime=days(7),
312 display_tasks=[
313 {
314 'name': 'ocsp-openssl',
315 'execution_tasks': ['.ocsp-openssl'],
316 },
317 {
318 'name': 'ocsp-darwinssl',
319 'execution_tasks': ['.ocsp-darwinssl'],
320 },
321 {
322 'name': 'ocsp-winssl',
323 'execution_tasks': ['.ocsp-winssl'],
324 },
325 ],
326 ),
327 Variant(
328 'packaging',
329 'Linux Distro Packaging',
330 'debian12-latest-small',
331 [
332 OD([('name', 'rpm-package-build'), ('distros', ['rhel90-arm64-small'])]),
333 '.packaging',
334 ],
335 {},
336 tags=['pr-merge-gate'],
337 ),
338 Variant(
339 'versioned-api',
340 'Versioned API Tests',
341 'rhel8-latest-large',
342 [
343 'debug-compile-nosasl-openssl',
344 'debug-compile-nosasl-nossl',
345 '.versioned-api .5.0',
346 '.versioned-api .6.0',
347 '.versioned-api .7.0',
348 '.versioned-api .8.0',
349 ],
350 {},
351 ),
352 ]