| 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 = 'winssl' |
| 10 |
TAG = f'sasl-matrix-{SSL}' |
| 11 |
|
| 12 |
|
| 13 |
# pylint: disable=line-too-long |
| 14 |
# fmt: off |
| 15 |
COMPILE_MATRIX = [ |
| 16 |
# For test matrix. |
| 17 |
('windows-vsCurrent', 'mingw', None, ['sspi']), |
| 18 |
('windows-vsCurrent', 'vs2022x64', None, ['sspi']), |
| 19 |
('windows-vsCurrent', 'vs2022x86', None, ['sspi']), |
| 20 |
('windows-2022-latest', 'mingw', None, ['sspi']), |
| 21 |
('windows-2022-latest', 'vs2022x64', None, ['sspi']), |
| 22 |
('windows-2022-latest', 'vs2022x86', None, ['sspi']), |
| 23 |
|
| 24 |
# For compile only. |
| 25 |
('windows-vsCurrent', 'vs2017x64', None, ['off', 'sspi']), |
| 26 |
('windows-vsCurrent', 'vs2019x64', None, ['off', 'sspi']), |
| 27 |
] |
| 28 |
|
| 29 |
TEST_MATRIX = [ |
| 30 |
('windows-vsCurrent', 'vs2022x64', None, 'sspi', ['auth'], ['server', 'replica', 'sharded'], ['4.2', '4.4', '5.0', '6.0', '7.0', ]), |
| 31 |
('windows-2022-latest', 'vs2022x64', None, 'sspi', ['auth'], ['server', 'replica', 'sharded'], [ '8.0', 'rapid', 'latest']), |
| 32 |
|
| 33 |
# sharded + min only. |
| 34 |
('windows-vsCurrent', 'mingw', None, 'sspi', ['auth'], ['sharded'], ['4.2']), |
| 35 |
('windows-vsCurrent', 'vs2022x86', None, 'sspi', ['auth'], ['sharded'], ['4.2']), |
| 36 |
|
| 37 |
# sharded + latest only. |
| 38 |
('windows-2022-latest', 'mingw', None, 'sspi', ['auth'], ['sharded'], ['rapid', 'latest']), |
| 39 |
('windows-2022-latest', 'vs2022x86', None, 'sspi', ['auth'], ['sharded'], ['rapid', 'latest']), |
| 40 |
] |
| 41 |
# fmt: on |
| 42 |
# pylint: enable=line-too-long |
| 43 |
|
| 44 |
|
| 45 |
class WinSSLCompileCommon(CompileCommon): |
| 46 |
ssl = 'WINDOWS' |
| 47 |
|
| 48 |
|
| 49 |
class SaslOffWinSSLCompile(WinSSLCompileCommon): |
| 50 |
name = 'sasl-off-winssl-compile' |
| 51 |
commands = WinSSLCompileCommon.compile_commands(sasl='OFF') |
| 52 |
|
| 53 |
|
| 54 |
class SaslSspiWinSSLCompile(WinSSLCompileCommon): |
| 55 |
name = 'sasl-sspi-winssl-compile' |
| 56 |
commands = WinSSLCompileCommon.compile_commands(sasl='SSPI') |
| 57 |
|
| 58 |
|
| 59 |
def functions(): |
| 60 |
return merge_defns( |
| 61 |
SaslOffWinSSLCompile.defn(), |
| 62 |
SaslSspiWinSSLCompile.defn(), |
| 63 |
) |
| 64 |
|
| 65 |
|
| 66 |
def tasks(): |
| 67 |
res = [] |
| 68 |
|
| 69 |
SASL_TO_FUNC = { |
| 70 |
'off': SaslOffWinSSLCompile, |
| 71 |
'sspi': SaslSspiWinSSLCompile, |
| 72 |
} |
| 73 |
|
| 74 |
res += generate_compile_tasks(SSL, TAG, SASL_TO_FUNC, COMPILE_MATRIX) |
| 75 |
res += generate_test_tasks(SSL, TAG, TEST_MATRIX) |
| 76 |
|
| 77 |
return res |
| 78 |
|
| 79 |
|
| 80 |
def variants(): |
| 81 |
expansions = {} |
| 82 |
|
| 83 |
return [ |
| 84 |
BuildVariant( |
| 85 |
name=TAG, |
| 86 |
display_name=TAG, |
| 87 |
tasks=[EvgTaskRef(name=f'.{TAG}')], |
| 88 |
expansions=expansions, |
| 89 |
), |
| 90 |
] |