summaryrefslogtreecommitdiff
path: root/etc/evergreen.yml
blob: 2a27f0bbbed5182f6c28eb11952a9a65f31ac8d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
####################################################
#                  YAML Conventions                 #
#####################################################
# Please see our conventions document at
# https://wiki.corp.mongodb.com/pages/viewpage.action?pageId=133273894
# for help navigating this document, or for help with our lint rules.


#####################################################
#               A note on expansions                #
#####################################################

# Expansions usually appear in the form ${key|default}
# If 'key' is found in the executor's map of currently known
# expansions, the corresponding value is used. If the key can
# not be found, the default is used.
#
# Arbitrary expansions can be specified in the YAML configuration
# files in the following places:
# - The 'expansions' field for buildvariants (branch file)
# - The 'expansions' field for distros (distros file)
#
# A number of 'built-in' expansions are also available for use; these include:
# - environment variables available on the host machine
# - 'workdir' (references the executor's work directory).
# - 'task_id' (references the task id of the task the executor is working on).
# - 'build_variant' (references the executing task's buildvariant).
# - 'config_root' (references the root directory for the executor's configuration artifacts).


#####################################################
#          Setup environment in a new task          #
#####################################################

# There are several ways to setup the environment in your task.
#
# 1. If your task depends on 'archive_dist_test'/'archive_dist_test_debug' task you can call the function "do setup"
# - func: "do setup"
# Or alternatively call the functions in the sequence below, if you don't need everything else from "do setup"
# - func: "fetch artifacts" (includes python, shell scripts, jstests etc. from the mongo and enterprise repos)
# - func: "f_expansions_write"
# - func: "kill processes"
# - func: "cleanup environment"
# - func: "set up venv"
#
# 2. If your task does not depend on 'archive_dist_test'/'archive_dist_test_debug' task use the following functions
# call sequence
# - command: manifest.load
# - func: "git get project" (clone the entire mongo and enterprise repos)
# - func: "f_expansions_write"
# - func: "kill processes"
# - func: "cleanup environment"
# - func: "set up venv"

include:
- filename: etc/evergreen_yml_components/definitions.yml
- filename: etc/evergreen_yml_components/variants/task_generation.yml
- filename: etc/evergreen_yml_components/variants/sanitizer.yml
- filename: etc/evergreen_yml_components/variants/in_memory.yml
- filename: etc/evergreen_yml_components/variants/ninja.yml
- filename: etc/evergreen_yml_components/variants/compile_static_analysis.yml

variables:

- &libfuzzertests
  name: libfuzzertests!
  execution_tasks:
  - compile_and_archive_libfuzzertests
  - fetch_and_run_libfuzzertests

# Common compile variant dependency specifications.
- &linux_x86_dynamic_compile_variant_dependency
  depends_on:
  - name: archive_dist_test_debug
    variant: &linux_x86_dynamic_compile_variant_name linux-x86-dynamic-compile
  - name: version_gen
    variant: generate-tasks-for-version
    # This is added because of EVG-18211.
    # Without this we are adding extra dependencies on evergreen and it is causing strain
    omit_generated_tasks: true

- &amazon_linux2_arm64_compile_variant_dependency
  depends_on:
  - name: archive_dist_test_debug
    variant: &amazon_linux2_arm64_compile_variant_name amazon-linux2-arm64-compile
  - name: version_gen
    variant: generate-tasks-for-version
    # This is added because of EVG-18211.
    # Without this we are adding extra dependencies on evergreen and it is causing strain
    omit_generated_tasks: true

- &linux_x86_dynamic_debug_compile_variant_dependency
  depends_on:
  - name: archive_dist_test_debug
    variant: &linux_x86_dynamic_debug_compile_variant_name linux-x86-dynamic-debug-compile-required
  - name: version_gen
    variant: generate-tasks-for-version
    # This is added because of EVG-18211.
    # Without this we are adding extra dependencies on evergreen and it is causing strain
    omit_generated_tasks: true

- &linux_debug_aubsan_compile_variant_dependency
  depends_on:
  - name: archive_dist_test_debug
    variant: &linux_debug_aubsan_compile_variant_name linux-debug-aubsan-compile-required
  - name: version_gen
    variant: generate-tasks-for-version
    # This is added because of EVG-18211.
    # Without this we are adding extra dependencies on evergreen and it is causing strain
    omit_generated_tasks: true

- &windows_compile_variant_dependency
  depends_on:
  - name: archive_dist_test_debug
    variant: &windows_compile_variant_name windows-compile-required
  - name: version_gen
    variant: generate-tasks-for-version
    # This is added because of EVG-18211.
    # Without this we are adding extra dependencies on evergreen and it is causing strain
    omit_generated_tasks: true

- &linux_x86_generic_expansions
  multiversion_platform: rhel80
  multiversion_edition: enterprise
  repo_edition: enterprise
  large_distro_name: rhel80-medium
  num_scons_link_jobs_available: 0.99
  compile_variant: *linux_x86_dynamic_compile_variant_name

- &linux_arm64_generic_expansions
  multiversion_platform: amazon2
  multiversion_edition: enterprise
  multiversion_architecture: aarch64
  packager_arch: aarch64
  packager_distro: amazon2
  repo_edition: enterprise
  large_distro_name: amazon2-arm64-large
  num_scons_link_jobs_available: 0.99
  compile_variant: *amazon_linux2_arm64_compile_variant_name

# If you add anything to san_options, make sure the appropriate changes are
# also made to SConstruct.
# and also to the san_options in compile_static_analysis.yml
- aubsan_options: &aubsan_options
  >-
    UBSAN_OPTIONS="print_stacktrace=1:external_symbolizer_path=/opt/mongodbtoolchain/v4/bin/llvm-symbolizer"
    LSAN_OPTIONS="suppressions=etc/lsan.suppressions:report_objects=1"
    ASAN_OPTIONS="detect_leaks=1:check_initialization_order=true:strict_init_order=true:abort_on_error=1:disable_coredump=0:handle_abort=1:strict_string_checks=true:detect_invalid_pointer_pairs=1:external_symbolizer_path=/opt/mongodbtoolchain/v4/bin/llvm-symbolizer"

# Use this template for enterprise Windows testing coverage on non-pushing
# variants
- &enterprise-windows-nopush-template
  name: enterprise-windows-nopush-template
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  run_on:
  - windows-vsCurrent-small
  modules:
  - enterprise
  expansions: &enterprise-windows-nopush-expansions-template
    additional_package_targets: >-
      archive-mongocryptd
      archive-mongocryptd-debug
      msi
    exe: ".exe"
    content_type: application/zip
    compile_flags: >-
      --ssl
      MONGO_DISTMOD=windows
      CPPPATH="c:/sasl/include"
      LIBPATH="c:/sasl/lib"
      -j$(( $(grep -c ^processor /proc/cpuinfo) / 2 ))
      --win-version-min=win10
    num_scons_link_jobs_available: 0.5
    python: '/cygdrive/c/python/python37/python.exe'
    ext: zip
    scons_cache_scope: shared
    multiversion_platform: windows
    multiversion_edition: enterprise
    jstestfuzz_num_generated_files: 35
    large_distro_name: windows-vsCurrent-large
    test_flags: --excludeWithAnyTags=incompatible_with_windows_tls
    external_auth_jobs_max: 1
  tasks:
  - name: compile_test_and_package_serial_TG
    distros:
    - windows-vsCurrent-large
  - name: burn_in_tests_gen
    depends_on:
    - name: version_burn_in_gen
      variant: generate-tasks-for-version
      omit_generated_tasks: true
    - name: archive_dist_test_debug
  - name: .aggfuzzer .common !.feature_flag_guarded
  - name: audit
  - name: auth_audit_gen
  - name: buildscripts_test
  - name: causally_consistent_jscore_txns_passthrough
  - name: .encrypt !.aggregation !.gcm !.feature_flag_guarded
  - name: external_auth
  - name: external_auth_aws
  - name: external_auth_windows
    distros:
    - windows-2016-dc
  - name: .jscore .common !.sharding
  - name: .jstestfuzz .common
  - name: replica_sets_auth_gen
  - name: sasl
  - name: sharding_auth_audit_gen

# TODO: SERVER-XYZ remove this duplicate task definition.
- &enterprise-rhel-70-64-bit-template
  name: enterprise-rhel-70-64-bit
  display_name: "Enterprise RHEL 7.0"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  modules:
  - enterprise
  run_on:
  - rhel70-small
  expansions: &enterprise-rhel-70-64-bit-expansions-template
    additional_package_targets: >-
      archive-mongocryptd
      archive-mongocryptd-debug
      archive-mh
      archive-mh-debug
    push_path: linux
    push_bucket: downloads.10gen.com
    push_name: linux
    push_arch: x86_64-enterprise-rhel70
    compile_flags: >-
      --ssl
      MONGO_DISTMOD=rhel70
      -j$(grep -c ^processor /proc/cpuinfo)
      --variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
    crypt_task_compile_flags: >-
      SHLINKFLAGS_EXTRA="-Wl,-Bsymbolic -Wl,--no-gnu-unique"
      CCFLAGS="-fno-gnu-unique"
    multiversion_platform: rhel70
    multiversion_edition: enterprise
    has_packages: true
    packager_script: packager_enterprise.py
    packager_arch: x86_64
    packager_distro: rhel70
    repo_edition: enterprise
    scons_cache_scope: shared
  tasks:
  - name: compile_test_and_package_serial_no_unittests_TG
    distros:
    - rhel70
  - name: compile_build_tools_next_TG
    distros:
    - rhel70
  - name: .aggfuzzer !.feature_flag_guarded
  - name: audit
  - name: auth_audit_gen
  - name: auth_gen
  - name: causally_consistent_jscore_txns_passthrough
  - name: .config_fuzzer !.large
  - name: .encrypt !.sharding !.replica_sets !.aggregation !.jscore
  - name: external_auth
  - name: external_auth_aws
  - name: .jscore .common !.decimal !.sharding
  - name: jsCore_txns_large_txns_format
  - name: .jstestfuzz .common
  - name: libunwind_tests
  - name: .ocsp
  - name: replica_sets_auth_gen
  - name: replica_sets_jscore_passthrough
  - name: .replica_sets .multi_oplog
  - name: sasl
  - name: search
  - name: search_auth
  - name: search_pinned_connections_auth
  - name: search_ssl
  - name: sharding_auth_audit_gen
  - name: .stitch
  - name: .crypt
  - name: unittest_shell_hang_analyzer_gen
  - name: test_packages
    distros:
    - ubuntu2004-package
  - name: selinux_rhel7_enterprise
  - name: generate_buildid_to_debug_symbols_mapping


parameters:
- key: evergreen_config_file_path
  value: "etc/evergreen.yml"
  description: "path to this file"


#######################################
#            Buildvariants            #
#######################################
buildvariants:

###########################################
#         Linux buildvariants             #
###########################################
- &linux-64-debug-required-template
  <<: *linux_x86_dynamic_debug_compile_variant_dependency
  name: &linux-64-debug-required linux-64-debug-required
  display_name: "! Linux x86 Shared Library DEBUG"
  cron: "0 */4 * * *" # From the ${project_required_suggested_cron} parameter
  run_on:
  - rhel80-medium
  expansions:
    resmoke_jobs_factor: 0.5  # Avoid starting too many mongod's
    test_flags: --excludeWithAnyTags=requires_http_client
    target_resmoke_time: 15
    max_sub_suites: 5
    large_distro_name: rhel80-medium
    compile_variant: *linux_x86_dynamic_debug_compile_variant_name
  tasks:
  - name: .aggregation !.encrypt !.feature_flag_guarded
  - name: .auth !.audit !.multiversion
  - name: sharding_auth_gen
  - name: .causally_consistent !.wo_snapshot
  - name: .change_streams
  - name: .clustered_collections
  - name: .misc_js
  - name: disk_wiredtiger
  - name: free_monitoring
  - name: .jscore .common
  - name: jsCore_txns_large_txns_format
  - name: json_schema
  - name: query_golden_classic
  - name: libunwind_tests
  - name: .multi_shard
  - name: multi_stmt_txn_jscore_passthrough_with_migration_gen
  - name: .ocsp
  - name: .read_write_concern
  - name: .replica_sets !.encrypt !.ignore_non_generated_replica_sets_jscore_passthrough !.fcbis
  - name: replica_sets_jscore_passthrough_gen
  - name: replica_sets_reconfig_jscore_passthrough_gen
  - name: replica_sets_reconfig_jscore_stepdown_passthrough_gen
  - name: replica_sets_max_mirroring_large_txns_format_gen
  - name: .retry
  - name: .read_only
  - name: session_jscore_passthrough
  - name: sharded_multi_stmt_txn_jscore_passthrough
  - name: .sharding .jscore !.wo_snapshot
  - name: sharding_gen
  - name: sharding_max_mirroring_opportunistic_secondary_targeting_gen

- <<: *linux-64-debug-required-template
  name: &linux-64-debug-wtdevelop linux-64-debug-wtdevelop
  display_name: "~ Linux DEBUG WiredTiger develop"
  cron: "0 */4 * * *" # From the ${project_required_suggested_cron} parameter
  modules:
  - wtdevelop
  depends_on:
  - name: archive_dist_test_debug
    variant: &linux_x86_dynamic_debug_wtdevelop_compile_variant_name linux-x86-dynamic-debug-wtdevelop-compile
  - name: version_gen
    variant: generate-tasks-for-version
    # This is added because of EVG-18211.
    # Without this we are adding extra dependencies on evergreen and it is causing strain
    omit_generated_tasks: true
  expansions:
    use_wt_develop: true
    resmoke_jobs_factor: 0.5  # Avoid starting too many mongod's
    large_distro_name: rhel80-medium
    max_sub_suites: "5"
    target_resmoke_time: "15"
    compile_flags: >-
      --dbg=on
      --opt=on
      -j$(grep -c ^processor /proc/cpuinfo)
      --variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
      --enable-free-mon=on
      --enable-http-client=on
      --link-model=dynamic
    scons_cache_mode: all
    scons_cache_scope: shared
    num_scons_link_jobs_available: 0.99
    test_flags: --excludeWithAnyTags=requires_http_client
    compile_variant: *linux_x86_dynamic_debug_wtdevelop_compile_variant_name

- name: &tla-plus tla-plus
  display_name: "TLA+"
  run_on:
  - rhel80-build
  cron: "0 4 * * 0" # From the ${project_weekly_cron} parameter
  stepback: false
  expansions:
    timeout_secs: 345600 # 4 days
  tasks:
  - name: tla_plus

