9
9
from shrub .v3 .evg_command import KeyValueParam , expansions_update
10
10
from shrub .v3 .evg_task import EvgTask , EvgTaskRef
11
11
12
- from itertools import product
13
-
14
12
15
13
TAG = 'compile-only'
16
14
17
15
18
16
# pylint: disable=line-too-long
19
17
# fmt: off
20
18
MATRIX = [
21
- ('rhel80' , 'gcc' , ['Debug' , 'Release' ], ['shared' , 'static' ], [11 , 17 , 20 , 23 ]),
22
- ('rhel80' , 'clang' , ['Debug' , 'Release' ], ['shared' , 'static' ], [11 , 17 , 20 , 23 ]),
23
-
24
- ('ubuntu2004-arm64' , 'gcc' , ['Debug' , 'Release' ], ['shared' , 'static' ], [11 , 17 , 20 , 23 ]),
25
- ('ubuntu2004-arm64' , 'clang' , ['Debug' , 'Release' ], ['shared' , 'static' ], [11 , 17 , 20 , 23 ]),
26
-
27
- ('rhel8-power' , None , ['Debug' , 'Release' ], ['shared' , 'static' ], [11 , 17 ]),
28
- ('rhel8-zseries' , None , ['Debug' , 'Release' ], ['shared' , 'static' ], [11 , 17 ]),
29
-
30
- ('macos-14-arm64' , None , ['Debug' , 'Release' ], ['shared' , 'static' ], [11 , 17 ]),
31
- ('macos-14' , None , ['Debug' , 'Release' ], ['shared' , 'static' ], [11 , 17 ]),
32
-
33
- ('windows-vsCurrent' , 'vs2017x64' , ['Debug' , 'Release' ], ['shared' , 'static' ], [11 , 17 , ]),
34
- ('windows-vsCurrent' , 'vs2019x64' , ['Debug' , 'Release' ], ['shared' , 'static' ], [11 , 17 , 20 , ]),
35
- ('windows-vsCurrent' , 'vs2022x64' , ['Debug' , 'Release' ], ['shared' , 'static' ], [11 , 17 , 20 , 23 ]),
19
+ # C++ standard and compiler coverage
20
+
21
+ ('rhel80' , 'clang' , [11 , 17 , 20 , ]), # Clang 7.0 (max: C++20)
22
+ ('ubuntu2004' , 'clang-10' , [11 , 17 , 20 , ]), # Clang 10.0 (max: C++20)
23
+ ('rhel84' , 'clang' , [11 , 17 , 20 , ]), # Clang 11.0 (max: C++20)
24
+ ('ubuntu2204' , 'clang-12' , [11 , 17 , 20 , 23 ]), # Clang 12.0 (max: C++23)
25
+ ('rhel90' , 'clang' , [11 , 17 , 20 , 23 ]), # Clang 13.0 (max: C++23)
26
+ ('rhel91' , 'clang' , [11 , 17 , 20 , 23 ]), # Clang 14.0 (max: C++23)
27
+ ('rhel92' , 'clang' , [11 , 17 , 20 , 23 ]), # Clang 15.0 (max: C++23)
28
+ ('rhel93' , 'clang' , [11 , 17 , 20 , 23 ]), # Clang 16.0 (max: C++23)
29
+ ('rhel94' , 'clang' , [11 , 17 , 20 , 23 ]), # Clang 17.0 (max: C++23)
30
+ ('rhel95' , 'clang' , [11 , 17 , 20 , 23 ]), # Clang 18.0 (max: C++23)
31
+
32
+ ('rhel76' , 'gcc' , [11 , 14 , ]), # GCC 4.8 (max: C++14)
33
+ ('rhel80' , 'gcc' , [11 , 17 , 20 , ]), # GCC 8.2 (max: C++20)
34
+ ('debian10' , 'gcc-8' , [11 , 17 , 20 , ]), # GCC 8.3 (max: C++20)
35
+ ('rhel84' , 'gcc' , [11 , 17 , 20 , ]), # GCC 8.4 (max: C++20)
36
+ ('ubuntu2004' , 'gcc-9' , [11 , 17 , 20 , ]), # GCC 9.4 (max: C++20)
37
+ ('debian11' , 'gcc-10' , [11 , 17 , 20 , ]), # GCC 10.2 (max: C++20)
38
+ ('rhel90' , 'gcc' , [11 , 17 , 20 , 23 ]), # GCC 11.2 (max: C++23)
39
+ ('rhel92' , 'gcc' , [11 , 17 , 20 , 23 ]), # GCC 11.3 (max: C++23)
40
+ ('rhel94' , 'gcc' , [11 , 17 , 20 , 23 ]), # GCC 11.4 (max: C++23)
41
+ ('rhel95' , 'gcc' , [11 , 17 , 20 , 23 ]), # GCC 11.5 (max: C++23)
42
+
43
+ ('windows-vsCurrent' , 'vs2015x64' , [11 , 14 , 'latest' ]), # Max: C++14
44
+ ('windows-vsCurrent' , 'vs2017x64' , [11 , 14 , 17 , 20 , 'latest' ]), # Max: C++20
45
+ ('windows-vsCurrent' , 'vs2019x64' , [11 , 14 , 17 , 20 , 23 , 'latest' ]), # Max: C++23
46
+ ('windows-vsCurrent' , 'vs2022x64' , [11 , 14 , 17 , 20 , 23 , 'latest' ]), # Max: C++23
47
+
48
+ # Other coverage.
49
+
50
+ ('ubuntu2004-arm64' , 'gcc' , [11 , 17 ]), # Clang 10
51
+ ('ubuntu2004-arm64' , 'clang' , [11 , 17 ]), # Clang 10
52
+
53
+ ('rhel8-power' , None , [11 , 17 ]),
54
+ ('rhel8-zseries' , None , [11 , 17 ]),
55
+
56
+ ('macos-14-arm64' , None , [11 , 17 ]),
57
+ ('macos-14' , None , [11 , 17 ]),
36
58
]
37
59
# fmt: on
38
60
# pylint: enable=line-too-long
39
61
40
62
41
63
def tasks ():
42
- for distro_name , compiler , build_types , link_types , cxx_standards in MATRIX :
43
- for build_type , link_type , cxx_standard in product (build_types , link_types , cxx_standards ):
64
+ build_type = 'Debug'
65
+
66
+ for distro_name , compiler , cxx_standards in MATRIX :
67
+ for cxx_standard in cxx_standards :
44
68
distro = find_large_distro (distro_name )
45
69
46
70
name = f'{ TAG } -{ make_distro_str (distro_name , compiler , None )} '
@@ -53,21 +77,18 @@ def tasks():
53
77
if compiler is not None :
54
78
tags .append (compiler )
55
79
56
- name += f'-{ build_type .lower ()} - { link_type } '
57
- tags += [build_type .lower (), link_type ]
80
+ name += f'-{ build_type .lower ()} '
81
+ tags += [build_type .lower ()]
58
82
59
83
updates = []
60
- compile_vars = {}
84
+ compile_vars = {'BUILD_SHARED_AND_STATIC_LIBS' : 'ON' }
61
85
62
86
updates += [KeyValueParam (key = 'build_type' , value = build_type )]
63
87
updates += [KeyValueParam (key = key , value = value ) for key , value in compiler_to_vars (compiler ).items ()]
64
88
65
89
if cxx_standard is not None :
66
90
compile_vars |= {'REQUIRED_CXX_STANDARD' : cxx_standard }
67
91
68
- if link_type == 'static' :
69
- compile_vars |= {'USE_STATIC_LIBS' : 1 }
70
-
71
92
# PowerPC and zSeries are limited resources.
72
93
patchable = False if any (pattern in distro_name for pattern in ['power' , 'zseries' ]) else None
73
94
@@ -79,6 +100,7 @@ def tasks():
79
100
Compile .call (
80
101
build_type = build_type ,
81
102
compiler = compiler ,
103
+ vars = compile_vars ,
82
104
)
83
105
]
84
106
0 commit comments