| 1 |
from shrub.v3.evg_build_variant import BuildVariant |
| 2 |
from shrub.v3.evg_task import EvgTaskRef |
| 3 |
|
| 4 |
from config_generator.etc.compile import generate_compile_tasks |
| 5 |
from config_generator.etc.function import merge_defns |
| 6 |
from config_generator.etc.sasl.compile import CompileCommon |
| 7 |
from config_generator.etc.sasl.test import generate_test_tasks |
| 8 |
|
| 9 |
SSL = 'darwinssl' |
| 10 |
TAG = f'sasl-matrix-{SSL}' |
| 11 |
|
| 12 |
|
| 13 |
# pylint: disable=line-too-long |
| 14 |
# fmt: off |
| 15 |
COMPILE_MATRIX = [ |
| 16 |
('macos-14-arm64', 'clang', None, ['cyrus']), |
| 17 |
('macos-14', 'clang', None, ['cyrus']), |
| 18 |
] |
| 19 |
|
| 20 |
TEST_MATRIX = [ |
| 21 |
# Prefer macos-14-arm64 which is less resource-limited than macos-14. Provides 6.0+. |
| 22 |
('macos-14-arm64', 'clang', None, 'cyrus', ['auth'], ['replica'], ['6.0', '7.0', '8.0', 'rapid', 'latest']), |
| 23 |
|
| 24 |
# Pre-6.0 coverage. Resource-limited: use sparingly. |
| 25 |
('macos-14', 'clang', None, 'cyrus', ['auth'], ['replica'], ['4.2', '4.4', '5.0']), |
| 26 |
] |
| 27 |
# fmt: on |
| 28 |
# pylint: enable=line-too-long |
| 29 |
|
| 30 |
|
| 31 |
class DarwinSSLCompileCommon(CompileCommon): |
| 32 |
ssl = 'DARWIN' |
| 33 |
|
| 34 |
|
| 35 |
class SaslCyrusDarwinSSLCompile(DarwinSSLCompileCommon): |
| 36 |
name = 'sasl-cyrus-darwinssl-compile' |
| 37 |
commands = DarwinSSLCompileCommon.compile_commands(sasl='CYRUS') |
| 38 |
|
| 39 |
|
| 40 |
def functions(): |
| 41 |
return merge_defns( |
| 42 |
SaslCyrusDarwinSSLCompile.defn(), |
| 43 |
) |
| 44 |
|
| 45 |
|
| 46 |
def tasks(): |
| 47 |
res = [] |
| 48 |
|
| 49 |
SASL_TO_FUNC = { |
| 50 |
'cyrus': SaslCyrusDarwinSSLCompile, |
| 51 |
} |
| 52 |
|
| 53 |
res += generate_compile_tasks(SSL, TAG, SASL_TO_FUNC, COMPILE_MATRIX) |
| 54 |
res += generate_test_tasks(SSL, TAG, TEST_MATRIX) |
| 55 |
|
| 56 |
return res |
| 57 |
|
| 58 |
|
| 59 |
def variants(): |
| 60 |
expansions = {} |
| 61 |
|
| 62 |
return [ |
| 63 |
BuildVariant( |
| 64 |
name=TAG, |
| 65 |
display_name=TAG, |
| 66 |
tasks=[EvgTaskRef(name=f'.{TAG}')], |
| 67 |
expansions=expansions, |
| 68 |
), |
| 69 |
] |