- name: &enterprise-rhel-80-64-bit-coverage enterprise-rhel-80-64-bit-coverage
  display_name: "~ Enterprise RHEL 8.0 DEBUG Code Coverage"
  modules:
  - enterprise
  run_on:
  - rhel80-medium
  cron: "0 4 * * 0" # From the ${project_weekly_cron} parameter
  stepback: false
  expansions:
    additional_package_targets: >-
      archive-mongocryptd
      archive-mongocryptd-debug
    test_flags: --excludeWithAnyTags=resource_intensive,incompatible_with_gcov
    compile_flags: >-
      --allocator=system
      --dbg=on
      --gcov
      --opt=off
      --ssl
      MONGO_DISTMOD=rhel80
      -j$(grep -c ^processor /proc/cpuinfo)
      --variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
      --link-model=dynamic
    large_distro_name: rhel80-medium
    multiversion_platform: rhel80
    multiversion_edition: enterprise
    resmoke_jobs_factor: 0.5  # Avoid starting too many mongod's
    # The gcov instrumentation saves the path the .gcno files were created in as the default path
    # for the .gcda files. In Evergreen the path will start with /data/mci/[Hashed ID]/src/... where
    # the hashed ID is unique per task run. GCOV_PREFIX_STRIP is the number of directory levels to
    # strip from the top of the default path before appending to the GCOV_PREFIX (if any).
    gcov_environment: GCOV_PREFIX=$(pwd) GCOV_PREFIX_STRIP=4
    # Mixing --cache and --gcov doesn't work correctly yet. See SERVER-11084
    exec_timeout_secs: 32400 # 9 hour timeout
    timeout_secs: 18000 # 5 hour idle timeout
    use_scons_cache: false
    gcov_tool: /opt/mongodbtoolchain/v4/bin/gcov
    num_scons_link_jobs_available: 0.99
    compile_variant: *enterprise-rhel-80-64-bit-coverage
  tasks: &enterprise-rhel-80-64-bit-coverage-tasks
  - name: compile_test_and_package_parallel_core_stream_TG
    distros:
    - rhel80-large
  - name: compile_test_and_package_parallel_unittest_stream_TG
    distros:
    - rhel80-large
  - name: compile_test_and_package_parallel_dbtest_stream_TG
    distros:
    - rhel80-large
  - name: .jscore .common
  - name: .replica_sets !.ignore_non_generated_replica_sets_jscore_passthrough !.ignore_on_code_coverage
  - name: replica_sets_jscore_passthrough_gen
  - name: generate_buildid_to_debug_symbols_mapping

- name: &enterprise-rhel-80-64-bit-coverage-clang enterprise-rhel-80-64-bit-coverage-clang
  display_name: "~ Enterprise RHEL 8.0 DEBUG Code Coverage (clang)"
  modules:
    - enterprise
  run_on:
    - rhel80-medium
  cron: "0 4 * * 0" # From the ${project_weekly_cron} parameter
  stepback: false
  expansions:
    additional_package_targets: >-
      archive-mongocryptd
      archive-mongocryptd-debug
    test_flags: --excludeWithAnyTags=resource_intensive,incompatible_with_gcov
    compile_flags: >-
      --allocator=system
      --dbg=on
      --gcov
      --opt=debug
      --ssl
      MONGO_DISTMOD=rhel80
      -j$(grep -c ^processor /proc/cpuinfo)
      --variables-files=etc/scons/mongodbtoolchain_stable_clang.vars
      --link-model=dynamic
    large_distro_name: rhel80-medium
    multiversion_platform: rhel80
    multiversion_edition: enterprise
    resmoke_jobs_factor: 0.5  # Avoid starting too many mongod's
    # The gcov instrumentation saves the path the .gcno files were created in as the default path
    # for the .gcda files. In Evergreen the path will start with /data/mci/[Hashed ID]/src/... where
    # the hashed ID is unique per task run. GCOV_PREFIX_STRIP is the number of directory levels to
    # strip from the top of the default path before appending to the GCOV_PREFIX (if any).
    gcov_environment: GCOV_PREFIX=$(pwd) GCOV_PREFIX_STRIP=4
    # Mixing --cache and --gcov doesn't work correctly yet. See SERVER-11084
    exec_timeout_secs: 32400 # 9 hour timeout
    timeout_secs: 21600 # 7 hour idle timeout
    use_scons_cache: false
    # llvm-cov is too old in the v3 toolchain to handle the same options that
    # gcov does. However, this version of clang still produces .gcda files that
    # the v3 gcov can read natively anyway, so we don't need it.
    gcov_tool: /opt/mongodbtoolchain/v4/bin/gcov
    num_scons_link_jobs_available: 0.99
    compile_variant: *enterprise-rhel-80-64-bit-coverage-clang
  tasks:
    *enterprise-rhel-80-64-bit-coverage-tasks

- name: &stm-daily-cron stm-daily-cron
  modules:
  - enterprise
  display_name: "* STM Daily Cron"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  run_on:
  - rhel80-small
  expansions:
    multiversion_platform: rhel80
    multiversion_edition: enterprise
    compile_variant: *stm-daily-cron
  stepback: false
  tasks:
  - name: lint_fuzzer_sanity_all
  - name: powercycle_sentinel
  - name: powercycle_smoke_skip_compile_gen

- name: &security-daily-cron security-daily-cron
  modules:
  - enterprise
  display_name: "~ Security Daily Cron"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  run_on:
  - rhel80-small
  stepback: false
  tasks:
  - name: blackduck_scanner

- name: tooling-metrics
  display_name: "* Tooling Metrics"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  run_on:
  - ubuntu1804-small
  stepback: false
  tasks:
  - name: tooling_metrics_test

###########################################
#         Windows buildvariants           #
###########################################

- name: &windows-debug-suggested windows-debug-suggested
  display_name: "* Windows DEBUG"
  cron: "0 */4 * * *" # From the ${project_required_suggested_cron} parameter
  run_on:
  - windows-vsCurrent-small
  expansions:
    exe: ".exe"
    content_type: application/zip
    compile_flags: >-
      --dbg=on
      --opt=on
      --win-version-min=win10
      -j$(bc <<< "$(grep -c '^processor' /proc/cpuinfo) / 1.8")
      MONGO_DISTMOD=windows
    num_scons_link_jobs_available: 0.2
    python: '/cygdrive/c/python/python37/python.exe'
    ext: zip
    scons_cache_scope: shared
    multiversion_platform: windows
    multiversion_edition: enterprise
    large_distro_name: windows-vsCurrent-large
    test_flags: &windows_common_test_excludes --excludeWithAnyTags=incompatible_with_windows_tls
    compile_variant: *windows-debug-suggested
  tasks:
  - name: compile_test_and_package_serial_TG
    distros:
    - windows-vsCurrent-xlarge
  - name: compile_build_tools_next_TG
    distros:
    - windows-vsCurrent-xlarge
  - name: compile_integration_and_test_no_audit_parallel_stream_TG
    distros:
    - windows-vsCurrent-xlarge
  - name: .aggregation !.auth !.encrypt !.feature_flag_guarded
  - name: aggregation_expression_multiversion_fuzzer_gen
  - name: aggregation_expression_optimization_fuzzer_gen
  - name: auth_gen
  - name: .causally_consistent !.sharding
  - name: .change_streams
  - name: .misc_js !.non_win_dbg
  - name: .concurrency !.ubsan
    distros:
    - windows-vsCurrent-large
  - name: .config_fuzzer !.large !.linux_only
  - name: .config_fuzzer .large !.linux_only !.sharded
    distros:
    - windows-vsCurrent-large
  - name: disk_wiredtiger
  - name: free_monitoring
  - name: initial_sync_fuzzer_gen
  - name: .jscore .common !.auth !.sharding
  - name: jsCore_txns_large_txns_format
  - name: json_schema
  - name: multi_shard_multi_stmt_txn_jscore_passthrough_gen
  - name: multi_stmt_txn_jscore_passthrough_with_migration_gen
  - name: .read_write_concern !.large
  - name: .read_write_concern .large
    distros:
    - windows-vsCurrent-large
  - name: .read_only
  - name: .rollbackfuzzer
  - name: .replica_sets !.large !.encrypt !.auth !.fcbis
  - name: .replica_sets .large !.fcbis
    distros:
    - windows-vsCurrent-large
  - name: replica_sets_max_mirroring_large_txns_format_gen
  - name: .resharding_fuzzer
  - name: retryable_writes_jscore_passthrough_gen
  - name: retryable_writes_jscore_stepdown_passthrough_gen
    distros:
    - windows-vsCurrent-large
  - name: session_jscore_passthrough
  - name: sharding_gen
  - name: sharding_max_mirroring_opportunistic_secondary_targeting_gen
  - name: .stitch
  - name: server_discovery_and_monitoring_json_test_TG
  - name: server_selection_json_test_TG

- &enterprise-windows-template
  <<: *windows_compile_variant_dependency
  name: &enterprise-windows enterprise-windows
  display_name: "* Enterprise Windows"
  cron: "0 */4 * * *" # From the ${project_required_suggested_cron} parameter
  modules:
  - enterprise
  run_on:
  - windows-vsCurrent-small
  expansions: &windows_required_expansions
    compile_variant: *windows_compile_variant_name
    burn_in_tests_build_variant: enterprise-windows-all-feature-flags-required
    exe: ".exe"
    content_type: application/zip
    python: '/cygdrive/c/python/python37/python.exe'
    ext: zip
    multiversion_platform: windows
    multiversion_edition: enterprise
    jstestfuzz_num_generated_files: 35
    target_resmoke_time: 20
    max_sub_suites: 5
    large_distro_name: windows-vsCurrent-large
    push_path: windows
    push_bucket: downloads.10gen.com
    push_name: windows
    push_arch: x86_64-enterprise
    test_flags: *windows_common_test_excludes
    external_auth_jobs_max: 1
  tasks:
  - name: burn_in_tests_gen
    depends_on:
    - name: version_burn_in_gen
      variant: generate-tasks-for-version
      omit_generated_tasks: true
    - name: archive_dist_test_debug
      variant: *windows_compile_variant_name
  - name: audit
  - name: auth_audit_gen
  - name: causally_consistent_jscore_txns_passthrough
    distros:
    - windows-vsCurrent-large
  - name: .encrypt !.aggregation !.replica_sets !.sharding !.jscore
  - name: external_auth
  - name: external_auth_aws
  - name: external_auth_windows
    distros:
    - windows-2016-dc
  - name: .jscore .common !.sharding
  - name: jsCore_auth
  - name: jsCore_ese
  - name: jsCore_txns_large_txns_format
  - name: .jstestfuzz .common
  - name: mqlrun
  - name: noPassthrough_gen
  - name: noPassthroughWithMongod_gen
  - name: .replica_sets .common !.ignore_non_generated_replica_sets_jscore_passthrough
  - name: .replica_sets .multi_oplog !.ignore_non_generated_replica_sets_jscore_passthrough !.gcm
  - name: replica_sets_jscore_passthrough_gen
    distros:
    - windows-vsCurrent-large
  - name: sasl
  - name: .sharding .txns
  - name: sharding_auth_audit_gen
  - name: sharding_max_mirroring_opportunistic_secondary_targeting_ese_gen

- <<: *enterprise-windows-template
  name: &enterprise-windows-all-feature-flags-required enterprise-windows-all-feature-flags-required
  display_name: "! Enterprise Windows (all feature flags)"
  cron: "0 */4 * * *" # From the ${project_required_suggested_cron} parameter
  expansions:
    <<: *windows_required_expansions
    burn_in_tests_build_variant: enterprise-windows-all-feature-flags-required
    exe: ".exe"
    content_type: application/zip
    python: '/cygdrive/c/python/python37/python.exe'
    ext: zip
    multiversion_platform: windows
    multiversion_edition: enterprise
    jstestfuzz_num_generated_files: 35
    target_resmoke_time: 20
    max_sub_suites: 5
    large_distro_name: windows-vsCurrent-large
    # To force disable feature flags even on the all feature flags variant, please use this file:
    # buildscripts/resmokeconfig/fully_disabled_feature_flags.yml
    test_flags: >-
      --additionalFeatureFlagsFile all_feature_flags.txt
      --excludeWithAnyTags=incompatible_with_windows_tls
      --excludeWithAnyTags=incompatible_with_shard_merge
    external_auth_jobs_max: 1
    # Uncomment expansion and `burn_in_tasks_gen` task below and add resmoke task name to burn-in.
    # WARNING! Task splitting is not supported for burn-in tasks. Large unsplitted `_gen` tasks may
    # run too long and hit execution timeouts.
    # burn_in_task_name: jsCore
  tasks:
  - name: cqf
  - name: cqf_disabled_pipeline_opt
  - name: cqf_passthrough
  - name: cqf_parallel
  - name: query_golden_classic
  - name: query_golden_cqf
  - name: burn_in_tests_gen
    depends_on:
    - name: version_burn_in_gen
      variant: generate-tasks-for-version
      omit_generated_tasks: true
    - name: archive_dist_test_debug
      variant: *windows_compile_variant_name
  # - name: burn_in_tasks_gen
  #   depends_on:
  #   - name: version_burn_in_gen
  #     variant: generate-tasks-for-version
  #     omit_generated_tasks: true
  #   - name: archive_dist_test_debug
  #     variant: *windows_compile_variant_name
  - name: audit
  - name: auth_audit_gen
  - name: buildscripts_test
  - name: causally_consistent_jscore_txns_passthrough
    distros:
    - windows-vsCurrent-large
  - name: .encrypt !.aggregation !.replica_sets !.sharding !.jscore
  - name: external_auth
  - name: external_auth_aws
  - name: external_auth_windows
    distros:
    - windows-2016-dc
  - name: .jscore .common !.sharding
  - name: jsCore_auth
  - name: jsCore_column_store_indexes
  - name: jsCore_ese
  - name: jsCore_txns_large_txns_format
  - name: jsCore_wildcard_indexes
  - name: .jstestfuzz .common
  - name: mqlrun
  - name: noPassthrough_gen
  - name: noPassthroughWithMongod_gen
  - name: .replica_sets .common !.ignore_non_generated_replica_sets_jscore_passthrough
  - name: .replica_sets .multi_oplog !.ignore_non_generated_replica_sets_jscore_passthrough !.gcm
  - name: replica_sets_jscore_passthrough_gen
  - name: sasl
  - name: .sharding .txns
  - name: sharding_auth_audit_gen
  - name: sharding_max_mirroring_opportunistic_secondary_targeting_ese_gen
  - name: telemetry_passthrough
  - name: unittest_shell_hang_analyzer_gen

- name: &enterprise-windows-debug-unoptimized enterprise-windows-debug-unoptimized
  display_name: "Enterprise Windows DEBUG (Unoptimized)"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  modules:
  - enterprise
  run_on:
  - windows-vsCurrent-small
  expansions:
    compile_variant: *enterprise-windows-debug-unoptimized
    additional_package_targets: >-
      archive-mongocryptd
      archive-mongocryptd-debug
    exe: ".exe"
    content_type: application/zip
    compile_flags: >-
      --dbg=on
      --opt=off
      --ssl
      MONGO_DISTMOD=windows
      CPPPATH="c:/sasl/include"
      LIBPATH="c:/sasl/lib"
      -j$(bc <<< "$(grep -c '^processor' /proc/cpuinfo) / 1.5")
      --win-version-min=win10
    num_scons_link_jobs_available: 0.25
    python: '/cygdrive/c/python/python37/python.exe'
    ext: zip
    resmoke_jobs_max: 1
    scons_cache_scope: shared
    test_flags: *windows_common_test_excludes
  tasks:
  # This variant tests that unoptimized, DEBUG mongos and mongod binaries can run on Windows.
  # It has a minimal amount of tasks because unoptimized builds are slow, which causes
  # timing-sensitive tests to fail.
  - name: compile_and_archive_dist_test_then_package_TG
    distros:
    - windows-vsCurrent-large
  - name: compile_build_tools_next_TG
    distros:
    - windows-vsCurrent-large
  - name: audit
  # Do not add more tasks to this list.

