-
Notifications
You must be signed in to change notification settings - Fork 546
CXX-3103 bump minimum required C Driver version to 2.0.0 #1379
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
Merged
Merged
Changes from 7 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
9e12c0d
CXX-3103 bump minimum required C Driver version to 2.0.0
eramongodb 95c317d
Fix display name for CMake compatibility matrix
eramongodb 9668d13
Remove aggressive FetchContent optimization
eramongodb 291591e
Treat NEED_DOWNLOAD_C_DRIVER as an INTERNAL cache variable
eramongodb e68fe8f
Restore setting C++ standard in example project CMake configs
eramongodb 461658c
Fix distcheck
eramongodb 3d1026f
Merge remote-tracking branch 'upstream/master' into cxx-3103
eramongodb 779d7aa
Merge remote-tracking branch 'upstream/master' into cxx-3103
eramongodb e392c8a
Use alias targets for *_target variables
eramongodb 1063ba4
Remove CMake patch version number from requirements and coverage
eramongodb b7307ac
Restore patch number for CMake binary downloads
eramongodb 6d78a87
Test find-cxx and add-cxx in the same task
eramongodb 9cac0ab
Defer C++ standard coverage to compile-only matrix
eramongodb 9a34dea
Update changelog entry
eramongodb 46f020b
Update calc_release_version_selftest.sh for 4.0
eramongodb 091319b
Guard patch version number comparisons on minor version number
eramongodb b40c68a
Merge remote-tracking branch 'upstream/master' into cxx-3103
eramongodb 11dea97
Simplify bool -> int conversion
eramongodb c855dab
Remove redundant REQUIRED in find_dependency()
eramongodb ad9a5a8
Avoid redundant list concatenation
eramongodb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
from config_generator.components.funcs.fetch_c_driver_source import FetchCDriverSource | ||
from config_generator.components.funcs.install_c_driver import InstallCDriver | ||
from config_generator.components.funcs.install_uv import InstallUV | ||
from config_generator.components.funcs.setup import Setup | ||
|
||
from config_generator.etc.distros import find_small_distro | ||
from config_generator.etc.function import Function | ||
from config_generator.etc.utils import bash_exec | ||
|
||
from shrub.v3.evg_build_variant import BuildVariant | ||
from shrub.v3.evg_command import EvgCommandType | ||
from shrub.v3.evg_task import EvgTask, EvgTaskRef | ||
|
||
from itertools import product | ||
|
||
TAG = 'cmake-compat' | ||
|
||
|
||
MATRIX = [ | ||
("min", [3, 15, 0], [11, 17], [False, True], [False, True]), | ||
("max-v3", [3, 31, 6], [11, 17], [False, True], [False, True]), | ||
("max", [4, 0, 0], [11, 17], [False, True], [False, True]), | ||
] | ||
|
||
|
||
class CMakeCompat(Function): | ||
name = TAG | ||
commands = [ | ||
bash_exec( | ||
command_type=EvgCommandType.TEST, | ||
working_dir='mongo-cxx-driver', | ||
include_expansions_in_env=[ | ||
'CMAKE_MAJOR_VERSION', | ||
'CMAKE_MINOR_VERSION', | ||
'CMAKE_PATCH_VERSION', | ||
'INSTALL_C_DRIVER', | ||
'cxx_standard', | ||
], | ||
script='.evergreen/scripts/cmake-compat.sh', | ||
), | ||
bash_exec( | ||
command_type=EvgCommandType.TEST, | ||
include_expansions_in_env=[ | ||
'CMAKE_MAJOR_VERSION', | ||
'CMAKE_MINOR_VERSION', | ||
'CMAKE_PATCH_VERSION', | ||
'INSTALL_C_DRIVER', | ||
'cxx_standard', | ||
'find_c_driver', | ||
], | ||
script='mongo-cxx-driver/.evergreen/scripts/cmake-compat-check.sh', | ||
), | ||
] | ||
|
||
|
||
def functions(): | ||
return CMakeCompat.defn() | ||
|
||
|
||
def tasks(): | ||
distro_name = 'rhel80' | ||
distro = find_small_distro(distro_name) | ||
|
||
for name, version, cxx_standards, c_driver_mode, import_modes in MATRIX: | ||
for cxx_standard, install_c_driver, find_c_driver in product(cxx_standards, c_driver_mode, import_modes): | ||
commands = [ | ||
Setup.call(), InstallUV.call() | ||
] + ([InstallCDriver.call() if install_c_driver else FetchCDriverSource.call()]) + [ | ||
CMakeCompat.call( | ||
vars={ | ||
'CMAKE_MAJOR_VERSION': version[0], | ||
'CMAKE_MINOR_VERSION': version[1], | ||
'CMAKE_PATCH_VERSION': version[2], | ||
'INSTALL_C_DRIVER': 1 if install_c_driver else 0, | ||
'cxx_standard': cxx_standard, | ||
'find_c_driver': 1 if find_c_driver else 0, | ||
kevinAlbs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}, | ||
), | ||
] | ||
|
||
if install_c_driver: | ||
c_mode = 'find-c' | ||
else: | ||
c_mode = 'add-c' | ||
|
||
if find_c_driver: | ||
cxx_mode = 'find-cxx' | ||
else: | ||
cxx_mode = 'add-cxx' | ||
|
||
yield EvgTask( | ||
name=f'{TAG}-{name}-cxx{cxx_standard}-{c_mode}-{cxx_mode}', | ||
tags=[TAG, f'cmake-{name}', f'cmake-{c_mode}', f'cxx{cxx_standard}', f'cmake-{cxx_mode}'], | ||
run_on=distro.name, | ||
commands=commands, | ||
) | ||
|
||
|
||
def variants(): | ||
return [ | ||
BuildVariant( | ||
name=f'{TAG}-matrix', | ||
display_name='CMake Compatibility Matrix', | ||
tasks=[EvgTaskRef(name=f'.{TAG}')], | ||
), | ||
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.