9
9
from shrub .v3 .evg_task import EvgTask , EvgTaskRef
10
10
from shrub .v3 .evg_task_group import EvgTaskGroup
11
11
12
+ from itertools import product
13
+
12
14
13
15
TAG = 'abi-stability'
14
16
15
17
16
18
# pylint: disable=line-too-long
17
19
# fmt: off
18
20
MATRIX = [
19
- ('polyfill' , 11 ),
20
- ('stdlib' , 17 ),
21
+ ('impls' , 11 ),
22
+ ('impls' , 17 ),
23
+ ('stdlib' , 17 ),
24
+ ('stdlib' , 20 ),
25
+ ('stdlib' , 23 ),
21
26
]
22
27
# fmt: on
23
28
# pylint: enable=line-too-long
@@ -43,7 +48,7 @@ class AbiComplianceCheck(Function):
43
48
display_name = 'ABI Compliance Check (Stable): ' ,
44
49
local_files_include_filter = 'cxx-abi/compat_reports/**/compat_report.html' ,
45
50
permissions = 'public-read' ,
46
- remote_file = 'mongo-cxx-driver/${branch_name}/${revision}/${version_id}/${build_id}/${execution}/abi-compliance-check/abi/' ,
51
+ remote_file = 'mongo-cxx-driver/${branch_name}/${revision}/${version_id}/${build_id}/${task_id}/${ execution}/abi-compliance-check/abi/' ,
47
52
),
48
53
s3_put (
49
54
command_type = EvgCommandType .SYSTEM ,
@@ -54,7 +59,7 @@ class AbiComplianceCheck(Function):
54
59
display_name = 'ABI Compliance Check (Stable): ' ,
55
60
local_files_include_filter = 'cxx-abi/logs/**/log.txt' ,
56
61
permissions = 'public-read' ,
57
- remote_file = 'mongo-cxx-driver/${branch_name}/${revision}/${version_id}/${build_id}/${execution}/abi-compliance-check/abi/' ,
62
+ remote_file = 'mongo-cxx-driver/${branch_name}/${revision}/${version_id}/${build_id}/${task_id}/${ execution}/abi-compliance-check/abi/' ,
58
63
),
59
64
s3_put (
60
65
command_type = EvgCommandType .SYSTEM ,
@@ -65,7 +70,7 @@ class AbiComplianceCheck(Function):
65
70
display_name = 'ABI Compliance Check (Unstable): ' ,
66
71
local_files_include_filter = 'cxx-noabi/compat_reports/**/compat_report.html' ,
67
72
permissions = 'public-read' ,
68
- remote_file = 'mongo-cxx-driver/${branch_name}/${revision}/${version_id}/${build_id}/${execution}/abi-compliance-check/noabi/' ,
73
+ remote_file = 'mongo-cxx-driver/${branch_name}/${revision}/${version_id}/${build_id}/${task_id}/${ execution}/abi-compliance-check/noabi/' ,
69
74
),
70
75
s3_put (
71
76
command_type = EvgCommandType .SYSTEM ,
@@ -76,7 +81,7 @@ class AbiComplianceCheck(Function):
76
81
display_name = 'ABI Compliance Check (Unstable): ' ,
77
82
local_files_include_filter = 'cxx-noabi/logs/**/log.txt' ,
78
83
permissions = 'public-read' ,
79
- remote_file = 'mongo-cxx-driver/${branch_name}/${revision}/${version_id}/${build_id}/${execution}/abi-compliance-check/noabi/' ,
84
+ remote_file = 'mongo-cxx-driver/${branch_name}/${revision}/${version_id}/${build_id}/${task_id}/${ execution}/abi-compliance-check/noabi/' ,
80
85
),
81
86
]
82
87
@@ -101,7 +106,7 @@ class Abidiff(Function):
101
106
display_name = 'abidiff (Stable): ' ,
102
107
local_files_include_filter = 'cxx-abi/*.txt' ,
103
108
permissions = 'public-read' ,
104
- remote_file = 'mongo-cxx-driver/${branch_name}/${revision}/${version_id}/${build_id}/${execution}/abidiff/abi/' ,
109
+ remote_file = 'mongo-cxx-driver/${branch_name}/${revision}/${version_id}/${build_id}/${task_id}/${ execution}/abidiff/abi/' ,
105
110
),
106
111
s3_put (
107
112
command_type = EvgCommandType .SYSTEM ,
@@ -112,7 +117,7 @@ class Abidiff(Function):
112
117
display_name = 'abidiff (Unstable): ' ,
113
118
local_files_include_filter = 'cxx-noabi/*.txt' ,
114
119
permissions = 'public-read' ,
115
- remote_file = 'mongo-cxx-driver/${branch_name}/${revision}/${version_id}/${build_id}/${execution}/abidiff/noabi/' ,
120
+ remote_file = 'mongo-cxx-driver/${branch_name}/${revision}/${version_id}/${build_id}/${task_id}/${ execution}/abidiff/noabi/' ,
116
121
),
117
122
]
118
123
@@ -133,57 +138,96 @@ def functions():
133
138
)
134
139
135
140
136
- def tasks ():
137
- distro_name = 'ubuntu2204'
138
- distro = find_large_distro (distro_name )
139
-
140
- return [
141
- EvgTask (
142
- name = func .name ,
143
- tags = [TAG , func .name , distro_name ],
144
- run_on = distro .name ,
145
- commands = [func .call ()],
141
+ def generate_tasks ():
142
+ funcs = [AbiComplianceCheck , Abidiff , AbiProhibitedSymbols ]
143
+
144
+ tasks = []
145
+
146
+ for func , (polyfill , cxx_standard ) in product (funcs , MATRIX ):
147
+ if func is Abidiff :
148
+ distro_name = 'ubuntu2204' # Clang 12, libabigail is not available on RHEL distros.
149
+ else :
150
+ distro_name = 'rhel9-latest' # Clang 17.
151
+
152
+ distro = find_large_distro (distro_name )
153
+
154
+ tasks .append (
155
+ EvgTask (
156
+ name = f'{ func .name } -{ polyfill } -cxx{ cxx_standard } ' ,
157
+ tags = [TAG , distro_name , func .name , polyfill , f'cxx{ cxx_standard } ' ],
158
+ run_on = distro .name ,
159
+ commands = [
160
+ func .call (
161
+ vars = {
162
+ 'cxx_standard' : f'{ cxx_standard } ' ,
163
+ 'polyfill' : polyfill ,
164
+ }
165
+ )
166
+ ],
167
+ )
146
168
)
147
- for func in [AbiComplianceCheck , Abidiff , AbiProhibitedSymbols ]
148
- ]
169
+
170
+ return tasks
171
+
172
+
173
+ TASKS = generate_tasks ()
174
+
175
+
176
+ def tasks ():
177
+ return TASKS
149
178
150
179
151
180
def task_groups ():
152
181
return [
153
182
EvgTaskGroup (
154
- name = f'tg-{ TAG } ' ,
183
+ name = f'tg-{ TAG } - { polyfill } -cxx { cxx_standard } ' ,
155
184
max_hosts = - 1 ,
156
185
setup_group_can_fail_task = True ,
157
186
setup_task = [
158
187
git_get_project (directory = 'mongo-cxx-driver' ),
159
188
InstallCDriver .call (),
160
189
bash_exec (
161
- include_expansions_in_env = ['cxx_standard' ],
190
+ env = {
191
+ 'cxx_standard' : f'{ cxx_standard } ' ,
192
+ 'polyfill' : polyfill ,
193
+ },
194
+ include_expansions_in_env = ['distro_id' ],
162
195
script = 'mongo-cxx-driver/.evergreen/scripts/abi-stability-setup.sh'
163
196
),
197
+ s3_put (
198
+ command_type = EvgCommandType .SETUP ,
199
+ aws_key = '${aws_key}' ,
200
+ aws_secret = '${aws_secret}' ,
201
+ bucket = 'mciuploads' ,
202
+ content_type = 'text/plain' ,
203
+ display_name = 'ABI Stability Setup: ' ,
204
+ local_files_include_filter = '*.log' ,
205
+ permissions = 'public-read' ,
206
+ remote_file = 'mongo-cxx-driver/${branch_name}/${revision}/${version_id}/${build_id}/${task_id}/${execution}/abi-stability-setup/' ,
207
+ ),
164
208
],
165
- tasks = [f'. { TAG } ' ],
209
+ tasks = [task . name for task in TASKS if polyfill in task . name and f'cxx { cxx_standard } ' in task . name ],
166
210
teardown_task_can_fail_task = True ,
167
211
teardown_task = [bash_exec (script = 'rm -rf *' ),],
168
212
)
213
+ for polyfill , cxx_standard in MATRIX
169
214
]
170
215
171
216
172
217
def variants ():
173
218
return [
174
219
BuildVariant (
175
- name = f'abi-stability- { name } ' ,
176
- display_name = f'ABI Stability Checks ( { name } ) ' ,
177
- expansions = {
178
- 'cxx_standard' : f' { cxx_standard } ', # Use a polyfill library.
179
- },
180
- tasks = [ EvgTaskRef ( name = 'tg-abi-stability' ) ],
220
+ name = f'abi-stability' ,
221
+ display_name = f'ABI Stability Checks' ,
222
+ tasks = [
223
+ EvgTaskRef ( name = f'tg- { TAG } - { polyfill } -cxx { cxx_standard } ')
224
+ for polyfill , cxx_standard in MATRIX
225
+ ],
181
226
display_tasks = [
182
227
DisplayTask (
183
- name = f'ABI Stability Checks ( { name } ) ' ,
228
+ name = f'ABI Stability Checks' ,
184
229
execution_tasks = [f'.{ TAG } ' ],
185
230
)
186
231
],
187
232
)
188
- for name , cxx_standard in MATRIX
189
233
]
0 commit comments