###########################################
#         macos buildvariants             #
###########################################

- &macos-debug-template
  name: &macos-debug-suggested macos-debug-suggested
  display_name: "* macOS DEBUG"
  cron: "0 */4 * * *" # From the ${project_required_suggested_cron} parameter
  run_on:
  - macos-1100
  expansions: &macos-debug-expansions
    compile_variant: *macos-debug-suggested
    test_flags: --excludeWithAnyTags=incompatible_with_macos
    resmoke_jobs_max: 6
    compile_env: DEVELOPER_DIR=/Applications/Xcode13.app
    compile_flags: >-
      --ssl
      --dbg=on
      --opt=on
      -j$(sysctl -n hw.logicalcpu)
      --libc++
      --variables-files=etc/scons/xcode_macosx.vars
    num_scons_link_jobs_available: 0.99
  tasks:
  - name: compile_test_and_package_serial_TG
  - name: compile_build_tools_next_TG
  - name: aggregation !.feature_flag_guarded
  - name: auth_gen
  - name: causally_consistent_jscore_txns_passthrough
  - name: disk_wiredtiger
  - name: failpoints
  - name: .jscore .common !.auth !.sharding
  - name: jsCore_txns_large_txns_format
  - name: mongosTest
  - name: replica_sets_gen
  - name: replica_sets_max_mirroring_large_txns_format_gen
  - name: .ssl
  - name: .stitch
  - name: unittest_shell_hang_analyzer_gen

- name: &enterprise-macos-rosetta-2 enterprise-macos-rosetta-2
  display_name: "Enterprise macOS Via Rosetta 2"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  modules:
  - enterprise
  run_on:
  - macos-1100-arm64
  expansions:
    compile_variant: *enterprise-macos-rosetta-2
    test_flags: --excludeWithAnyTags=incompatible_with_macos,requires_gcm
    compile_env: DEVELOPER_DIR=/Applications/Xcode13.app
    compile_flags: >-
      --ssl
      -j$(sysctl -n hw.logicalcpu)
      --libc++
      --variables-files=etc/scons/xcode_macosx.vars
    resmoke_jobs_max: 6
    num_scons_link_jobs_available: 0.99
  tasks:
  - name: compile_test_and_package_serial_TG
  - name: audit
  - name: auth_audit_gen
  - name: causally_consistent_jscore_txns_passthrough
  - name: .encrypt !.replica_sets !.sharding !.aggregation !.jscore !.ssl
  - name: .jscore .common !.decimal !.sharding
  - name: mqlrun
  # TODO(SERVER-64009): Re-enable replica_sets_auth_gen.
  # - name: replica_sets_auth_gen
  - name: replica_sets_jscore_passthrough_gen
  - name: sasl
  - name: .crypt

- name: &enterprise-macos enterprise-macos
  display_name: "Enterprise macOS DEBUG"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  modules:
  - enterprise
  run_on:
  - macos-1100
  expansions:
    compile_variant: *enterprise-macos
    test_flags: --excludeWithAnyTags=incompatible_with_macos,requires_gcm
    compile_env: DEVELOPER_DIR=/Applications/Xcode13.app
    compile_flags: >-
      --ssl
      --dbg=on
      --opt=on
      -j$(sysctl -n hw.logicalcpu)
      --libc++
      --variables-files=etc/scons/xcode_macosx.vars
    resmoke_jobs_max: 6
    num_scons_link_jobs_available: 0.99
  tasks:
  - name: compile_test_and_package_serial_TG
  - name: audit
  - name: auth_audit_gen
  - name: causally_consistent_jscore_txns_passthrough
  - name: .encrypt !.replica_sets !.sharding !.aggregation !.jscore !.ssl
  - name: .jscore .common !.decimal !.sharding
  - name: mqlrun
  - name: replica_sets_auth_gen
  - name: replica_sets_jscore_passthrough_gen
  - name: sasl
  - name: .crypt

- name: &enterprise-macos-arm64 enterprise-macos-arm64
  display_name: "~ Enterprise macOS arm64"
  modules:
  - enterprise
  run_on:
  - macos-1100-arm64
  expansions:
    compile_variant: *enterprise-macos-arm64
    test_flags: --excludeWithAnyTags=incompatible_with_macos,requires_gcm
    compile_env: DEVELOPER_DIR=/Applications/Xcode13.app
    compile_flags: >-
      --ssl
      -j$(sysctl -n hw.logicalcpu)
      --libc++
      --variables-files=etc/scons/xcode_macosx_arm.vars
    resmoke_jobs_max: 6
    num_scons_link_jobs_available: 0.99
  tasks:
  - name: compile_test_and_package_serial_TG
  - name: audit
  - name: auth_audit_gen
  - name: causally_consistent_jscore_txns_passthrough
  - name: .encrypt !.replica_sets !.sharding !.aggregation !.jscore
  - name: .jscore .common !.decimal !.sharding
  - name: mqlrun
  - name: replica_sets_auth_gen
  - name: replica_sets_jscore_passthrough
  - name: sasl
  - name: .crypt

###########################################
#          Redhat buildvariants           #
###########################################

- &enterprise-rhel-80-64-bit-dynamic-template
  <<: *linux_x86_dynamic_compile_variant_dependency
  name: &enterprise-rhel-80-64-bit-dynamic enterprise-rhel-80-64-bit-dynamic
  display_name: "* Shared Library Enterprise RHEL 8.0"
  cron: "0 */4 * * *" # From the ${project_required_suggested_cron} parameter
  modules:
  - enterprise
  run_on:
  - rhel80-small
  expansions: &enterprise-rhel-80-64-bit-dynamic-expansions
    <<: *linux_x86_generic_expansions
    scons_cache_scope: shared
    scons_cache_mode: all
    has_packages: false
    jstestfuzz_num_generated_files: 40
    jstestfuzz_concurrent_num_files: 10
    target_resmoke_time: 10
    max_sub_suites: 5
    idle_timeout_factor: 1.5
    exec_timeout_factor: 1.5
    large_distro_name: rhel80-medium
    burn_in_tag_buildvariants: >-
      enterprise-rhel-80-64-bit-inmem
      enterprise-rhel-80-64-bit-multiversion
    burn_in_tag_compile_task_dependency: archive_dist_test_debug
  depends_on:
  - name: archive_dist_test_debug
    variant: *linux_x86_dynamic_compile_variant_name
  - name: version_gen
    variant: generate-tasks-for-version
    # This is added because of EVG-18211.
    # Without this we are adding extra dependencies on evergreen and it is causing strain
    omit_generated_tasks: true
  tasks:
  - name: burn_in_tests_gen
    depends_on:
    - name: version_burn_in_gen
      variant: generate-tasks-for-version
      omit_generated_tasks: true
    - name: archive_dist_test_debug
      variant: *linux_x86_dynamic_compile_variant_name
  - name: .aggfuzzer !.feature_flag_guarded
  - name: .aggregation !.feature_flag_guarded
  - name: aggregation_repeat_queries
  - name: analyze_shard_key_jscore_passthrough_gen
  - name: audit
  - name: .auth
  - name: unittest_shell_hang_analyzer_gen
  - name: .causally_consistent !.sharding
  - name: .change_streams
  - name: .change_stream_fuzzer
  - name: .misc_js
  - name: .concurrency !.large !.ubsan !.no_txns
  - name: .concurrency .large !.ubsan !.no_txns
    distros:
    - rhel80-medium
  - name: .config_fuzzer !.large
  - name: .config_fuzzer .large
    distros:
    - rhel80-medium
  - name: disk_wiredtiger
  - name: .encrypt
  - name: idl_tests
  - name: initial_sync_fuzzer_gen
  - name: jsCore
    distros:
    - rhel80-xlarge
  - name: .jscore .common !jsCore
  - name: jsCore_min_batch_repeat_queries_ese_gsm
  - name: jsCore_txns_large_txns_format
  - name: json_schema
  - name: .jstestfuzz !.flow_control  # Flow control jstestfuzz take longer.
  - name: libunwind_tests
  - name: mqlrun
  - name: .multi_shard
  - name: multi_stmt_txn_jscore_passthrough_with_migration_gen
  - name: multiversion_gen
  - name: .query_fuzzer
  - name: .random_multiversion_ds
  - name: .read_write_concern .large
    distros:
    - rhel80-medium
  - name: .read_write_concern !.large
  - name: .replica_sets !.encrypt !.auth
    distros:
    - rhel80-xlarge
  - name: replica_sets_api_version_jscore_passthrough_gen
  - name: replica_sets_reconfig_jscore_passthrough_gen
  - name: replica_sets_reconfig_jscore_stepdown_passthrough_gen
    distros:
    - rhel80-xlarge
  - name: replica_sets_reconfig_kill_primary_jscore_passthrough_gen
    distros:
    - rhel80-xlarge
  - name: retryable_writes_jscore_passthrough_gen
  - name: retryable_writes_jscore_stepdown_passthrough_gen
    distros:
    - rhel80-medium
  - name: .read_only
  - name: .rollbackfuzzer
  - name: sasl
  - name: search
  - name: search_auth
  - name: search_pinned_connections_auth
  - name: search_ssl
  - name: session_jscore_passthrough
  - name: .sharding .jscore !.wo_snapshot !.multi_stmt
  - name: sharding_api_version_jscore_passthrough_gen
  - name: sharding_api_strict_passthrough_gen
  - name: .sharding .txns
  - name: .sharding .common
  - name: .updatefuzzer
  - name: secondary_reads_passthrough_gen
  - name: .serverless
    distros:
    - rhel80-xlarge

- <<: *enterprise-rhel-80-64-bit-dynamic-template
  name: &enterprise-rhel-80-64-bit-dynamic-debug-mode enterprise-rhel-80-64-bit-dynamic-debug-mode
  display_name: "Shared Library Enterprise RHEL 8.0 Debug Mode"
  cron: "0 4 * * 0" # Run once a week on sunday at 4am
  stepback: false
  expansions:
    <<: *enterprise-rhel-80-64-bit-dynamic-expansions
    compile_variant: *enterprise-rhel-80-64-bit-dynamic-debug-mode
    compile_flags: >-
      --ssl
      MONGO_DISTMOD=rhel80
      -j$(grep -c ^processor /proc/cpuinfo)
      --variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
      --link-model=dynamic
      --use-glibcxx-debug
      --dbg=on
      --allocator=system
    exec_timeout_secs: 32400 # 9 hour timeout
    timeout_secs: 18000 # 5 hour idle timeout
  depends_on: []
  tasks:
  - name: compile_test_and_package_parallel_core_stream_TG
    distros:
    - rhel80-xlarge
  - name: compile_test_and_package_parallel_unittest_stream_TG
    distros:
    - rhel80-xlarge
  - name: compile_test_and_package_parallel_dbtest_stream_TG
    distros:
    - rhel80-xlarge
  - name: compile_integration_and_test_parallel_stream_TG
    distros:
    - rhel80-large
  - name: test_api_version_compatibility
  - name: .aggfuzzer !.feature_flag_guarded !.no_debug_mode
  - name: .aggregation !.feature_flag_guarded !.no_debug_mode
  - name: audit
  - name: .auth !.no_debug_mode
  - name: .causally_consistent !.sharding
  - name: .change_streams !.no_debug_mode
  - name: .change_stream_fuzzer
  - name: .misc_js !.no_debug_mode
  - name: .concurrency !.large !.ubsan !.no_txns !.no_debug_mode
  - name: .concurrency .large !.ubsan !.no_txns !.no_debug_mode
    distros:
    - rhel80-medium
  - name: .config_fuzzer !.large
  - name: .config_fuzzer .large
    distros:
    - rhel80-medium
  - name: .config_fuzzer_stress
    distros:
    - rhel80-large
  - name: disk_wiredtiger
  - name: .encrypt !.no_debug_mode
  - name: idl_tests
  - name: initial_sync_fuzzer_gen
  - name: jsCore
    distros:
    - rhel80-xlarge
  - name: .jscore .common !jsCore
  - name: jsCore_min_batch_repeat_queries_ese_gsm
  - name: jsCore_txns_large_txns_format
  - name: json_schema
  # TODO(SERVER-69996) reenable after ticket is complete
  # - name: .jstestfuzz !.flow_control
  - name: libunwind_tests
  - name: .multiversion_sanity_check
  - name: mqlrun
  - name: .multi_shard !.no_debug_mode
  - name: multiversion_gen
  - name: .ocsp
  - name: .query_fuzzer
  - name: .read_write_concern .large
    distros:
    - rhel80-medium
  - name: .read_write_concern !.large
  # TODO(SERVER-69951) reenable after ticket is complete
  # - name: .replica_sets !.encrypt !.auth
  #   distros:
  #   - rhel80-xlarge
  - name: replica_sets_api_version_jscore_passthrough_gen
  - name: replica_sets_reconfig_jscore_passthrough_gen
  - name: replica_sets_reconfig_kill_primary_jscore_passthrough_gen
    distros:
    - rhel80-xlarge
  - name: retryable_writes_jscore_passthrough_gen
  - name: .read_only
  - name: .rollbackfuzzer
  - name: sasl
  - name: search
  - name: search_auth
  - name: search_pinned_connections_auth
  - name: search_ssl
  - name: session_jscore_passthrough
  - name: .sharding .jscore !.wo_snapshot !.multi_stmt !.no_debug_mode
  - name: sharding_api_version_jscore_passthrough_gen
  - name: .stitch
  - name: .crypt
    distros:
    - rhel80-xlarge
  - name: crypt_build_debug_and_test
    distros:
    - rhel80-xlarge
  - name: .updatefuzzer !.no_debug_mode
  - name: secondary_reads_passthrough_gen
  - name: server_discovery_and_monitoring_json_test_TG
  # TODO(SERVER-70015) reenable after ticket is complete
  # - name: .serverless
  #   distros:
  #   - rhel80-xlarge
  - name: server_selection_json_test_TG
    distros:
    - rhel80-xlarge
  - name: streams
  - name: generate_buildid_to_debug_symbols_mapping

