Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDRIVER-4602 switch to supported build hosts #1760

Merged
merged 12 commits into from
Oct 16, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
class CheckABICompliance(Function):
name = 'abi-compliance-check'
commands = [
bash_exec(
command_type=EvgCommandType.SETUP,
working_dir='mongoc',
script='.evergreen/scripts/abi-compliance-check-setup.sh'
),
bash_exec(
command_type=EvgCommandType.SETUP,
add_expansions_to_env=True,
Expand Down
4 changes: 0 additions & 4 deletions .evergreen/config_generator/components/c_std_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
# fmt: off
MATRIX = [
('debian92', 'clang', None, [11, ]),
('ubuntu1604', 'clang', 'i686', [11, ]),
('ubuntu1604', 'clang', None, [11, ]),
('ubuntu1804', 'clang', 'i686', [11, ]),
('ubuntu1804', 'gcc', None, [11, ]),
('debian10', 'clang', None, [11, ]),
('debian10', 'gcc', None, [11, 17]),
('debian11', 'clang', None, [11, ]),
Expand Down
17 changes: 8 additions & 9 deletions .evergreen/config_generator/components/cse/openssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
('debian92', 'gcc', None, ['cyrus']),
('rhel80', 'gcc', None, ['cyrus']),
('rhel83-zseries', 'gcc', None, ['cyrus']),
('ubuntu1604', 'clang', None, ['cyrus']),
('ubuntu1804-arm64', 'gcc', None, ['cyrus']),
('ubuntu1804', 'gcc', None, ['cyrus']),
('ubuntu2004', 'clang', None, ['cyrus']),
('ubuntu2004', 'gcc', None, ['cyrus']),
('ubuntu2004-arm64', 'gcc', None, ['cyrus']),
('windows-vsCurrent', 'vs2017x64', None, ['cyrus']),
Expand All @@ -33,17 +31,18 @@
TEST_MATRIX = [
# 4.2 and 4.4 not available on rhel83-zseries.
('rhel83-zseries', 'gcc', None, 'cyrus', ['auth'], ['server'], ['5.0']),

('ubuntu1804-arm64', 'gcc', None, 'cyrus', ['auth'], ['server'], ['4.2', '4.4', '5.0', '6.0' ]),
('ubuntu1804', 'gcc', None, 'cyrus', ['auth'], ['server'], ['4.2', '4.4', '5.0', '6.0' ]),

('windows-vsCurrent', 'vs2017x64', None, 'cyrus', ['auth'], ['server'], ['4.2', '4.4', '5.0', '6.0' ]),

# Test 7.0+ with a replica set since Queryable Encryption does not support the 'server' topology. Queryable Encryption tests require 7.0+.
# Test 7.0+ with Ubuntu 20.04+ since MongoDB 7.0 no longer ships binaries for Ubuntu 18.04.
('ubuntu2004', 'gcc', None, 'cyrus', ['auth'], ['server', 'replica'], [ '7.0', '8.0', 'latest']),
('ubuntu2004', 'gcc', None, 'cyrus', ['auth'], ['server', 'replica'], ['4.4', '5.0', '6.0', '7.0', '8.0', 'latest']),
('rhel83-zseries', 'gcc', None, 'cyrus', ['auth'], ['server', 'replica'], [ '7.0', '8.0', 'latest']),
('ubuntu2004-arm64', 'gcc', None, 'cyrus', ['auth'], ['server', 'replica'], [ '7.0', '8.0', 'latest']),
('ubuntu2004-arm64', 'gcc', None, 'cyrus', ['auth'], ['server', 'replica'], ['4.4', '5.0', '6.0', '7.0', '8.0', 'latest']),
('windows-vsCurrent', 'vs2017x64', None, 'cyrus', ['auth'], ['server', 'replica'], [ '7.0', '8.0', 'latest']),

# Test 4.2 with Debian 10 since 4.2 does not ship on Ubuntu 20.04+.
('debian10', 'gcc', None, 'cyrus', ['auth'], ['server', 'replica'], ['4.2']),

]
# fmt: on
# pylint: enable=line-too-long
Expand Down
29 changes: 24 additions & 5 deletions .evergreen/config_generator/components/earthly.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@


EnvKey = Literal[
"u16",
"u18",
"u20",
"u22",
Expand All @@ -26,6 +27,7 @@
"alpine3.18",
"alpine3.19",
"archlinux",
"centos7"
]
"Identifiers for environments. These correspond to special 'env.*' targets in the Earthfile."
CompilerName = Literal["gcc", "clang"]
Expand All @@ -36,7 +38,7 @@
"Valid options for the SASL configuration parameter"
TLSOption = Literal["LibreSSL", "OpenSSL", "off"]
"Options for the TLS backend configuration parameter (AKA 'ENABLE_SSL')"
CxxVersion = Literal["r3.8.0", "r3.9.0"]
CxxVersion = Literal["r3.8.0", "r3.9.0", "none"]
"C++ driver refs that are under CI test"

# A separator character, since we cannot use whitespace
Expand All @@ -54,6 +56,8 @@ def os_split(env: EnvKey) -> tuple[str, None | str]:
# Match 'u22', 'u20', 'u71' etc.
case ubu if mat := re.match(r"u(\d\d)", ubu):
return "Ubuntu", f"{mat[1]}.04"
case "centos7":
return "CentOS", "7.0"
case _:
raise ValueError(
f"Failed to split OS env key {env=} into a name+version pair (unrecognized)"
Expand Down Expand Up @@ -149,8 +153,17 @@ def task_filter(env: EarthlyVariant, conf: Configuration) -> bool:
# Other sasl=off tasks we'll just ignore:
case _, ("off", _tls, _cxx):
return False
# Ubuntu does not ship with a LibreSSL package:
case e, (_sasl, "LibreSSL", _cxx) if e.display_name.startswith("Ubuntu"):
# Ubuntu and CentOS do not ship with a LibreSSL package:
case e, (_sasl, "LibreSSL", _cxx) if e.display_name.startswith("Ubuntu") or e.display_name.startswith("CentOS"):
return False
# u16 is not capable of building mongocxx
case e, (_, _, "none") if e.display_name.startswith("Ubuntu 16") or e.display_name.startswith("CentOS 7"):
return True
# Exclude u16 for all other configurations
case e, _ if e.display_name.startswith("Ubuntu 16") or e.display_name.startswith("CentOS 7"):
return False
# Exclude all other envs
case _, (_, _, "none"):
return False
# Anything else: Allow it to run:
case _:
Expand Down Expand Up @@ -242,7 +255,6 @@ def earthly_task(
"ubuntu2204-large",
"ubuntu2004-small",
"ubuntu2004",
"ubuntu1804-medium",
"debian10",
"debian11",
"amazon2",
Expand All @@ -251,9 +263,16 @@ def earthly_task(

def tasks() -> Iterable[Task]:
for conf in all_possible(Configuration):
# test-example is a target in all configurations
targets = ["test-example"]

# test-cxx-driver is only a target in configurations with specified mongocxx versions
if conf.test_mongocxx_ref != "none":
targets.append("test-cxx-driver")

task = earthly_task(
name=f"check:{conf.suffix}",
targets=("test-example", "test-cxx-driver"),
targets=targets,
config=conf,
)
if task is not None:
Expand Down
4 changes: 2 additions & 2 deletions .evergreen/config_generator/components/loadbalanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from config_generator.etc.distros import make_distro_str, find_small_distro, find_large_distro
from config_generator.etc.utils import Task, bash_exec

# Use `rhel8.7` distro. `rhel8.7` distro includes necessary dependency: `haproxy`.
_DISTRO_NAME = "rhel87"
# Use `rhel8.9` distro. `rhel8.9` distro includes necessary dependency: `haproxy`.
_DISTRO_NAME = "rhel8.9"
_COMPILER = "gcc"


Expand Down
10 changes: 5 additions & 5 deletions .evergreen/config_generator/components/sanitizers/asan_cse.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
# pylint: disable=line-too-long
# fmt: off
COMPILE_MATRIX = [
('ubuntu1804', 'clang', None, ['cyrus']),
('ubuntu2004', 'clang', None, ['cyrus']),
('debian10', 'clang', None, ['cyrus']),
]

TEST_MATRIX = [
('ubuntu1804', 'clang', None, 'cyrus', ['auth'], ['server'], ['4.2', '4.4', '5.0', '6.0']),

# Test 7.0+ with a replica set since Queryable Encryption does not support the 'server' topology. Queryable Encryption tests require 7.0+.
# Test 7.0+ with Ubuntu 20.04+ since MongoDB 7.0 no longer ships binaries for Ubuntu 18.04.
('ubuntu2004', 'clang', None, 'cyrus', ['auth'], ['server', 'replica'], ['7.0', '8.0', 'latest']),
('ubuntu2004', 'clang', None, 'cyrus', ['auth'], ['server', 'replica'], ['4.4', '5.0', '6.0', '7.0', '8.0', 'latest']),

# Test 4.2 with Debian 10 since 4.2 does not ship on Ubuntu 20.04+.
('debian10', 'clang', None, 'cyrus', ['auth'], ['server'], ['4.2']),
]
# fmt: on
# pylint: enable=line-too-long
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@
# pylint: disable=line-too-long
# fmt: off
COMPILE_MATRIX = [
('ubuntu1604', 'clang', None, ['cyrus']),
('ubuntu1804', 'clang', None, ['cyrus']),
('ubuntu2004', 'clang', None, ['cyrus']),
('debian10', 'clang', None, ['cyrus']),
]

TEST_MATRIX = [
('ubuntu1804', 'clang', None, 'cyrus', ['auth'], ['server', 'replica', 'sharded'], ['4.0', '4.2', '4.4', '5.0', '6.0']),
('ubuntu2004', 'clang', None, 'cyrus', ['auth'], ['server', 'replica', 'sharded'], ['4.4', '5.0', '6.0', '7.0', '8.0', 'latest']),

# Test 7.0+ with Ubuntu 20.04+ since MongoDB 7.0 no longer ships binaries for Ubuntu 18.04.
('ubuntu2004', 'clang', None, 'cyrus', ['auth'], ['server', 'replica', 'sharded'], ['7.0', '8.0', 'latest']),
# Test 4.2 with Debian 10 since 4.2 does not ship on Ubuntu 20.04+.
('debian10', 'clang', None, 'cyrus', ['auth'], ['server', 'replica', 'sharded'], ['4.2']),
]
# fmt: on
# pylint: enable=line-too-long
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
# pylint: disable=line-too-long
# fmt: off
COMPILE_MATRIX = [
('ubuntu1804', 'clang', None, ['cyrus']),
('ubuntu2004', 'clang', None, ['cyrus']),
('debian10', 'clang', None, ['cyrus']),
]

TEST_OPENSSL_MATRIX = [
('ubuntu1804', 'clang', None, 'cyrus', ['auth'], ['server', 'replica', 'sharded'], ['4.0', '4.2', '4.4', '5.0', '6.0']),
('ubuntu2004', 'clang', None, 'cyrus', ['auth'], ['server', 'replica', 'sharded'], ['4.4', '5.0', '6.0', '7.0', '8.0', 'latest']),

# Test 7.0+ with Ubuntu 20.04+ since MongoDB 7.0 no longer ships binaries for Ubuntu 18.04.
('ubuntu2004', 'clang', None, 'cyrus', ['auth'], ['server', 'replica', 'sharded'], ['7.0', '8.0', 'latest']),
# Test 4.2 with Debian 10 since 4.2 does not ship on Ubuntu 20.04+.
('debian10', 'clang', None, 'cyrus', ['auth'], ['server', 'replica', 'sharded'], ['4.2']),
]
# fmt: on
# pylint: enable=line-too-long
Expand Down
9 changes: 5 additions & 4 deletions .evergreen/config_generator/components/sasl/nossl.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@
# pylint: disable=line-too-long
# fmt: off
COMPILE_MATRIX = [
('ubuntu1604', 'gcc', None, ['off']),
('ubuntu1804', 'gcc', None, ['off']),
('ubuntu2004', 'gcc', None, ['off']),
('windows-vsCurrent', 'vs2017x64', None, ['off']),
('debian10', 'gcc', None, ['off']),
]

TEST_MATRIX = [
('ubuntu1804', 'gcc', None, 'off', ['noauth'], ['server', 'replica', 'sharded'], ['4.0', '4.2', '4.4', '5.0', '6.0', ]),
('ubuntu2004', 'gcc', None, 'off', ['noauth'], ['server', 'replica', 'sharded'], [ '7.0', '8.0', 'latest']),
('ubuntu2004', 'gcc', None, 'off', ['noauth'], ['server', 'replica', 'sharded'], ['4.4', '5.0', '6.0', '7.0', '8.0', 'latest']),

# Test 4.2 with Debian 10 since 4.2 does not ship on Ubuntu 20.04+.
('debian10', 'gcc', None, 'off', ['noauth'], ['server', 'replica', 'sharded'], ['4.2']),
]
# fmt: on
# pylint: enable=line-too-long
Expand Down
19 changes: 5 additions & 14 deletions .evergreen/config_generator/components/sasl/openssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,10 @@
('debian11', 'gcc', None, ['cyrus']),
('debian92', 'clang', None, ['cyrus']),
('debian92', 'gcc', None, ['cyrus']),
('rhel70', 'gcc', None, ['cyrus']),
('rhel80', 'gcc', None, ['cyrus']),
('rhel81-power8', 'gcc', None, ['cyrus']),
('rhel83-zseries', 'gcc', None, ['cyrus']),
('ubuntu1604-arm64', 'gcc', None, ['cyrus']),
('ubuntu1604', 'clang', None, ['cyrus']),
('ubuntu1804-arm64', 'gcc', None, ['cyrus']),
('ubuntu1804', 'gcc', None, ['cyrus']),
('ubuntu2004', 'clang', None, ['cyrus']),
('ubuntu2004-arm64', 'gcc', None, ['cyrus']),
('ubuntu2004', 'gcc', None, ['cyrus']),
('windows-vsCurrent', 'vs2017x64', None, ['cyrus']),
Expand All @@ -35,18 +31,13 @@
TEST_MATRIX = [
('rhel81-power8', 'gcc', None, 'cyrus', ['auth'], ['server', ], [ '4.2', '4.4', '5.0', '6.0', '7.0', '8.0', 'latest']),
('rhel83-zseries', 'gcc', None, 'cyrus', ['auth'], ['server', ], [ '5.0', '6.0', '7.0', '8.0', 'latest']),
('ubuntu1804-arm64', 'gcc', None, 'cyrus', ['auth'], ['server', ], [ '4.2', '4.4', '5.0', '6.0', ]),
('ubuntu1804', 'gcc', None, 'cyrus', ['auth'], ['server', 'replica'], ['4.0', '4.2', '4.4', '5.0', '6.0', ]),

# Test 7.0+ with Ubuntu 20.04+ since MongoDB 7.0 no longer ships binaries for Ubuntu 18.04.
('ubuntu2004-arm64', 'gcc', None, 'cyrus', ['auth'], ['server'], ['7.0', '8.0', 'latest']),
('ubuntu2004', 'gcc', None, 'cyrus', ['auth'], ['server'], ['7.0', '8.0', 'latest']),
('ubuntu2004-arm64', 'gcc', None, 'cyrus', ['auth'], ['server'], ['4.4', '5.0', '6.0', '7.0', '8.0', 'latest']),
('ubuntu2004', 'gcc', None, 'cyrus', ['auth'], ['server'], ['4.4', '5.0', '6.0', '7.0', '8.0', 'latest']),
('windows-vsCurrent', 'vs2017x64', None, 'cyrus', ['auth'], ['server'], [ 'latest']),

# Test ARM64 + 4.0 on Ubuntu 16.04, as MongoDB server does not produce
# downloads for Ubuntu 18.04 arm64.
# See: https://www.mongodb.com/docs/manual/administration/production-notes/
('ubuntu1604-arm64', 'gcc', None, 'cyrus', ['auth'], ['server'], ['4.0']),
# Test 4.2 with Debian 10 since 4.2 does not ship on Ubuntu 20.04+.
('debian10', 'gcc', None, 'cyrus', ['auth'], ['server', 'replica'], ['4.2']),
]
# fmt: on
# pylint: enable=line-too-long
Expand Down
7 changes: 2 additions & 5 deletions .evergreen/config_generator/components/scan_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@
# fmt: off
MATRIX = [
('macos-1100', 'clang', None ),
('ubuntu1604-arm64', 'clang', None ),
('ubuntu1604', 'clang', 'i686'),
('ubuntu1604', 'clang', None ),
('ubuntu1804-arm64', 'clang', None ),
('ubuntu1804', 'clang', 'i686'),
('ubuntu2004-arm64', 'clang', None ),
('ubuntu2004', 'clang', 'i686'),
]
# fmt: on
# pylint: enable=line-too-long
Expand Down
31 changes: 6 additions & 25 deletions .evergreen/config_generator/etc/distros.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,57 +60,41 @@ def validate_os_ver(cls, value):
]

RHEL_DISTROS = [
Distro(name='rhel70-large', os='rhel', os_type='linux', os_ver='7.0', size='large'),
Distro(name='rhel70-small', os='rhel', os_type='linux', os_ver='7.0', size='small'),
Distro(name='rhel76-large', os='rhel', os_type='linux', os_ver='7.6', size='large'),
Distro(name='rhel76-small', os='rhel', os_type='linux', os_ver='7.6', size='small'),
Distro(name='rhel80-large', os='rhel', os_type='linux', os_ver='8.0', size='large'),
Distro(name='rhel80-small', os='rhel', os_type='linux', os_ver='8.0', size='small'),
Distro(name='rhel84-large', os='rhel', os_type='linux', os_ver='8.4', size='large'),
Distro(name='rhel84-small', os='rhel', os_type='linux', os_ver='8.4', size='small'),
Distro(name='rhel87-large', os='rhel', os_type='linux', os_ver='8.7', size='large'),
Distro(name='rhel87-small', os='rhel', os_type='linux', os_ver='8.7', size='small'),
Distro(name='rhel90-large', os='rhel', os_type='linux', os_ver='9.0', size='large'),
Distro(name='rhel90-small', os='rhel', os_type='linux', os_ver='9.0', size='small'),
Distro(name='rhel8.9-large', os='rhel', os_type='linux', os_ver='8.7', size='large'),
Distro(name='rhel8.9-small', os='rhel', os_type='linux', os_ver='8.7', size='small'),
Distro(name='rhel92-large', os='rhel', os_type='linux', os_ver='9.0', size='large'),
Distro(name='rhel92-small', os='rhel', os_type='linux', os_ver='9.0', size='small'),
]

RHEL_ARM64_DISTROS = [
Distro(name='rhel82-arm64-large', os='rhel', os_type='linux', os_ver='8.2', size='large', arch='arm64'),
Distro(name='rhel82-arm64-small', os='rhel', os_type='linux', os_ver='8.2', size='small', arch='arm64'),
Distro(name='rhel90-arm64-large', os='rhel', os_type='linux', os_ver='9.0', size='large', arch='arm64'),
Distro(name='rhel90-arm64-small', os='rhel', os_type='linux', os_ver='9.0', size='small', arch='arm64'),
Distro(name='rhel92-arm64-large', os='rhel', os_type='linux', os_ver='9.0', size='large', arch='arm64'),
Distro(name='rhel92-arm64-small', os='rhel', os_type='linux', os_ver='9.0', size='small', arch='arm64'),
]

RHEL_POWER8_DISTROS = [
Distro(name='rhel71-power8-large', os='rhel', os_type='linux', os_ver='7.1', size='large', arch='power8'),
Distro(name='rhel71-power8-small', os='rhel', os_type='linux', os_ver='7.1', size='small', arch='power8'),
Distro(name='rhel81-power8-large', os='rhel', os_type='linux', os_ver='8.1', size='large', arch='power8'),
Distro(name='rhel81-power8-small', os='rhel', os_type='linux', os_ver='8.1', size='small', arch='power8'),
]

RHEL_ZSERIES_DISTROS = [
Distro(name='rhel72-zseries-large', os='rhel', os_type='linux', os_ver='7.2', size='large', arch='zseries'),
Distro(name='rhel72-zseries-small', os='rhel', os_type='linux', os_ver='7.2', size='small', arch='zseries'),
Distro(name='rhel83-zseries-large', os='rhel', os_type='linux', os_ver='8.3', size='large', arch='zseries'),
Distro(name='rhel83-zseries-small', os='rhel', os_type='linux', os_ver='8.3', size='small', arch='zseries'),
]

UBUNTU_DISTROS = [
Distro(name='ubuntu1604-large', os='ubuntu', os_type='linux', os_ver='16.04', size='large'),
Distro(name='ubuntu1604-small', os='ubuntu', os_type='linux', os_ver='16.04', size='small'),
Distro(name='ubuntu1804-large', os='ubuntu', os_type='linux', os_ver='18.04', size='large'),
Distro(name='ubuntu1804-small', os='ubuntu', os_type='linux', os_ver='18.04', size='small'),
Distro(name='ubuntu2004-large', os='ubuntu', os_type='linux', os_ver='20.04', size='large'),
Distro(name='ubuntu2004-small', os='ubuntu', os_type='linux', os_ver='20.04', size='small'),
Distro(name='ubuntu2204-large', os='ubuntu', os_type='linux', os_ver='22.04', size='large'),
Distro(name='ubuntu2204-small', os='ubuntu', os_type='linux', os_ver='22.04', size='small'),
]

UBUNTU_ARM64_DISTROS = [
Distro(name='ubuntu1604-arm64-large', os='ubuntu', os_type='linux', os_ver='16.04', size='large', arch='arm64'),
Distro(name='ubuntu1604-arm64-small', os='ubuntu', os_type='linux', os_ver='16.04', size='small', arch='arm64'),
Distro(name='ubuntu1804-arm64-large', os='ubuntu', os_type='linux', os_ver='18.04', size='large', arch='arm64'),
Distro(name='ubuntu1804-arm64-small', os='ubuntu', os_type='linux', os_ver='18.04', size='small', arch='arm64'),
Distro(name='ubuntu2004-arm64-large', os='ubuntu', os_type='linux', os_ver='20.04', size='large', arch='arm64'),
Distro(name='ubuntu2004-arm64-small', os='ubuntu', os_type='linux', os_ver='20.04', size='small', arch='arm64'),
Distro(name='ubuntu2204-arm64-large', os='ubuntu', os_type='linux', os_ver='22.04', size='large', arch='arm64'),
Expand Down Expand Up @@ -139,9 +123,6 @@ def validate_os_ver(cls, value):

Distro(name='windows-vsCurrent-large', os='windows', os_type='windows', vs_ver='vsCurrent', size='large'), # Windows Server 2019
Distro(name='windows-vsCurrent-small', os='windows', os_type='windows', vs_ver='vsCurrent', size='small'), # Windows Server 2019

Distro(name='windows-vsCurrent2-large', os='windows', os_type='windows', vs_ver='vsCurrent2', size='large'),
Distro(name='windows-vsCurrent2-small', os='windows', os_type='windows', vs_ver='vsCurrent2', size='small'),
]
#fmt: on
# pylint: enable=line-too-long
Expand Down
8 changes: 8 additions & 0 deletions .evergreen/generated_configs/functions.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
functions:
abi-compliance-check:
- command: subprocess.exec
type: setup
params:
binary: bash
working_dir: mongoc
args:
- -c
- .evergreen/scripts/abi-compliance-check-setup.sh
- command: subprocess.exec
type: setup
params:
Expand Down
Loading