- &enterprise-rhel-80-64-bit-dynamic-all-feature-flags-template
  <<: *linux_x86_dynamic_compile_variant_dependency
  name: &enterprise-rhel-80-64-bit-dynamic-all-feature-flags enterprise-rhel-80-64-bit-dynamic-all-feature-flags
  display_name: "* Shared Library Enterprise RHEL 8.0 (all feature flags)"
  cron: "0 */4 * * *" # From the ${project_required_suggested_cron} parameter
  modules:
  - enterprise
  run_on:
  - rhel80-small
  stepback: false
  expansions: &enterprise-rhel-80-64-bit-dynamic-all-feature-flags-expansions
    <<: *enterprise-rhel-80-64-bit-dynamic-expansions
    # To force disable feature flags even on the all feature flags variant, please use this file:
    # buildscripts/resmokeconfig/fully_disabled_feature_flags.yml
    test_flags: >-
      --additionalFeatureFlagsFile all_feature_flags.txt
      --excludeWithAnyTags=incompatible_with_shard_merge
    # Uncomment expansion and `burn_in_tasks_gen` task below and add resmoke task name to burn-in.
    # WARNING! Task splitting is not supported for burn-in tasks. Large unsplitted `_gen` tasks may
    # run too long and hit execution timeouts.
    # burn_in_task_name: jsCore
  depends_on:
  - name: archive_dist_test_debug
    variant: *linux_x86_dynamic_compile_variant_name
  - name: version_gen
    variant: generate-tasks-for-version
    # This is added because of EVG-18211.
    # Without this we are adding extra dependencies on evergreen and it is causing strain
    omit_generated_tasks: true
  tasks:
  - name: analyze_shard_key_jscore_passthrough_gen
  - name: cqf
  - name: cqf_disabled_pipeline_opt
  - name: cqf_passthrough
  - name: cqf_parallel
  - name: query_golden_classic
  - name: query_golden_cqf
  - name: lint_fuzzer_sanity_patch
  - name: test_api_version_compatibility
  - name: burn_in_tests_gen
    depends_on:
    - name: version_burn_in_gen
      variant: generate-tasks-for-version
      omit_generated_tasks: true
    - name: archive_dist_test_debug
      variant: *linux_x86_dynamic_compile_variant_name
  - name: burn_in_tags_gen
    depends_on:
    - name: version_burn_in_gen
      variant: generate-tasks-for-version
      omit_generated_tasks: true
    - name: archive_dist_test_debug
      variant: *linux_x86_dynamic_compile_variant_name
  # - name: burn_in_tasks_gen
  #   depends_on:
  #   - name: version_burn_in_gen
  #     variant: generate-tasks-for-version
  #     omit_generated_tasks: true
  #   - name: archive_dist_test_debug
  #     variant: *linux_x86_dynamic_compile_variant_name
  - name: check_feature_flag_tags
  - name: check_for_todos
  - name: .aggfuzzer
  - name: .aggregation
  - name: aggregation_repeat_queries
  - name: audit
  - name: .auth
  - name: buildscripts_test
  - name: resmoke_end2end_tests
  - name: unittest_shell_hang_analyzer_gen
  - name: .causally_consistent !.sharding
  - name: .change_streams
  - name: .change_stream_fuzzer
  # TODO SERVER-57866: Remove the explicit mentions of change stream multitenant suites.
  - name: change_streams_multitenant_passthrough
  - name: change_streams_multitenant_sharded_collections_passthrough
  - name: .misc_js
  - name: .clustered_collections
  - name: .concurrency !.large !.ubsan !.no_txns
  - name: .concurrency .large !.ubsan !.no_txns
    distros:
    - rhel80-medium
  - name: .config_fuzzer !.large
  - name: .config_fuzzer .large
    distros:
    - rhel80-medium
  - name: .config_fuzzer_stress
    distros:
    - rhel80-large
  - name: disk_wiredtiger
  - name: .encrypt
  - name: feature_flag_multiversion_gen
  - name: idl_tests
  - name: initial_sync_fuzzer_gen
  - name: .jscore .common
  - name: jsCore_column_store_indexes
  - name: jsCore_min_batch_repeat_queries_ese_gsm
  - name: jsCore_txns_large_txns_format
  - name: jsCore_wildcard_indexes
  - name: json_schema
  - name: .jstestfuzz !.flow_control  # Flow control jstestfuzz take longer.
  - name: libunwind_tests
  - name: .multiversion_sanity_check
  - name: mqlrun
  - name: .multi_shard
  - name: multi_stmt_txn_jscore_passthrough_with_migration_gen
  - name: multiversion_gen
  - name: powercycle_smoke
  - name: .query_fuzzer
  - name: .random_multiversion_ds
  - name: .read_write_concern .large
    distros:
    - rhel80-medium
  - name: .read_write_concern !.large
  - name: .replica_sets !.encrypt !.auth
    distros:
    - rhel80-medium
  - name: replica_sets_api_version_jscore_passthrough_gen
  - name: replica_sets_reconfig_jscore_passthrough_gen
  - name: replica_sets_reconfig_jscore_stepdown_passthrough_gen
    distros:
    - rhel80-medium
  - name: replica_sets_reconfig_kill_primary_jscore_passthrough_gen
    distros:
    - rhel80-medium
  - name: retryable_writes_jscore_passthrough_gen
  - name: retryable_writes_jscore_stepdown_passthrough_gen
    distros:
    - rhel80-medium
  - name: .read_only
  - name: .rollbackfuzzer
  - name: sasl
  - name: search
  - name: search_auth
  - name: search_pinned_connections_auth
  - name: search_ssl
  - name: session_jscore_passthrough
  - name: .sharding .jscore !.wo_snapshot !.multi_stmt
  - name: sharding_api_version_jscore_passthrough_gen
  - name: sharding_api_strict_passthrough_gen
  - name: .sharding .txns
  - name: .sharding .common
  - name: sharded_collections_single_writes_without_shard_key_jscore_passthrough_gen
  - name: sharded_multi_stmt_txn_jscore_passthrough
  - name: .serverless
  - name: sharding_max_mirroring_opportunistic_secondary_targeting_ese_gcm_gen
  - name: .updatefuzzer
  - name: secondary_reads_passthrough_gen
  - name: .shard_split
  - name: .shard_merge
  - name: streams
  - name: telemetry_passthrough

# This build variant is used to test suites that use sharded cluster fixture with config shard mode.
# TODO (SERVER-75884): Remove this once we switch to config shard as the default.
- &enterprise-rhel-80-64-bit-dynamic-config-shard
  <<: *linux_x86_dynamic_compile_variant_dependency
  name: enterprise-rhel-80-64-bit-dynamic-config-shard
  display_name: "* Shared Library Enterprise RHEL 8.0 (Config Shard)"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  modules:
  - enterprise
  run_on:
  - rhel80-small
  stepback: false
  expansions: &enterprise-rhel-80-64-bit-dynamic-config-shard-expansions
    <<: *enterprise-rhel-80-64-bit-dynamic-expansions
    test_flags: >-
      --configShard=any
      --excludeWithAnyTags=config_shard_incompatible
  tasks:
  - name: aggregation_mongos_passthrough
  - name: aggregation_one_shard_sharded_collections
  - name: aggregation_sharded_collections_causally_consistent_passthrough
  - name: aggregation_sharded_collections_passthrough
  - name: causally_consistent_hedged_reads_jscore_passthrough_gen
  - name: causally_consistent_jscore_passthrough_auth_gen
  - name: causally_consistent_jscore_passthrough_gen
  - name: change_streams
  - name: change_streams_mongos_sessions_passthrough
  - name: change_streams_multi_stmt_txn_mongos_passthrough
  - name: change_streams_multi_stmt_txn_sharded_collections_passthrough
  - name: change_streams_per_shard_cursor_passthrough
  - name: fle2_sharding_high_cardinality
  - name: fle2_sharding
  - name: jstestfuzz_sharded_causal_consistency_gen
  - name: jstestfuzz_sharded_continuous_stepdown_gen
  - name: jstestfuzz_sharded_gen
  - name: jstestfuzz_sharded_session_gen
  - name: sharded_causally_consistent_jscore_passthrough_gen
  - name: sharded_causally_consistent_read_concern_snapshot_passthrough_gen
  - name: sharding_auth_gen
  # Explicitly include instead of using tags to avoid pulling in replica_sets_multiversion_gen. This
  # variant will be removed when config shards become the default, so this is only temporary.
  - name: sharding_multiversion_gen
  - name: .sharding .txns
  # Skip csrs stepdown suite because most tests can't handle the first shard stepping down.
  - name: .sharding .common !.csrs
  - name: .sharding .jscore !.wo_snapshot !.multi_stmt
  - name: .concurrency .sharded !.large
  - name: .concurrency .sharded .large
    distros:
    - rhel80-medium
  - name: .multi_shard

- &enterprise-rhel-80-64-bit-dynamic-classic-engine
  <<: *linux_x86_dynamic_compile_variant_dependency
  name: enterprise-rhel-80-64-bit-dynamic-classic-engine
  display_name: "Shared Library Enterprise RHEL 8.0 (Classic Engine)"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  modules:
  - enterprise
  run_on:
  - rhel80-small
  stepback: false
  expansions:
    <<: *enterprise-rhel-80-64-bit-dynamic-expansions
    jstestfuzz_num_generated_files: 40
    jstestfuzz_concurrent_num_files: 10
    target_resmoke_time: 10
    max_sub_suites: 5
    test_flags: >-
      --mongodSetParameters="{internalQueryFrameworkControl: forceClassicEngine}"
    large_distro_name: rhel80-medium
    burn_in_tag_buildvariants: >-
      enterprise-rhel-80-64-bit-inmem
      enterprise-rhel-80-64-bit-multiversion
    burn_in_tag_compile_task_dependency: archive_dist_test_debug
  depends_on:
  - name: archive_dist_test_debug
    variant: *linux_x86_dynamic_compile_variant_name
  - name: version_gen
    variant: generate-tasks-for-version
    # This is added because of EVG-18211.
    # Without this we are adding extra dependencies on evergreen and it is causing strain
    omit_generated_tasks: true
  tasks:
  - name: .aggfuzzer !.sbe_only
  - name: .aggregation !.sbe_only
  - name: .auth
  - name: .causally_consistent !.sharding
  - name: .change_stream_fuzzer
  - name: .change_streams
  - name: .concurrency !.large !.ubsan !.no_txns !.compute_mode
  - name: .concurrency .large !.ubsan !.no_txns !.compute_mode
    distros:
    - rhel80-medium
  - name: .encrypt
  - name: .jscore .common !jsCore !.sbe_only
  - name: .jstestfuzz !.flow_control
  - name: .misc_js
  - name: .multi_shard
  - name: .query_fuzzer
  - name: .random_multiversion_ds
  - name: .read_only
  - name: .read_write_concern !.large
  - name: .read_write_concern .large
    distros:
    - rhel80-medium
  - name: .replica_sets !.encrypt !.auth
    distros:
    - rhel80-xlarge
  - name: .rollbackfuzzer
  - name: .sharding .common
  - name: .sharding .jscore !.wo_snapshot !.multi_stmt
  - name: .sharding .txns
  - name: .serverless
    distros:
    - rhel80-xlarge
  - name: .updatefuzzer
  - name: aggregation_repeat_queries
  - name: audit
  - name: burn_in_tags_gen
    depends_on:
    - name: version_burn_in_gen
      variant: generate-tasks-for-version
      omit_generated_tasks: true
    - name: archive_dist_test_debug
      variant: *linux_x86_dynamic_compile_variant_name
  - name: burn_in_tests_gen
    depends_on:
    - name: version_burn_in_gen
      variant: generate-tasks-for-version
      omit_generated_tasks: true
    - name: archive_dist_test_debug
      variant: *linux_x86_dynamic_compile_variant_name
  - name: check_feature_flag_tags
  - name: check_for_todos
  - name: disk_wiredtiger
  - name: initial_sync_fuzzer_gen
  - name: jsCore
    distros:
    - rhel80-xlarge
  - name: jsCore_min_batch_repeat_queries_ese_gsm
  - name: jsCore_txns_large_txns_format
  - name: json_schema
  - name: mqlrun
  - name: multi_stmt_txn_jscore_passthrough_with_migration_gen
  - name: multiversion_gen
  - name: .multiversion_sanity_check
  - name: replica_sets_api_version_jscore_passthrough_gen
  - name: replica_sets_reconfig_jscore_passthrough_gen
  - name: replica_sets_reconfig_jscore_stepdown_passthrough_gen
    distros:
    - rhel80-xlarge
  - name: replica_sets_reconfig_kill_primary_jscore_passthrough_gen
    distros:
    - rhel80-xlarge
  - name: retryable_writes_jscore_passthrough_gen
  - name: retryable_writes_jscore_stepdown_passthrough_gen
  - name: sasl
  - name: search
  - name: search_auth
  - name: search_pinned_connections_auth
  - name: search_ssl
  - name: secondary_reads_passthrough_gen
  - name: session_jscore_passthrough
  - name: sharding_api_version_jscore_passthrough_gen
  - name: test_api_version_compatibility
  - name: unittest_shell_hang_analyzer_gen

- <<: *linux_x86_dynamic_compile_variant_dependency
  name: &enterprise-rhel-80-64-bit-large-txns-format enterprise-rhel-80-64-bit-large-txns-format
  display_name: "Enterprise RHEL 8.0 (large transactions format)"
  cron: "0 4 * * 0" # From the ${project_weekly_cron} parameter
  modules:
  - enterprise
  run_on:
  - rhel80-small
  expansions:
    <<: *linux_x86_generic_expansions
    test_flags: >-
      --mongodSetParameters="{maxNumberOfTransactionOperationsInSingleOplogEntry: 2}"
      --excludeWithAnyTags=exclude_from_large_txns
  tasks:
  - name: auth_gen
  - name: auth_audit_gen
  - name: causally_consistent_jscore_txns_passthrough
  - name: change_streams
  - name: change_streams_whole_db_passthrough
  - name: change_streams_whole_cluster_passthrough
  - name: concurrency_replication_gen
  - name: concurrency_replication_multi_stmt_txn_gen
  - name: concurrency_sharded_replication_gen
  - name: concurrency_sharded_replication_with_balancer_gen
  - name: concurrency_sharded_clusterwide_ops_add_remove_shards_gen
  - name: concurrency_sharded_local_read_write_multi_stmt_txn_gen
  - name: concurrency_sharded_local_read_write_multi_stmt_txn_with_balancer_gen
  - name: concurrency_sharded_multi_stmt_txn_gen
  - name: concurrency_sharded_multi_stmt_txn_with_balancer_gen
  - name: concurrency_sharded_multi_stmt_txn_with_stepdowns_gen
  - name: concurrency_sharded_with_stepdowns_gen
  - name: concurrency_sharded_with_stepdowns_and_balancer_gen
  - name: concurrency_sharded_initial_sync_gen
  - name: initial_sync_fuzzer_gen
  - name: jsCore
  - name: jsCore_txns
  - name: .multi_shard
  - name: multi_stmt_txn_jscore_passthrough_with_migration_gen
  - name: multiversion_auth_gen
  - name: multiversion_gen
  - name: noPassthrough_gen
  - name: .replica_sets !.multi_oplog !.large
  - name: .replica_sets !.multi_oplog .large
    distros:
    - rhel80-medium
  - name: .replica_sets .encrypt
  - name: .resharding_fuzzer
  - name: .rollbackfuzzer
  - name: .sharding .txns
  - name: sharding_gen
  - name: sharding_auth_audit_gen
  - name: sharding_max_mirroring_opportunistic_secondary_targeting_ese_gen
  - name: sharding_max_mirroring_opportunistic_secondary_targeting_ese_gcm_gen
  - name: sharding_csrs_continuous_config_stepdown_gen
  - name: sharded_multi_stmt_txn_jscore_passthrough
    distros:
    - rhel80-medium

# This build variant is used to run multiversion tests as part of burn_in_tags as these tests are
# currently only run on our daily builders.
- &linux-x86-multiversion-template
  <<: *linux_x86_dynamic_compile_variant_dependency
  name: &enterprise-rhel-80-64-bit-multiversion enterprise-rhel-80-64-bit-multiversion
  display_name: "Enterprise RHEL 8.0 (implicit multiversion)"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  modules:
  - enterprise
  run_on:
  - rhel80-small
  expansions: &linux-x86-multiversion-expansions-template
    <<: *linux_x86_generic_expansions
    resmoke_jobs_factor: 0.25
  tasks:
  - name: .multiversion_fuzzer
  - name: .multiversion_passthrough
  - name: .random_multiversion_ds

- <<: *linux-x86-multiversion-template
  name: &enterprise-rhel-80-64-bit-multiversion-all-feature-flags enterprise-rhel-80-64-bit-multiversion-all-feature-flags
  display_name: "Enterprise RHEL 8.0 (implicit multiversion & all feature flags)"
  expansions:
    <<: *linux-x86-multiversion-expansions-template
    # No feature flag tests since they aren't compatible with the older binaries.
    test_flags: >-
      --runNoFeatureFlagTests
      --excludeWithAnyTags=incompatible_with_shard_merge,DISABLED_TEMPORARILY_DUE_TO_FCV_UPGRADE

# This variant exists becuase this is the only way to test future multiversion tags
# version_expansions_gen will pretend we are upgrading to "bv_future_git_tag"
# which is like simulating a branching task
- &enterprise-rhel-80-64-bit-future-git-tag-multiversion-template
  <<: *linux-x86-multiversion-template
  name: &enterprise-rhel-80-64-bit-future-git-tag-multiversion enterprise-rhel-80-64-bit-future-git-tag-multiversion
  display_name: "Enterprise RHEL 8.0 (future git tag multiversion)"
  expansions:
    <<: *linux_x86_generic_expansions
    scons_cache_scope: shared
    scons_cache_mode: all
    resmoke_jobs_factor: 0.5
    bv_future_git_tag: r100.0.0-9999
    test_flags: >-
      --excludeWithAnyTags=future_git_tag_incompatible
  depends_on:
  - name: version_expansions_gen
    variant: &enterprise-rhel-80-64-bit-future-git-tag-multiversion-version-gen enterprise-rhel-80-64-bit-future-git-tag-multiversion-version-gen
  - name: version_gen
    variant: generate-tasks-for-version
    # This is added because of EVG-18211.
    # Without this we are adding extra dependencies on evergreen and it is causing strain
    omit_generated_tasks: true
  - name: archive_dist_test_debug
    variant: *linux_x86_dynamic_compile_variant_name
  tasks:
  - name: .multiversion !.future_git_tag_incompatible
  - name: .multiversion_future_git_tag
  - name: generate_buildid_to_debug_symbols_mapping

# This variant exists becuase this is the only way to correctly have
# enterprise-rhel-80-64-bit-future-git-tag-multiversion depend the the "correct" version_expansions_gen task
# Without this extra variant depending on version_expansions_gen will yeild the version_expansions_gen task in version_gen
# Adding this variant removes that race condition
- <<: *enterprise-rhel-80-64-bit-future-git-tag-multiversion-template
  name: *enterprise-rhel-80-64-bit-future-git-tag-multiversion-version-gen
  display_name: "Enterprise RHEL 8.0 (future git tag multiversion) (version gen)"
  depends_on: null
  tasks:
  - name: version_expansions_gen
    distros:
    - rhel80-small

- name: &enterprise-rhel-80-64-bit-suggested enterprise-rhel-80-64-bit-suggested
  display_name: "* Enterprise RHEL 8.0"
  cron: "0 4 * * *" # From the ${project_required_suggested_cron} parameter
  modules:
  - enterprise
  run_on:
  - rhel80-build
  expansions:
    additional_package_targets: >-
      archive-mongocryptd
      archive-mongocryptd-debug
      archive-mh
      archive-mh-debug
    compile_flags: >-
      --ssl
      MONGO_DISTMOD=rhel80
      -j$(grep -c ^processor /proc/cpuinfo)
      --variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
    multiversion_platform: rhel80
    multiversion_edition: enterprise
    has_packages: true
    packager_script: packager_enterprise.py
    packager_arch: x86_64
    packager_distro: rhel80
    repo_edition: enterprise
    scons_cache_scope: shared
    large_distro_name: rhel80-large
    compile_variant: *enterprise-rhel-80-64-bit-suggested
  tasks:
  - name: compile_test_and_package_serial_no_unittests_TG
    distros:
    - rhel80-xlarge
  - name: .aggfuzzer !.feature_flag_guarded
  - name: audit
  - name: auth_audit_gen
  - name: auth_gen
  - name: causally_consistent_jscore_txns_passthrough
  - name: .encrypt !.sharding !.replica_sets !.aggregation !.jscore
  - name: external_auth
  - name: external_auth_aws
  - name: external_auth_oidc
  - name: .jscore .common !.decimal !.sharding
  - name: jsCore_txns_large_txns_format
  - name: .jstestfuzz .common
  - name: libunwind_tests
  - name: replica_sets_auth_gen
  - name: replica_sets_jscore_passthrough
  - name: .replica_sets .multi_oplog !.encrypt
  - name: replica_sets_max_mirroring_large_txns_format_gen
  - name: sasl
  - name: search
  - name: search_auth
  - name: search_pinned_connections_auth
  - name: search_ssl
  - name: sharding_auth_audit_gen
  - name: .stitch
  - name: test_packages
    distros:
    - ubuntu2004-package
  - name: selinux_rhel8_enterprise
  - name: generate_buildid_to_debug_symbols_mapping

- name: &enterprise-rhel-80-64-bit-build-metrics enterprise-rhel-80-64-bit-build-metrics
  display_name: "~ Build Metrics Enterprise RHEL 8.0 "
  cron: "0 4 * * *" # From the ${project_required_suggested_cron} parameter
  stepback: false
  modules:
  - enterprise
  run_on:
  - rhel80-build
  expansions:
    compile_flags: >-
      --ssl
      MONGO_DISTMOD=rhel80
      -j$(grep -c ^processor /proc/cpuinfo)
    repo_edition: enterprise
    large_distro_name: rhel80-large
    num_scons_link_jobs_available: 0.1
  tasks:
  - name: build_metrics_gen_TG

- name: &enterprise-rhel-80-aarch64-build-metrics enterprise-rhel-80-aarch64-build-metrics
  display_name: "~ Build Metrics Enterprise AL22 ARM"
  cron: "0 4 * * *" # From the ${project_required_suggested_cron} parameter
  stepback: false
  modules:
  - enterprise
  run_on:
  - amazon2023.0-arm64-large
  expansions:
    compile_flags: >-
      --ssl
      MONGO_DISTMOD=rhel82
      -j$(grep -c ^processor /proc/cpuinfo)
    repo_edition: enterprise
    large_distro_name: amazon2023.0-arm64-large
    num_scons_link_jobs_available: 0.1
  tasks:
  - name: build_metrics_gen_TG

- name: &macos-enterprise-build-metrics macos-enterprise-build-metrics
  display_name: "~ Build Metrics Enterprise MacOS"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  stepback: false
  modules:
  - enterprise
  run_on:
  - macos-1100
  expansions:
    num_scons_link_jobs_available: 0.1
    compile_env: DEVELOPER_DIR=/Applications/Xcode13.app
    compile_flags: >-
      --ssl
      -j$(sysctl -n hw.logicalcpu)
      --libc++
      --variables-files=etc/scons/xcode_macosx.vars
  tasks:
  - name: build_metrics_gen_TG

- name: &enterprise-windows-build-metrics enterprise-windows-build-metrics
  display_name: "~ Build Metrics Enterprise Windows"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  stepback: false
  run_on:
  - windows-vsCurrent-small
  expansions:
    num_scons_link_jobs_available: 0.1
    compile_flags: >-
      CPPPATH="c:/sasl/include"
      LIBPATH="c:/sasl/lib"
      -j$(( $(grep -c ^processor /proc/cpuinfo) / 2 ))
      --win-version-min=win10
    python: '/cygdrive/c/python/python37/python.exe'
  tasks:
  - name: build_metrics_gen_TG

- <<: *enterprise-rhel-70-64-bit-template
  name: &hot_backups-rhel-70-64-bit hot_backups-rhel-70-64-bit
  display_name: "hot_backups RHEL 7.0"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  run_on:
  - rhel70
  expansions:
    <<: *enterprise-rhel-70-64-bit-expansions-template
    additional_package_targets: ""
    compile_flags: >-
      --ssl
      MONGO_DISTMOD=rhel70
      -j$(grep -c ^processor /proc/cpuinfo)
      --variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
      --enterprise-features=hot_backups
      --link-model=dynamic
    compile_variant: *hot_backups-rhel-70-64-bit
    has_packages: false
    scons_cache_mode: all
    scons_cache_scope: shared
    num_scons_link_jobs_available: 0.99
  tasks:
  - name: compile_test_and_package_parallel_core_stream_TG
  - name: compile_test_and_package_parallel_unittest_stream_TG
  - name: compile_test_and_package_parallel_dbtest_stream_TG
  - name: jsCore
  - name: noPassthroughHotBackups_gen
  - name: generate_buildid_to_debug_symbols_mapping

- name: &enterprise-rhel-72-s390x-compile enterprise-rhel-72-s390x-compile
  display_name: "Enterprise RHEL 7.2 s390x Compile"
  modules:
  - enterprise
  run_on:
  - rhel72-zseries-test
  cron: "0 4 * * 0" # From the ${project_weekly_cron} parameter
  stepback: false
  expansions:
    compile_variant: *enterprise-rhel-72-s390x-compile
    additional_package_targets: >-
      archive-mongocryptd
      archive-mongocryptd-debug
    compile_flags: >-
      --ssl
      MONGO_DISTMOD=rhel72
      -j3
      --variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
      --link-model=dynamic
      --linker=gold
    resmoke_jobs_max: 2
    has_packages: true
    packager_script: packager_enterprise.py
    packager_arch: s390x
    packager_distro: rhel72
    push_path: linux
    push_bucket: downloads.10gen.com
    push_name: linux
    push_arch: s390x-enterprise-rhel72
    repo_edition: enterprise
    multiversion_platform: rhel72
    multiversion_architecture: s390x
    multiversion_edition: enterprise
    num_scons_link_jobs_available: 0.99
    test_flags: >-
      --excludeWithAnyTags=incompatible_with_s390x
  tasks:
  - name: compile_test_and_package_serial_TG
    distros:
    - rhel72-zseries-build
  - name: generate_buildid_to_debug_symbols_mapping

################################
# storage engine buildvariants #
################################

- name: &enterprise-rhel-80-benchmarks enterprise-rhel-80-benchmarks
  display_name: "* Enterprise RHEL 8.0 (Benchmarks)"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  modules:
  - enterprise
  run_on:
  - rhel80-medium
  expansions:
    compile_flags: >-
      --ssl
      MONGO_DISTMOD=rhel80
      -j$(grep -c ^processor /proc/cpuinfo)
      --variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
    scons_cache_scope: shared
    compile_variant: *enterprise-rhel-80-benchmarks
  tasks:
  - name: compile_upload_benchmarks_TG
  - name: .benchmarks

###########################################
#     Amazon Graviton buildvariants       #
###########################################

- &enterprise-amazon-linux2-arm64-all-feature-flags-template
  <<: *amazon_linux2_arm64_compile_variant_dependency
  name: &enterprise-amazon-linux2-arm64-all-feature-flags enterprise-amazon-linux2-arm64-all-feature-flags
  display_name: "! Amazon Linux 2 arm64 (all feature flags)"
  cron: "0 */4 * * *" # From the ${project_required_suggested_cron} parameter
  modules:
    - enterprise
  run_on:
    - amazon2-arm64-small
  stepback: true
  expansions: &enterprise-amazon-linux2-arm64-all-feature-flags-expansions
    <<: *linux_arm64_generic_expansions
    scons_cache_scope: shared
    scons_cache_mode: all
    has_packages: false
    jstestfuzz_num_generated_files: 40
    jstestfuzz_concurrent_num_files: 10
    target_resmoke_time: 10
    max_sub_suites: 5
    idle_timeout_factor: 1.5
    exec_timeout_factor: 1.5
    # TODO: These should be al2 specific variants however we haven't moved these variants over to al2
    # For now we are not running burn_in_tag with al2
    burn_in_tag_buildvariants: >-
      enterprise-rhel-80-64-bit-inmem
      enterprise-rhel-80-64-bit-multiversion
    burn_in_tag_compile_task_dependency: archive_dist_test_debug
    test_flags: >-
      --additionalFeatureFlagsFile all_feature_flags.txt
      --excludeWithAnyTags=incompatible_with_amazon_linux,incompatible_with_shard_merge,requires_external_data_source
  tasks:
  - name: analyze_shard_key_jscore_passthrough_gen
  - name: query_golden_classic
  - name: query_golden_cqf
  - name: lint_fuzzer_sanity_patch
  - name: test_api_version_compatibility
  - name: burn_in_tests_gen
    depends_on:
    - name: version_burn_in_gen
      variant: generate-tasks-for-version
      omit_generated_tasks: true
    - name: archive_dist_test_debug
      variant: *amazon_linux2_arm64_compile_variant_name
  - name: burn_in_tags_gen
    depends_on:
    - name: version_burn_in_gen
      variant: generate-tasks-for-version
      omit_generated_tasks: true
    - name: archive_dist_test_debug
      variant: *amazon_linux2_arm64_compile_variant_name
  - name: check_feature_flag_tags
  - name: check_for_todos
  - name: .aggfuzzer
  - name: .aggregation
  - name: aggregation_repeat_queries
  - name: audit
  - name: .auth
  - name: buildscripts_test
  - name: resmoke_end2end_tests
  - name: unittest_shell_hang_analyzer_gen
  - name: .causally_consistent !.sharding
  - name: .change_streams
  - name: .change_stream_fuzzer
  # TODO SERVER-57866: Remove the explicit mentions of change stream multitenant suites.
  - name: change_streams_multitenant_passthrough
  - name: change_streams_multitenant_sharded_collections_passthrough
  - name: cqf
  - name: cqf_disabled_pipeline_opt
  - name: cqf_passthrough
  - name: cqf_parallel
  - name: .misc_js
  - name: .clustered_collections
  - name: .concurrency !.large !.ubsan !.no_txns
  - name: .concurrency .large !.ubsan !.no_txns
  - name: .config_fuzzer !.large
  - name: .config_fuzzer .large
    distros:
    - amazon2-arm64-large
  - name: .config_fuzzer_stress
    distros:
    - amazon2-arm64-large
  - name: disk_wiredtiger
  - name: .encrypt
  - name: feature_flag_multiversion_gen
  - name: idl_tests
  - name: initial_sync_fuzzer_gen
  - name: .jscore .common
  - name: jsCore_column_store_indexes
  - name: jsCore_min_batch_repeat_queries_ese_gsm
  - name: jsCore_txns_large_txns_format
  - name: jsCore_wildcard_indexes
  - name: json_schema
  - name: .jstestfuzz !.flow_control  # Flow control jstestfuzz take longer.
  - name: libunwind_tests
  - name: .multiversion_sanity_check
  - name: mqlrun
  - name: .multi_shard
  - name: multi_stmt_txn_jscore_passthrough_with_migration_gen
  - name: multiversion_gen
  - name: powercycle_smoke
  - name: .query_fuzzer
  - name: .random_multiversion_ds
  - name: .read_write_concern .large
  - name: .read_write_concern !.large
  - name: .replica_sets !.encrypt !.auth
  - name: replica_sets_api_version_jscore_passthrough_gen
  - name: replica_sets_reconfig_jscore_passthrough_gen
  - name: replica_sets_reconfig_jscore_stepdown_passthrough_gen
  - name: replica_sets_reconfig_kill_primary_jscore_passthrough_gen
  - name: retryable_writes_jscore_passthrough_gen
  - name: retryable_writes_jscore_stepdown_passthrough_gen
  - name: .read_only
  - name: .rollbackfuzzer
  - name: sasl
  - name: search
  - name: search_auth
  - name: search_pinned_connections_auth
  - name: search_ssl
  - name: secondary_reads_passthrough_gen
  - name: .serverless
    distros:
    - amazon2-arm64-large
  - name: session_jscore_passthrough
  - name: .shard_split
  - name: .shard_merge
  - name: .sharding .jscore !.wo_snapshot !.multi_stmt
  - name: sharding_api_version_jscore_passthrough_gen
  - name: sharding_api_strict_passthrough_gen
  - name: .sharding .txns
  - name: .sharding .common
  - name: sharding_max_mirroring_opportunistic_secondary_targeting_ese_gcm_gen
  - name: sharded_collections_single_writes_without_shard_key_jscore_passthrough_gen
  - name: sharded_multi_stmt_txn_jscore_passthrough
  - name: .updatefuzzer
  - name: telemetry_passthrough

###########################################
#     Experimental buildvariants          #
###########################################

- &rhel80-debug-ubsan-all-feature-flags-template
  name: &rhel80-debug-ubsan-all-feature-flags rhel80-debug-ubsan-all-feature-flags
  display_name: "* Shared Library UBSAN Enterprise RHEL 8.0 DEBUG (all feature flags)"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  modules:
  - enterprise
  run_on:
  - rhel80-build
  stepback: false
  expansions:
    toolchain_version: stable
    additional_package_targets: >-
      archive-mongocryptd
      archive-mongocryptd-debug
    lang_environment: LANG=C
    san_options: *aubsan_options
    compile_flags: >-
      --variables-files=etc/scons/mongodbtoolchain_${toolchain_version}_clang.vars
      --dbg=on
      --opt=on
      --sanitize=undefined
      --ssl
      --ocsp-stapling=off
      --enable-free-mon=on
      -j$(grep -c ^processor /proc/cpuinfo)
    compile_variant: *rhel80-debug-ubsan-all-feature-flags
    # To force disable feature flags even on the all feature flags variant, please use this file:
    # buildscripts/resmokeconfig/fully_disabled_feature_flags.yml
    test_flags: >-
      --excludeWithAnyTags=requires_ocsp_stapling,requires_increased_memlock_limits
      --excludeWithAnyTags=incompatible_with_shard_merge
      --additionalFeatureFlagsFile all_feature_flags.txt
    multiversion_platform: rhel80
    multiversion_edition: enterprise
    resmoke_jobs_factor: 0.3  # Avoid starting too many mongod's under UBSAN build.
    scons_cache_scope: shared
    separate_debug: off
    large_distro_name: rhel80-build
  tasks:
  - name: compile_and_archive_dist_test_then_package_TG
  - name: .concurrency !.no_txns !.repl !.kill_terminate
  - name: disk_wiredtiger
  - name: generate_buildid_to_debug_symbols_mapping

- &rhel80-debug-aubsan-lite-template
  <<: *linux_debug_aubsan_compile_variant_dependency
  name: &rhel80-debug-aubsan-lite rhel80-debug-aubsan-lite
  display_name: "* Shared Library {A,UB}SAN Enterprise RHEL 8.0 DEBUG"
  cron: "0 */4 * * *" # From the ${project_required_suggested_cron} parameter
  modules:
  - enterprise
  run_on:
  - rhel80-build
  expansions: &aubsan-lite-required-expansions
    compile_variant: *linux_debug_aubsan_compile_variant_name
    lang_environment: LANG=C
    san_options: *aubsan_options
    test_flags: --excludeWithAnyTags=requires_ocsp_stapling,requires_increased_memlock_limits
    resmoke_jobs_factor: 0.3  # Avoid starting too many mongod's under {A,UB}SAN build.
    hang_analyzer_dump_core: false
    max_sub_suites: 3
    num_scons_link_jobs_available: 0.99
    large_distro_name: rhel80-build
    multiversion_platform: rhel80
    multiversion_edition: enterprise
    gcov_tool: /opt/mongodbtoolchain/v4/bin/gcov

  tasks:
  - name: jsCore
  - name: jsCore_txns

- <<: *rhel80-debug-aubsan-lite-template
  name: &rhel80-debug-aubsan-classic-engine rhel80-debug-aubsan-classic-engine
  display_name: "* {A,UB}SAN Enterprise RHEL 8.0 DEBUG (Classic Engine)"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  expansions:
    <<: *aubsan-lite-required-expansions
    test_flags: >-
      --mongodSetParameters="{internalQueryFrameworkControl: forceClassicEngine}"
      --excludeWithAnyTags=requires_ocsp_stapling,requires_increased_memlock_limits
  tasks:
  - name: .aggregation !.sbe_only
  - name: .auth
  - name: audit
  - name: .causally_consistent !.wo_snapshot
  - name: .change_streams
  - name: disk_wiredtiger
  - name: .misc_js
  - name: .concurrency !.ubsan !.no_txns !.kill_terminate !.compute_mode
  - name: .encrypt
  - name: free_monitoring
  - name: external_auth
  - name: external_auth_aws
  - name: external_auth_oidc
  - name: initial_sync_fuzzer_gen
  - name: .jscore .common !.sbe_only
  - name: jsCore_min_batch_repeat_queries_ese_gsm
  - name: jsCore_txns_large_txns_format
  - name: json_schema
  - name: .multi_shard .common
  - name: .query_fuzzer
  - name: .read_write_concern
  - name: replica_sets_large_txns_format_jscore_passthrough
  - name: .replica_sets !.multi_oplog
  - name: .replica_sets .encrypt
  - name: .resharding_fuzzer
  - name: .retry
  - name: .rollbackfuzzer
  - name: .read_only
  - name: sasl
  - name: secondary_reads_passthrough_gen
  - name: session_jscore_passthrough
  - name: .sharding .jscore !.wo_snapshot
  - name: .sharding .common !.csrs !.jstestfuzz
  - name: .updatefuzzer
  - name: .serverless
  - name: unittest_shell_hang_analyzer_gen
  - name: .watchdog
  - name: generate_buildid_to_debug_symbols_mapping

- <<: *rhel80-debug-aubsan-lite-template
  name: &rhel80-debug-aubsan-lite-all-feature-flags-required rhel80-debug-aubsan-lite-all-feature-flags-required
  display_name: "! Shared Library {A,UB}SAN Enterprise RHEL 8.0 DEBUG (all feature flags)"
  cron: "0 */4 * * *" # From the ${project_required_suggested_cron} parameter
  expansions:
    <<: *aubsan-lite-required-expansions
    # To force disable feature flags even on the all feature flags variant, please use this file:
    # buildscripts/resmokeconfig/fully_disabled_feature_flags.yml
    test_flags: >-
      --excludeWithAnyTags=requires_ocsp_stapling
      --excludeWithAnyTags=incompatible_with_shard_merge
      --additionalFeatureFlagsFile all_feature_flags.txt
  tasks:
  - name: jsCore
  - name: jsCore_txns
  - name: jsCore_column_store_indexes
  - name: jsCore_wildcard_indexes

- <<: *rhel80-debug-aubsan-lite-template
  name: &rhel80-debug-aubsan-all-feature-flags rhel80-debug-aubsan-all-feature-flags
  display_name: "* Shared Library {A,UB}SAN Enterprise RHEL 8.0 DEBUG (all feature flags)"
  cron: "0 4 * * *" # From the ${project_required_suggested_cron} parameter
  expansions:
    <<: *aubsan-lite-required-expansions
    # To force disable feature flags even on the all feature flags variant, please use this file:
    # buildscripts/resmokeconfig/fully_disabled_feature_flags.yml
    test_flags: >-
      --excludeWithAnyTags=requires_ocsp_stapling
      --excludeWithAnyTags=incompatible_with_shard_merge
      --additionalFeatureFlagsFile all_feature_flags.txt
  tasks:
  - name: audit
  - name: .aggregation
  - name: .auth
  - name: .concurrency !.no_txns !.repl !.kill_terminate
  - name: .config_fuzzer
  - name: .config_fuzzer_stress
  - name: cqf
  - name: cqf_disabled_pipeline_opt
  - name: cqf_passthrough
  - name: cqf_parallel
  - name: .causally_consistent !.wo_snapshot
  - name: .change_streams
  # TODO SERVER-57866: Remove the explicit mentions of change stream multitenant suites.
  - name: change_streams_multitenant_passthrough
  - name: change_streams_multitenant_sharded_collections_passthrough
  - name: disk_wiredtiger
  - name: external_auth
  - name: external_auth_aws
  - name: external_auth_oidc
  - name: .encrypt
  - name: free_monitoring
  - name: generate_buildid_to_debug_symbols_mapping
  - name: initial_sync_fuzzer_gen
  - name: .jscore .common
  - name: jsCore_column_store_indexes
  - name: jsCore_min_batch_repeat_queries_ese_gsm
  - name: jsCore_txns_large_txns_format
  - name: jsCore_wildcard_indexes
  - name: json_schema
  - name: .misc_js
  - name: .multi_shard .common
  - name: query_golden_classic
  - name: query_golden_cqf
  - name: .query_fuzzer
  - name: .read_write_concern
  - name: replica_sets_large_txns_format_jscore_passthrough
  - name: .replica_sets !.multi_oplog
  - name: .replica_sets .encrypt
  - name: .resharding_fuzzer
  - name: .retry
  - name: .read_only
  - name: .rollbackfuzzer
  - name: sasl
  - name: secondary_reads_passthrough_gen
  - name: session_jscore_passthrough
  - name: streams
  - name: .sharding .jscore !.wo_snapshot
  - name: .sharding .common !.csrs
  - name: .serverless
  - name: .shard_split
  - name: .shard_merge
  - name: telemetry_passthrough
  - name: .updatefuzzer
  - name: .watchdog

- &enterprise-rhel80-debug-tsan-template
  name: &enterprise-rhel80-debug-tsan enterprise-rhel80-debug-tsan
  display_name: "* TSAN Enterprise RHEL 8.0 DEBUG"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  modules:
  - enterprise
  run_on:
  - rhel80-large
  stepback: false
  expansions: &enterprise-rhel80-debug-tsan-expansions-template
    additional_package_targets: >-
      archive-mongocryptd
      archive-mongocryptd-debug
    lang_environment: LANG=C
    toolchain_version: stable
    compile_variant: *enterprise-rhel80-debug-tsan
    # If you add anything to san_options, make sure the appropriate
    # changes are also made to SConstruct.
    #
    # TODO SERVER-49121: die_after_fork=0 is a temporary setting to
    # allow tests to continue while we figure out why we're running
    # afoul of it.
    #
    # TODO SERVER-65936: report_thread_leaks=0 suppresses reporting
    # thread leaks, which we have because we don't do a clean shutdown
    # of the ServiceContext.
    #
    san_options: TSAN_OPTIONS="abort_on_error=1:disable_coredump=0:handle_abort=1:halt_on_error=1:report_thread_leaks=0:die_after_fork=0:suppressions=etc/tsan.suppressions:external_symbolizer_path=/opt/mongodbtoolchain/v4/bin/llvm-symbolizer"
    compile_flags: >-
      --variables-files=etc/scons/mongodbtoolchain_${toolchain_version}_clang.vars
      --dbg=on
      --opt=on
      --allocator=system
      --sanitize=thread
      --ssl
      --enable-free-mon=on
      --use-libunwind=off
      --link-model=dynamic
      -j$(grep -c ^processor /proc/cpuinfo)
    # Avoid starting too many mongod's under TSAN build.
    resmoke_jobs_factor: 0.3
    scons_cache_scope: shared
    separate_debug: off
    large_distro_name: rhel80-medium
    multiversion_platform: rhel80
    multiversion_edition: enterprise
  tasks:
  - name: compile_test_and_package_serial_TG
  # - name: compile_integration_and_test_parallel_stream_TG # Not passing
  # - name: test_api_version_compatibility # Not relevant for TSAN
  # - name: burn_in_tests_gen # No burn in tests needed
  #   depends_on:
  #   - name: version_burn_in_gen
  #     variant: generate-tasks-for-version
  #     omit_generated_tasks: true
  #   - name: archive_dist_test_debug
  #     variant: *enterprise-rhel80-debug-tsan
  - name: check_feature_flag_tags
  - name: .aggfuzzer !.feature_flag_guarded
  # - name: .aggregation !.feature_flag_guarded # Not passing
  - name: audit
  # - name: .auth  # Not passing
  # - name: burn_in_tags_gen # No burn in tests needed
  #   depends_on:
  #   - name: version_burn_in_gen
  #     variant: generate-tasks-for-version
  #     omit_generated_tasks: true
  #   - name: archive_dist_test_debug
  #     variant: *enterprise-rhel80-debug-tsan
  - name: buildscripts_test
  # - name: unittest_shell_hang_analyzer_gen # Not passing
  # - name: .config_fuzzer # Not passing
  - name: config_fuzzer_jsCore
  - name: cqf
  - name: cqf_disabled_pipeline_opt
  - name: cqf_passthrough
  - name: cqf_parallel
  # - name: .causally_consistent !.sharding # Not passing
  # - name: .change_streams # Not passing
  # - name: .change_stream_fuzzer # Not passing
  # - name: .misc_js # Not passing
  # - name: .concurrency !.large !.ubsan !.no_txns # Not passing
  # - name: .concurrency .large !.ubsan !.no_txns # Not passing
  #   distros:
  #   - rhel80-medium
  - name: disk_wiredtiger
  # - name: .encrypt # Not passing
  # - name: idl_tests # Not relevant for TSAN
  - name: initial_sync_fuzzer_gen
  #   distros:
  #   - rhel80-medium
  - name: jsCore
    distros:
    - rhel80-xlarge
  # - name: .jscore .common !jsCore # Not passing
  - name: jsCore_min_batch_repeat_queries_ese_gsm
  - name: jsCore_txns_large_txns_format
  - name: json_schema
  - name: .jstestfuzz !.flow_control  # Flow control jstestfuzz take longer.
  # - name: libunwind_tests # Cant be used because tsan does not use libunwind
  # - name: .multiversion_sanity_check # Multiversion does not pass yet, also making this work is going to be pretty tricky
  - name: mqlrun
  # - name: .multi_shard # Not passing
  # - name: multi_stmt_txn_jscore_passthrough_with_migration_gen # Not passing
  # - name: multiversion_gen # Multiversion does not pass yet, also making this work is going to be pretty tricky
  - name: .query_fuzzer
  - name: query_golden_classic
  - name: query_golden_cqf
  # - name: .random_multiversion_ds # Multiversion does not pass yet, also making this work is going to be pretty tricky
  # - name: .read_write_concern .large # Not passing
  #   distros:
  #   - rhel80-medium
  # - name: .read_write_concern !.large # Not passing
  # - name: .replica_sets !.encrypt !.auth # Not passing
  #   distros:
  #   - rhel80-xlarge
  # - name: replica_sets_api_version_jscore_passthrough_gen # Not passing
  # - name: replica_sets_reconfig_jscore_passthrough_gen # Not passing
  # - name: replica_sets_reconfig_jscore_stepdown_passthrough_gen # Not passing
  #   distros:
  #   - rhel80-xlarge
  # - name: replica_sets_reconfig_kill_primary_jscore_passthrough_gen # Not passing
  #   distros:
  #   - rhel80-xlarge
  # - name: retryable_writes_jscore_passthrough_gen # Not passing
  # - name: retryable_writes_jscore_stepdown_passthrough_gen # Not passing
  #   distros:
  #   - rhel80-medium
  - name: .read_only
  - name: .rollbackfuzzer
  - name: sasl
  - name: search
  - name: search_auth
  - name: search_pinned_connections_auth
  - name: search_ssl
  - name: session_jscore_passthrough
  # - name: .sharding .jscore !.wo_snapshot !.multi_stmt # Not passing
  # - name: sharding_api_version_jscore_passthrough_gen # Not passing
  # - name: .sharding .txns # Not passing
  # - name: .sharding .common # Not passing
  # - name: sharding_max_mirroring_opportunistic_secondary_targeting_ese_gcm_gen # Not passing
  - name: .stitch
  # - name: .crypt # Doesn't pass on v4
  #   distros:
  #   - rhel80-xlarge
  # - name: .updatefuzzer # Cannot find the variant on older versions. Should not be enabled with TSAN
  # - name: secondary_reads_passthrough_gen # Not passing
  - name: server_discovery_and_monitoring_json_test_TG
  # - name: .serverless # Not passing
  #   distros:
  #   - rhel80-xlarge
  - name: server_selection_json_test_TG
    distros:
    - rhel80-xlarge
  - name: generate_buildid_to_debug_symbols_mapping

- &enterprise-rhel80-debug-complete-tsan-template
  name: &enterprise-rhel80-debug-complete-tsan enterprise-rhel80-debug-complete-tsan
  display_name: "~ TSAN Enterprise RHEL 8.0 COMPLETE DEBUG"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  activate: false
  modules:
  - enterprise
  run_on:
  - rhel80-large
  stepback: false
  expansions:
    <<: *enterprise-rhel80-debug-tsan-expansions-template
    compile_variant: *enterprise-rhel80-debug-complete-tsan
  tasks:
  - name: compile_test_and_package_serial_TG
  - name: compile_integration_and_test_parallel_stream_TG
  - name: .aggregation !.feature_flag_guarded
  - name: .auth
  - name: unittest_shell_hang_analyzer_gen
  - name: .causally_consistent !.sharding
  - name: .change_streams
  - name: .change_stream_fuzzer
  - name: .misc_js
  - name: .concurrency !.large !.ubsan !.no_txns !.compute_mode
  - name: .concurrency .large !.ubsan !.no_txns !.compute_mode
    distros:
    - rhel80-large
  - name: .config_fuzzer
  - name: .encrypt
  - name: .jscore .common !jsCore
  # - name: libunwind_tests # Cant be used because tsan does not use libunwind
  # - name: .multiversion_sanity_check # Multiversion does not pass yet, also making this work is going to be pretty tricky
  - name: .multi_shard
  - name: multi_stmt_txn_jscore_passthrough_with_migration_gen
  # - name: multiversion_gen # Multiversion does not pass yet, also making this work is going to be pretty tricky
  # - name: .random_multiversion_ds # Multiversion does not pass yet, also making this work is going to be pretty tricky
  - name: .read_write_concern .large
    distros:
    - rhel80-medium
  - name: .read_write_concern !.large
  - name: .replica_sets !.encrypt !.auth
    distros:
    - rhel80-xlarge
  - name: replica_sets_api_version_jscore_passthrough_gen
  - name: replica_sets_reconfig_jscore_passthrough_gen
  - name: replica_sets_reconfig_jscore_stepdown_passthrough_gen
    distros:
    - rhel80-xlarge
  - name: replica_sets_reconfig_kill_primary_jscore_passthrough_gen
    distros:
    - rhel80-xlarge
  - name: retryable_writes_jscore_passthrough_gen
  - name: retryable_writes_jscore_stepdown_passthrough_gen
    distros:
    - rhel80-medium
  - name: .sharding .jscore !.wo_snapshot !.multi_stmt
  - name: sharding_api_version_jscore_passthrough_gen
  - name: .sharding .txns
  - name: .sharding .common
  - name: sharding_max_mirroring_opportunistic_secondary_targeting_ese_gcm_gen
  # - name: .crypt # Doesn't pass on v4
  #   distros:
  #   - rhel80-xlarge
  # - name: .updatefuzzer # Cannot find the variant on older versions
  - name: secondary_reads_passthrough_gen
  - name: .serverless
    distros:
    - rhel80-xlarge
  - name: streams
  - name: generate_buildid_to_debug_symbols_mapping

- name: &enterprise-rhel80-no-latch-64-bit enterprise-rhel80-no-latch-64-bit
  display_name: "~ Enterprise RHEL 8.0 (without Diagnostic Latches)"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  modules:
  - enterprise
  expansions:
    compile_flags: >-
      MONGO_DISTMOD=rhel80
      -j$(grep -c ^processor /proc/cpuinfo)
      --variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
      --use-diagnostic-latches=off
      --link-model=dynamic
    scons_cache_mode: all
    scons_cache_scope: shared
    num_scons_link_jobs_available: 0.99
    compile_variant: *enterprise-rhel80-no-latch-64-bit
  tasks:
  - name: compile_test_and_package_parallel_core_stream_TG
    distros:
    - rhel80-build
  - name: compile_test_and_package_parallel_unittest_stream_TG
    distros:
    - rhel80-build
  - name: compile_test_and_package_parallel_dbtest_stream_TG
    distros:
    - rhel80-build
  - name: generate_buildid_to_debug_symbols_mapping
    distros:
    - rhel80-build

- name: &enterprise-rhel80-unoptimized-64-bit enterprise-rhel80-unoptimized-64-bit
  display_name: "~ Enterprise RHEL 8.0 DEBUG (Unoptimized)"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  modules:
  - enterprise
  expansions:
    compile_flags: >-
      MONGO_DISTMOD=rhel80
      -j$(grep -c ^processor /proc/cpuinfo)
      --dbg=on
      --opt=off
      --variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
      --detect-odr-violations
      --link-model=dynamic
    scons_cache_mode: all
    scons_cache_scope: shared
    num_scons_link_jobs_available: 0.99
    compile_variant: *enterprise-rhel80-unoptimized-64-bit
  tasks:
  - name: compile_test_and_package_parallel_core_stream_TG
    distros:
    - rhel80-build
  - name: compile_test_and_package_parallel_unittest_stream_TG
    distros:
    - rhel80-build
  - name: compile_test_and_package_parallel_dbtest_stream_TG
    distros:
    - rhel80-build
  - name: generate_buildid_to_debug_symbols_mapping
    distros:
    - rhel80-build

- name: &enterprise-rhel80-fixed-service-executor-64-bit enterprise-rhel80-fixed-service-executor-64-bit
  display_name: "~ Enterprise RHEL 8.0 (with FixedServiceExecutor)"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  modules:
  - enterprise
  run_on:
  - rhel80-small
  expansions:
    <<: *linux_x86_generic_expansions
    compile_flags: >-
      MONGO_DISTMOD=rhel80
      -j$(grep -c ^processor /proc/cpuinfo)
      --variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
      --link-model=dynamic
    test_flags: >-
      --mongosSetParameters="{initialServiceExecutorUseDedicatedThread: false}"
      --mongodSetParameters="{initialServiceExecutorUseDedicatedThread: false}"
    large_distro_name: rhel80-build
    compile_variant: *enterprise-rhel80-fixed-service-executor-64-bit
  tasks:
  - name: compile_test_and_package_parallel_core_stream_TG
    distros:
    - rhel80-build
  - name: compile_test_and_package_parallel_unittest_stream_TG
    distros:
    - rhel80-build
  - name: compile_test_and_package_parallel_dbtest_stream_TG
    distros:
    - rhel80-build
  - name: compile_integration_and_test_parallel_stream_TG
    distros:
    - rhel80-large
  - name: .aggregation !.no_async !.feature_flag_guarded
  - name: sharding_auth_gen
  - name: .sharding .causally_consistent !.wo_snapshot
  - name: .concurrency .common !.kill_terminate
  - name: .jscore .common
  - name: noPassthrough_gen
  - name: noPassthroughWithMongod_gen
  - name: .sharding .jscore !.wo_snapshot !.multi_stmt
  - name: .sharding .common !.csrs !.encrypt
  - name: sharding_max_mirroring_opportunistic_secondary_targeting_gen
  - name: generate_buildid_to_debug_symbols_mapping

- name: &enterprise-rhel80-sdam-replica-set-monitor-64-bit enterprise-rhel80-sdam-replica-set-monitor-64-bit
  display_name: "~ Enterprise RHEL 8.0 (with SdamReplicaSetMonitor)"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  modules:
  - enterprise
  run_on:
  - rhel80-small
  expansions:
    <<: *linux_x86_generic_expansions
    compile_flags: >-
      MONGO_DISTMOD=rhel80
      -j$(grep -c ^processor /proc/cpuinfo)
      --variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
      --link-model=dynamic
    test_flags: >-
      --mongosSetParameters="{replicaSetMonitorProtocol: sdam}"
      --mongodSetParameters="{replicaSetMonitorProtocol: sdam}"
      --excludeWithAnyTags=requires_streamable_rsm
    large_distro_name: rhel80-build
    compile_variant: *enterprise-rhel80-sdam-replica-set-monitor-64-bit
  tasks:
  - name: compile_test_and_package_parallel_core_stream_TG
    distros:
    - rhel80-build
  - name: compile_test_and_package_parallel_unittest_stream_TG
    distros:
    - rhel80-build
  - name: compile_test_and_package_parallel_dbtest_stream_TG
    distros:
    - rhel80-build
  - name: compile_integration_and_test_parallel_stream_TG
    distros:
    - rhel80-large
  - name: .aggregation !.no_async !.feature_flag_guarded
  - name: sharding_auth_gen
  - name: .sharding .causally_consistent !.wo_snapshot
  - name: .concurrency .common !.kill_terminate
  - name: .jscore .common
  - name: .sharding .jscore !.wo_snapshot !.multi_stmt
  - name: .sharding .common !.csrs !.encrypt
  - name: sharding_max_mirroring_opportunistic_secondary_targeting_gen
  - name: generate_buildid_to_debug_symbols_mapping

- name: &enterprise-rhel80-sharding-task-executor-pool-rsm-matchPrimary-64-bit enterprise-rhel80-sharding-task-executor-pool-rsm-matchPrimary-64-bit
  display_name: "~ Enterprise RHEL 8.0 (with {ShardingTaskExecutorPoolReplicaSetMatching: \"matchPrimaryNode\"})"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  modules:
  - enterprise
  run_on:
  - rhel80-small
  expansions:
    <<: *linux_x86_generic_expansions
    compile_flags: >-
      MONGO_DISTMOD=rhel80
      -j$(grep -c ^processor /proc/cpuinfo)
      --variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
      --link-model=dynamic
    test_flags: >-
      --mongosSetParameters="ShardingTaskExecutorPoolReplicaSetMatching: \"matchPrimaryNode\""
      --excludeWithAnyTags=sets_replica_set_matching_strategy
    large_distro_name: rhel80-build
    compile_variant: *enterprise-rhel80-sharding-task-executor-pool-rsm-matchPrimary-64-bit
  tasks:
  - name: compile_test_and_package_parallel_core_stream_TG
    distros:
    - rhel80-build
  - name: compile_test_and_package_parallel_unittest_stream_TG
    distros:
    - rhel80-build
  - name: compile_test_and_package_parallel_dbtest_stream_TG
    distros:
    - rhel80-build
  - name: compile_integration_and_test_parallel_stream_TG
    distros:
    - rhel80-large
  - name: .aggregation !.no_async !.feature_flag_guarded
  - name: sharding_auth_gen
  - name: .sharding .causally_consistent !.wo_snapshot
  - name: .concurrency .common !.kill_terminate
  - name: .jscore .common
  - name: .sharding .jscore !.wo_snapshot !.multi_stmt
  - name: .sharding .common !.csrs !.encrypt
  - name: sharding_max_mirroring_opportunistic_secondary_targeting_gen
  - name: generate_buildid_to_debug_symbols_mapping

- name: &enterprise-rhel80-sharding-task-executor-pool-rsm-matchBusiest-64-bit enterprise-rhel80-sharding-task-executor-pool-rsm-matchBusiest-64-bit
  display_name: "~ Enterprise RHEL 8.0 (with {ShardingTaskExecutorPoolReplicaSetMatching: \"matchBusiestNode\"})"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  run_on:
  - rhel80-small
  modules:
  - enterprise
  expansions:
    <<: *linux_x86_generic_expansions
    scons_cache_scope: shared
    scons_cache_mode: all
    num_scons_link_jobs_available: 0.99
    compile_flags: >-
      MONGO_DISTMOD=rhel80
      -j$(grep -c ^processor /proc/cpuinfo)
      --variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
      --link-model=dynamic
    multiversion_platform: rhel80
    multiversion_edition: enterprise
    test_flags: >-
      --mongosSetParameters="ShardingTaskExecutorPoolReplicaSetMatching: \"matchBusiestNode\""
      --excludeWithAnyTags=sets_replica_set_matching_strategy
    large_distro_name: rhel80-build
    compile_variant: *enterprise-rhel80-sharding-task-executor-pool-rsm-matchBusiest-64-bit
  tasks:
  - name: compile_test_and_package_parallel_core_stream_TG
    distros:
    - rhel80-build
  - name: compile_test_and_package_parallel_unittest_stream_TG
    distros:
    - rhel80-build
  - name: compile_test_and_package_parallel_dbtest_stream_TG
    distros:
    - rhel80-build
  - name: compile_integration_and_test_parallel_stream_TG
    distros:
    - rhel80-large
  - name: .aggregation !.no_async !.feature_flag_guarded
  - name: sharding_auth_gen
  - name: .sharding .causally_consistent !.wo_snapshot
  - name: .concurrency .common !.kill_terminate
  - name: .jscore .common
  - name: .sharding .jscore !.wo_snapshot !.multi_stmt
  - name: .sharding .common !.csrs !.encrypt
  - name: sharding_max_mirroring_opportunistic_secondary_targeting_gen
  - name: generate_buildid_to_debug_symbols_mapping

- name: &enterprise-rhel80-sharding-task-executor-pool-rsm-disabled-64-bit enterprise-rhel80-sharding-task-executor-pool-rsm-disabled-64-bit
  display_name: "~ Enterprise RHEL 8.0 (with {ShardingTaskExecutorPoolReplicaSetMatching: \"disabled\"})"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  run_on:
  - rhel80-small
  modules:
  - enterprise
  expansions:
    <<: *linux_x86_generic_expansions
    scons_cache_scope: shared
    scons_cache_mode: all
    num_scons_link_jobs_available: 0.99
    compile_flags: >-
      MONGO_DISTMOD=rhel80
      -j$(grep -c ^processor /proc/cpuinfo)
      --variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
      --link-model=dynamic
    multiversion_platform: rhel80
    multiversion_edition: enterprise
    test_flags: >-
      --mongosSetParameters="ShardingTaskExecutorPoolReplicaSetMatching: \"disabled\""
      --excludeWithAnyTags=sets_replica_set_matching_strategy
    large_distro_name: rhel80-build
    compile_variant: *enterprise-rhel80-sharding-task-executor-pool-rsm-disabled-64-bit
  tasks:
  - name: compile_test_and_package_parallel_core_stream_TG
    distros:
    - rhel80-build
  - name: compile_test_and_package_parallel_unittest_stream_TG
    distros:
    - rhel80-build
  - name: compile_test_and_package_parallel_dbtest_stream_TG
    distros:
    - rhel80-build
  - name: compile_integration_and_test_parallel_stream_TG
    distros:
    - rhel80-large
  - name: .aggregation !.no_async !.feature_flag_guarded
  - name: sharding_auth_gen
  - name: .sharding .causally_consistent !.wo_snapshot
  - name: .concurrency .common !.kill_terminate
  - name: .jscore .common
  - name: .sharding .jscore !.wo_snapshot !.multi_stmt
  - name: .sharding .common !.csrs !.encrypt
  - name: sharding_max_mirroring_opportunistic_secondary_targeting_gen
  - name: generate_buildid_to_debug_symbols_mapping

- name: &enterprise-rhel80-join-ingress-sessions-on-shutdown enterprise-rhel80-join-ingress-sessions-on-shutdown
  display_name: "~ Enterprise RHEL 8.0 (with {joinIngressSessionsOnShutdown: \"true\"})"
  activate: false
  run_on:
    - rhel80-small
  modules:
  - enterprise
  expansions:
    <<: *linux_x86_generic_expansions
    scons_cache_scope: shared
    compile_flags: >-
      MONGO_DISTMOD=rhel80
      -j$(grep -c ^processor /proc/cpuinfo)
      --variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
      --link-model=dynamic
    multiversion_platform: rhel80
    multiversion_edition: enterprise
    test_flags: >-
        --mongosSetParameters="joinIngressSessionsOnShutdown: \"true\""
        --mongodSetParameters="joinIngressSessionsOnShutdown: \"true\""
    large_distro_name: rhel80-build
    compile_variant: *enterprise-rhel80-join-ingress-sessions-on-shutdown
  tasks:
  - name: compile_test_and_package_serial_TG
    distros:
    - rhel80-build
    patch_only: true
  - name: compile_integration_and_test_no_audit_parallel_stream_TG
    distros:
    - rhel80-large
    patch_only: true
  - name: .aggregation !.no_async !.feature_flag_guarded
    patch_only: true
  - name: sharding_auth_gen
    patch_only: true
  - name: .sharding .causally_consistent !.wo_snapshot
    patch_only: true
  - name: .concurrency .common !.kill_terminate
    patch_only: true
  - name: .jscore .common
    patch_only: true
  - name: .sharding .jscore !.wo_snapshot !.multi_stmt
    patch_only: true
  - name: .sharding .common !.csrs !.encrypt
    patch_only: true
  - name: sharding_max_mirroring_opportunistic_secondary_targeting_gen
    patch_only: true

- name: &shared-scons-cache-pruning shared-scons-cache-pruning
  display_name: "Shared SCons Cache Pruning"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  run_on:
  - ubuntu2204-small
  stepback: false
  tasks:
  - name: shared_scons_cache_pruning

- name: &windows-shared-scons-cache-pruning windows-shared-scons-cache-pruning
  display_name: "Windows shared SCons Cache Pruning"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  run_on:
  - windows-vsCurrent-small
  stepback: false
  expansions:
    python: '/cygdrive/c/python/python37/python.exe'
  tasks:
  - name: win_shared_scons_cache_pruning

- <<: *enterprise-amazon-linux2-arm64-all-feature-flags-template
  name: &commit-queue commit-queue
  display_name: "~ Commit Queue"
  cron: "0 4 * * 0" # From the ${project_weekly_cron} parameter
  stepback: false
  expansions:
    <<: *linux_arm64_generic_expansions
    scons_cache_scope: shared
    scons_cache_mode: all
    commit_queue_alternate_cache: amazon-linux2-arm64-compile
    has_packages: false
    compile_flags: >-
      --ssl
      MONGO_DISTMOD=amazon2
      -j$(grep -c ^processor /proc/cpuinfo)
      --variables-files=etc/scons/mongodbtoolchain_stable_gcc.vars
      --link-model=dynamic
    crypt_task_compile_flags: >-
      SHLINKFLAGS_EXTRA="-Wl,-Bsymbolic
      -Wl,--no-gnu-unique"
      CCFLAGS="-fno-gnu-unique"
    clang_tidy_toolchain: v4
    num_scons_unit_cc_jobs_available: 0.75
    compile_variant: *commit-queue
  depends_on: []
  tasks:
  - name: compile_ninja_quick_TG
  - name: compile_test_and_package_parallel_core_stream_TG
    distros:
    - amazon2-arm64-xlarge-commitqueue
  - name: compile_test_and_package_parallel_unittest_stream_TG
    distros:
    - amazon2-arm64-xlarge-commitqueue
  - name: compile_test_and_package_parallel_dbtest_stream_TG
    distros:
    - amazon2-arm64-xlarge-commitqueue
  - name: jsCore
    distros:
    - amazon2-arm64-large
  - name: .lint
  - name: test_api_version_compatibility
  - name: validate_commit_message
  - name: lint_large_files_check
  - name: check_feature_flag_tags
  - name: compile_venv_deps_check
  - name: resmoke_validation_tests
  - name: version_gen_validation
    distros:
    - ubuntu2004-small

- name: &windows-dynamic-visibility-test windows-dynamic-visibility-test
  display_name: "~ Shared Library Windows (visibility test)"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  expansions:
    # --link-model=dynamic is set by visiblity_test's task_compile_flags
    # expansion
    compile_flags: >-
      CPPPATH="c:/sasl/include"
      LIBPATH="c:/sasl/lib"
      -j$(( $(grep -c ^processor /proc/cpuinfo) / 2 ))
      --win-version-min=win10
    python: '/cygdrive/c/python/python37/python.exe'
    ext: zip
    has_packages: false
    scons_cache_scope: shared
    scons_cache_mode: all
    num_scons_link_jobs_available: 0.99
    compile_variant: *windows-dynamic-visibility-test
  tasks:
  - name: visibility_test_TG
    distros:
    - windows-vsCurrent-large

### QO & QE Patch-Specific Build Variants ###

# The CQF feature flag is currently part of the always-disabled feature flags list, so it is not
# enabled in all-feature-flags variants besides this one. This variant allows us to get some initial
# coverage for CQF without disrupting coverage for other feature flags (in particular, SBE).
# TODO SERVER-71163: Remove this variant once the CQF feature flag is not always-disabled.
- <<: *linux_x86_dynamic_compile_variant_dependency
  name: enterprise-rhel-80-64-bit-dynamic-all-feature-flags-required-and-cqf-enabled-patch-only
  display_name: "Shared Library Enterprise RHEL 8.0 Query Patch Only (all feature flags and CQF enabled)"
  cron: "0 4 * * 0" # From the ${project_weekly_cron} parameter # This is a patch-only variant but we run on mainline to pick up task history.
  modules:
  - enterprise
  run_on:
  - rhel80-small
  stepback: false
  expansions:
    <<: *enterprise-rhel-80-64-bit-dynamic-all-feature-flags-expansions
    test_flags: >-
      --excludeWithAnyTags=cqf_incompatible
      --excludeWithAnyTags=resource_intensive
      --mongosSetParameters="{featureFlagCommonQueryFramework: true, internalQueryFrameworkControl: 'tryBonsai'}"
      --mongodSetParameters="{featureFlagCommonQueryFramework: true, internalQueryFrameworkControl: 'tryBonsai'}"
  tasks:
  - name: .aggregation .common
  - name: causally_consistent_jscore_txns_passthrough
  - name: cqf
  - name: cqf_disabled_pipeline_opt
  - name: cqf_parallel
  - name: .jscore .common
  - name: .jstestfuzz !.flow_control  # Flow control jstestfuzz take longer.
  - name: noPassthrough_gen
  - name: query_golden_cqf
  - name: retryable_writes_jscore_passthrough_gen

- <<: *enterprise-rhel-80-64-bit-dynamic-classic-engine
  name: &enterprise-rhel-80-64-bit-dynamic-classic-engine-query-patch-only enterprise-rhel-80-64-bit-dynamic-classic-engine-query-patch-only
  display_name: "~ Shared Library Enterprise RHEL 8.0 Query Patch Only (Classic Engine)"
  cron: "0 4 * * 0" # From the ${project_weekly_cron} parameter # This is a patch-only variant but we run on mainline to pick up task history.
  expansions:
    <<: *enterprise-rhel-80-64-bit-dynamic-expansions
    jstestfuzz_num_generated_files: 20
    jstestfuzz_concurrent_num_files: 5
    target_resmoke_time: 30
    max_sub_suites: 3
    test_flags: >-
      --mongodSetParameters="{internalQueryFrameworkControl: forceClassicEngine}"
      --excludeWithAnyTags=resource_intensive

- <<: *enterprise-rhel-80-64-bit-dynamic-all-feature-flags-template
  name: &enterprise-rhel-80-64-bit-dynamic-all-feature-flags-required-query-patch-only enterprise-rhel-80-64-bit-dynamic-all-feature-flags-required-query-patch-only
  display_name: "~ Shared Library Enterprise RHEL 8.0 Query Patch Only (all feature flags)"
  cron: "0 4 * * 0" # From the ${project_weekly_cron} parameter # This is a patch-only variant but we run on mainline to pick up task history.
  expansions:
    <<: *enterprise-rhel-80-64-bit-dynamic-all-feature-flags-expansions
    jstestfuzz_num_generated_files: 20
    jstestfuzz_concurrent_num_files: 5
    target_resmoke_time: 30
    max_sub_suites: 3
    test_flags: >-
      --additionalFeatureFlagsFile all_feature_flags.txt
      --excludeWithAnyTags=resource_intensive
      --excludeWithAnyTags=incompatible_with_shard_merge

- <<: *enterprise-rhel-80-64-bit-dynamic-all-feature-flags-template
  name: &enterprise-rhel-80-64-bit-dynamic-all-feature-flags-required-security-patch-only enterprise-rhel-80-64-bit-dynamic-all-feature-flags-required-security-patch-only
  display_name: "~ Shared Library Enterprise RHEL 8.0 Security Patch Only (all feature flags)"
  cron: "0 4 * * 0" # From the ${project_weekly_cron} parameter # This is a patch-only variant but we run on mainline to pick up task history.
  expansions:
    <<: *enterprise-rhel-80-64-bit-dynamic-all-feature-flags-expansions
    target_resmoke_time: 15
    max_sub_suites: 15
  tasks:
  - name: burn_in_tests_gen
    depends_on:
    - name: version_burn_in_gen
      variant: generate-tasks-for-version
      omit_generated_tasks: true
    - name: archive_dist_test_debug
      variant: *linux_x86_dynamic_compile_variant_name
  - name: .audit .patch_build
  - name: .sasl .patch_build
  - name: .encrypt .patch_build
  - name: external_auth
  - name: external_auth_aws
  - name: external_auth_oidc
  - name: lint_fuzzer_sanity_patch

- name: &enterprise-ubuntu1804-64-libvoidstar enterprise-ubuntu1804-64-libvoidstar
  display_name: "~ Enterprise Ubuntu 18.04 w/ libvoidstar"
  modules:
  - enterprise
  run_on:
  - ubuntu1804-large
  stepback: false
  expansions:
    compile_variant: *enterprise-ubuntu1804-64-libvoidstar
    # Do not set link-model=dynamic on this build. The antithesis image builder
    # scripts cannot handle the shared library build
    compile_flags: >-
      --ssl
      --ocsp-stapling=off MONGO_DISTMOD=ubuntu1804
      -j$(grep -c ^processor /proc/cpuinfo)
      --variables-files=etc/scons/mongodbtoolchain_stable_clang.vars
      CCFLAGS="-fsanitize-coverage=trace-pc-guard"
      LIBS="voidstar"
    multiversion_platform: ubuntu1804
    multiversion_edition: enterprise
    repo_edition: enterprise
    large_distro_name: ubuntu1804-build
    scons_cache_scope: shared
  tasks:
  - name: compile_and_archive_dist_test_TG
  - name: antithesis_build_test_push_TG
  - name: generate_buildid_to_debug_symbols_mapping

- <<: *enterprise-windows-nopush-template
  name: &enterprise-windows-benchmarks enterprise-windows-benchmarks
  display_name: "* Enterprise Windows (Benchmarks)"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  expansions:
    <<: *enterprise-windows-nopush-expansions-template
    compile_variant: *enterprise-windows-benchmarks
  tasks:
  - name: compile_upload_benchmarks_TG
    distros:
    - windows-vsCurrent-large
  - name: .benchmarks !benchmarks_orphaned

- <<: *enterprise-windows-nopush-template
  name: &enterprise-windows-wtdevelop enterprise-windows-wtdevelop
  display_name: "~ Enterprise Windows WiredTiger develop"
  cron: "0 */4 * * *" # From the ${project_required_suggested_cron} parameter
  modules:
  - enterprise
  - wtdevelop
  expansions:
    <<: *enterprise-windows-nopush-expansions-template
    use_wt_develop: true
    compile_variant: *enterprise-windows-wtdevelop

### QO & QE Patch-Specific Build Variants ###
- <<: *enterprise-windows-nopush-template
  name: &windows-compile-query-patch-only windows-compile-query-patch-only
  display_name: "~ Windows Compile Query Patch Only"
  cron: "0 4 * * 0" # From the ${project_weekly_cron} parameter # This is a patch-only variant but we run on mainline to pick up task history.
  expansions:
    <<: *enterprise-windows-nopush-expansions-template
    compile_variant: *windows-compile-query-patch-only
  tasks:
  - name: compile_dist_test_TG
    distros:
    - windows-vsCurrent-large

- &rhel80-debug-aubsan-lite_fuzzer-template
  name: &rhel80-debug-aubsan-lite_fuzzer rhel80-debug-aubsan-lite_fuzzer
  display_name: "{A,UB}SAN Enterprise RHEL 8.0 FUZZER"
  cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
  modules:
  - enterprise
  run_on:
  - rhel80-build
  stepback: false
  expansions:
    additional_package_targets: >-
      archive-mongocryptd
      archive-mongocryptd-debug
    lang_environment: LANG=C
    toolchain_version: stable
    # If you add anything to san_options, make sure the appropriate changes are
    # also made to SConstruct.
    san_options: *aubsan_options
    compile_flags: >-
      LINKFLAGS=-nostdlib++
      LIBS=stdc++
      --variables-files=etc/scons/mongodbtoolchain_${toolchain_version}_clang.vars
      --dbg=on
      --opt=on
      --allocator=system
      --sanitize=undefined,address,fuzzer
      --ssl
      --ocsp-stapling=off
      -j$(grep -c ^processor /proc/cpuinfo)
    test_flags: --excludeWithAnyTags=requires_ocsp_stapling
    resmoke_jobs_factor: 0.3  # Avoid starting too many mongod's under {A,UB}SAN build.
    hang_analyzer_dump_core: false
    scons_cache_scope: shared
    separate_debug: off
    compile_variant: *rhel80-debug-aubsan-lite_fuzzer
  display_tasks:
  - *libfuzzertests
  tasks:
  - name: compile_archive_and_run_libfuzzertests_TG