diff --git a/.evergreen/config_generator/components/abi_compliance_check.py b/.evergreen/config_generator/components/abi_compliance_check.py index 1ea3ac0d3c1..a1cf44c808a 100644 --- a/.evergreen/config_generator/components/abi_compliance_check.py +++ b/.evergreen/config_generator/components/abi_compliance_check.py @@ -2,7 +2,7 @@ from shrub.v3.evg_command import s3_put from shrub.v3.evg_task import EvgTask -from config_generator.components.funcs.set_cache_dir import SetCacheDir +from config_generator.components.funcs.install_uv import InstallUV from config_generator.etc.function import Function from config_generator.etc.utils import bash_exec @@ -10,19 +10,19 @@ class CheckABICompliance(Function): name = 'abi-compliance-check' - commands = SetCacheDir.commands + [ + commands = [ bash_exec( command_type=EvgCommandType.SETUP, working_dir='mongoc', include_expansions_in_env=['MONGO_C_DRIVER_CACHE_DIR'], - script='.evergreen/scripts/abi-compliance-check-setup.sh' + script='.evergreen/scripts/abi-compliance-check-setup.sh', ), bash_exec( command_type=EvgCommandType.TEST, add_expansions_to_env=True, working_dir='mongoc', - include_expansions_in_env=['MONGO_C_DRIVER_CACHE_DIR'], - script='.evergreen/scripts/abi-compliance-check.sh' + include_expansions_in_env=['MONGO_C_DRIVER_CACHE_DIR', 'UV_INSTALL_DIR'], + script='.evergreen/scripts/abi-compliance-check.sh', ), s3_put( command_type=EvgCommandType.SYSTEM, @@ -57,6 +57,9 @@ def tasks(): return [ EvgTask( name=CheckABICompliance.name, - commands=[CheckABICompliance.call()], + commands=[ + InstallUV.call(), + CheckABICompliance.call(), + ], ) ] diff --git a/.evergreen/config_generator/components/c_std_compile.py b/.evergreen/config_generator/components/c_std_compile.py index 9060cf54458..232965628c9 100644 --- a/.evergreen/config_generator/components/c_std_compile.py +++ b/.evergreen/config_generator/components/c_std_compile.py @@ -2,7 +2,7 @@ from shrub.v3.evg_command import EvgCommandType from shrub.v3.evg_task import EvgTask, EvgTaskRef -from config_generator.components.funcs.find_cmake_latest import FindCMakeLatest +from config_generator.components.funcs.install_uv import InstallUV from config_generator.etc.distros import find_large_distro from config_generator.etc.distros import make_distro_str @@ -96,7 +96,7 @@ def tasks(): run_on=distro.name, tags=tags + [f'std-c{std}'], commands=[ - FindCMakeLatest.call(), + InstallUV.call(), StdCompile.call(vars=compile_vars | with_std) ], ) diff --git a/.evergreen/config_generator/components/clang_format.py b/.evergreen/config_generator/components/clang_format.py index 821b1a1efcf..2fd9778e537 100644 --- a/.evergreen/config_generator/components/clang_format.py +++ b/.evergreen/config_generator/components/clang_format.py @@ -3,6 +3,7 @@ from shrub.v3.evg_task import EvgTask from shrub.v3.evg_task import EvgTaskRef +from config_generator.components.funcs.install_uv import InstallUV from config_generator.etc.distros import find_small_distro from config_generator.etc.function import Function from config_generator.etc.utils import bash_exec @@ -20,7 +21,7 @@ class ClangFormat(Function): env={ "DRYRUN": "1", }, - script="uv run --frozen --only-group=format tools/format.py --mode=check", + script='PATH="${UV_INSTALL_DIR}:$PATH" uv run --frozen --only-group=format tools/format.py --mode=check', ), ] @@ -33,7 +34,10 @@ def tasks(): yield EvgTask( name=TAG, tags=[TAG], - commands=[ClangFormat.call()], + commands=[ + InstallUV.call(), + ClangFormat.call(), + ], ) diff --git a/.evergreen/config_generator/components/funcs/fetch_det.py b/.evergreen/config_generator/components/funcs/fetch_det.py index 75c8c3bf5cb..0c45752b889 100644 --- a/.evergreen/config_generator/components/funcs/fetch_det.py +++ b/.evergreen/config_generator/components/funcs/fetch_det.py @@ -23,21 +23,6 @@ class FetchDET(Function): working_dir="drivers-evergreen-tools", script='find .evergreen -type f -name "*.sh" -exec chmod +rx "{}" \;', ), - - # python is used frequently enough by many tasks that it is worth - # running find_python3 once here and reusing the result. - bash_exec( - command_type=EvgCommandType.SETUP, - script='''\ - set -o errexit - . drivers-evergreen-tools/.evergreen/find-python3.sh - echo "PYTHON3_BINARY: $(find_python3)" >|python3_binary.yml - ''', - ), - expansions_update( - command_type=EvgCommandType.SETUP, - file='python3_binary.yml', - ), ] diff --git a/.evergreen/config_generator/components/funcs/find_cmake_latest.py b/.evergreen/config_generator/components/funcs/find_cmake_latest.py deleted file mode 100644 index 89387fbcf7b..00000000000 --- a/.evergreen/config_generator/components/funcs/find_cmake_latest.py +++ /dev/null @@ -1,31 +0,0 @@ -from shrub.v3.evg_command import EvgCommandType - -from config_generator.etc.function import Function -from config_generator.etc.utils import bash_exec - - -class FindCMakeLatest(Function): - ''' - Call `find_cmake_latest` in an attempt to download-and-build the latest - CMake version as a Setup task with `retry_on_failure: true` prior to - subsequent use of `find-cmake-latest.sh` by compile and build scripts. - ''' - - name = 'find-cmake-latest' - command_type = EvgCommandType.SETUP - commands = [ - bash_exec( - command_type=command_type, - retry_on_failure=True, - working_dir='mongoc', - script='. .evergreen/scripts/find-cmake-latest.sh && find_cmake_latest' - ), - ] - - @classmethod - def call(cls, **kwargs): - return cls.default_call(**kwargs) - - -def functions(): - return FindCMakeLatest.defn() diff --git a/.evergreen/config_generator/components/funcs/install_uv.py b/.evergreen/config_generator/components/funcs/install_uv.py new file mode 100644 index 00000000000..decf0a66252 --- /dev/null +++ b/.evergreen/config_generator/components/funcs/install_uv.py @@ -0,0 +1,57 @@ +from config_generator.components.funcs.set_cache_dir import SetCacheDir + +from config_generator.etc.function import Function +from config_generator.etc.utils import bash_exec + +from shrub.v3.evg_command import EvgCommandType, expansions_update + + +class InstallUV(Function): + name = 'install-uv' + commands = SetCacheDir.commands + [ + bash_exec( + command_type=EvgCommandType.SETUP, + script='''\ + set -o errexit + set -o pipefail + + version="0.8.13" + + if [[ ! -n "${MONGO_C_DRIVER_CACHE_DIR}" ]]; then + echo "MONGO_C_DRIVER_CACHE_DIR is not defined!" 1>&2 + exit 1 + fi + + uv_install_dir="${MONGO_C_DRIVER_CACHE_DIR}/uv-$version" + mkdir -p "$uv_install_dir" + + if ! command -v "$uv_install_dir/uv" 2>/dev/null; then + script="$(mktemp)" + cp -f mongoc/.evergreen/scripts/uv-installer.sh "$script" + chmod +x "$script" + ( + . mongoc/.evergreen/scripts/patch-uv-installer.sh + patch_uv_installer "$script" "$version" + ) + env \\ + UV_INSTALL_DIR="$uv_install_dir" \\ + UV_UNMANAGED_INSTALL=1 \\ + INSTALLER_PRINT_VERBOSE=1 \\ + "$script" + fi + + PATH="$uv_install_dir:$PATH" command -V uv + PATH="$uv_install_dir:$PATH" uv --version + + printf "UV_INSTALL_DIR: %s\\n" "$uv_install_dir" >|expansions.uv.yml + ''', + ), + expansions_update( + command_type=EvgCommandType.SETUP, + file='expansions.uv.yml', + ), + ] + + +def functions(): + return InstallUV.defn() diff --git a/.evergreen/config_generator/components/funcs/run_simple_http_server.py b/.evergreen/config_generator/components/funcs/run_simple_http_server.py index 7eafc13aad7..4ef341efaee 100644 --- a/.evergreen/config_generator/components/funcs/run_simple_http_server.py +++ b/.evergreen/config_generator/components/funcs/run_simple_http_server.py @@ -12,11 +12,11 @@ class RunSimpleHTTPServer(Function): command_type=command_type, background=True, working_dir='mongoc', + include_expansions_in_env=['UV_INSTALL_DIR'], script='''\ set -o errexit echo "Starting simple HTTP server..." - command -V "${PYTHON3_BINARY}" >/dev/null - "${PYTHON3_BINARY}" .evergreen/scripts/simple_http_server.py + PATH="${UV_INSTALL_DIR}:$PATH" uvx python .evergreen/scripts/simple_http_server.py echo "Starting simple HTTP server... done." ''', ), diff --git a/.evergreen/config_generator/components/loadbalanced.py b/.evergreen/config_generator/components/loadbalanced.py index d15b8397749..111e6734c5a 100644 --- a/.evergreen/config_generator/components/loadbalanced.py +++ b/.evergreen/config_generator/components/loadbalanced.py @@ -5,7 +5,7 @@ from config_generator.components.funcs.bootstrap_mongo_orchestration import BootstrapMongoOrchestration from config_generator.components.funcs.fetch_build import FetchBuild from config_generator.components.funcs.fetch_det import FetchDET -from config_generator.components.funcs.find_cmake_latest import FindCMakeLatest +from config_generator.components.funcs.install_uv import InstallUV from config_generator.components.funcs.run_simple_http_server import RunSimpleHTTPServer from config_generator.components.funcs.run_tests import RunTests from config_generator.components.funcs.upload_build import UploadBuild @@ -56,6 +56,7 @@ def make_test_task(auth: bool, ssl: bool, server_version: str): 'TOPOLOGY': 'sharded_cluster', 'LOAD_BALANCER': 'on', }), + InstallUV.call(), RunSimpleHTTPServer.call(), FunctionCall(func='start-load-balancer', vars={ 'MONGODB_URI': 'mongodb://localhost:27017,localhost:27018' @@ -77,7 +78,7 @@ def tasks(): run_on=find_large_distro(_DISTRO_NAME).name, tags=['loadbalanced', _DISTRO_NAME, _COMPILER], commands=[ - FindCMakeLatest.call(), + InstallUV.call(), bash_exec( command_type=EvgCommandType.TEST, env={ @@ -85,6 +86,7 @@ def tasks(): 'CFLAGS': '-fno-omit-frame-pointer', 'SSL': 'OPENSSL' }, + include_expansions_in_env=['distro_id', 'UV_INSTALL_DIR'], working_dir='mongoc', script='.evergreen/scripts/compile.sh', ), diff --git a/.evergreen/config_generator/components/make_docs.py b/.evergreen/config_generator/components/make_docs.py index aa49b6532d5..05cddc91625 100644 --- a/.evergreen/config_generator/components/make_docs.py +++ b/.evergreen/config_generator/components/make_docs.py @@ -2,7 +2,7 @@ from shrub.v3.evg_command import s3_put from shrub.v3.evg_task import EvgTask -from config_generator.components.funcs.find_cmake_latest import FindCMakeLatest +from config_generator.components.funcs.install_uv import InstallUV from config_generator.etc.function import Function from config_generator.etc.function import merge_defns @@ -18,7 +18,7 @@ class MakeDocs(Function): include_expansions_in_env=["distro_id"], script="""\ # See SphinxBuild.cmake for EVG_DOCS_BUILD reasoning - uv run --frozen --only-group docs env EVG_DOCS_BUILD=1 .evergreen/scripts/build-docs.sh + PATH="${UV_INSTALL_DIR}:$PATH" uv run --frozen --only-group docs env EVG_DOCS_BUILD=1 .evergreen/scripts/build-docs.sh """, ), ] @@ -120,7 +120,7 @@ def tasks(): EvgTask( name="make-docs", commands=[ - FindCMakeLatest.call(), + InstallUV.call(), MakeDocs.call(), UploadDocs.call(), UploadManPages.call(), diff --git a/.evergreen/config_generator/components/mock_server.py b/.evergreen/config_generator/components/mock_server.py index b103cda65d6..0c5dc9e16a6 100644 --- a/.evergreen/config_generator/components/mock_server.py +++ b/.evergreen/config_generator/components/mock_server.py @@ -2,8 +2,7 @@ from shrub.v3.evg_command import EvgCommandType from shrub.v3.evg_task import EvgTask, EvgTaskRef -from config_generator.components.funcs.fetch_det import FetchDET -from config_generator.components.funcs.find_cmake_latest import FindCMakeLatest +from config_generator.components.funcs.install_uv import InstallUV from config_generator.components.funcs.run_simple_http_server import RunSimpleHTTPServer from config_generator.etc.utils import bash_exec @@ -13,10 +12,8 @@ def tasks(): name="mock-server-test", run_on="ubuntu2204-small", commands=[ - # Call fetch-det to define PYTHON3_BINARY expansion required for run-simple-http-server. - FetchDET.call(), + InstallUV.call(), RunSimpleHTTPServer.call(), - FindCMakeLatest.call(), bash_exec( command_type=EvgCommandType.TEST, add_expansions_to_env=True, diff --git a/.evergreen/config_generator/components/openssl_compat.py b/.evergreen/config_generator/components/openssl_compat.py index 119e7d2c20b..80c2da5325e 100644 --- a/.evergreen/config_generator/components/openssl_compat.py +++ b/.evergreen/config_generator/components/openssl_compat.py @@ -3,7 +3,7 @@ from config_generator.etc.utils import bash_exec from config_generator.components.funcs.fetch_source import FetchSource -from config_generator.components.funcs.find_cmake_latest import FindCMakeLatest +from config_generator.components.funcs.install_uv import InstallUV from shrub.v3.evg_build_variant import BuildVariant from shrub.v3.evg_command import EvgCommandType, FunctionCall @@ -39,13 +39,21 @@ class OpenSSLSetup(Function): bash_exec( command_type=EvgCommandType.SETUP, working_dir='mongoc', - include_expansions_in_env=['OPENSSL_VERSION', 'OPENSSL_ENABLE_FIPS', 'OPENSSL_USE_STATIC_LIBS'], + include_expansions_in_env=[ + 'OPENSSL_ENABLE_FIPS', + 'OPENSSL_USE_STATIC_LIBS', + 'OPENSSL_VERSION', + ], script='.evergreen/scripts/openssl-compat-setup.sh', ), bash_exec( command_type=EvgCommandType.SETUP, working_dir='mongoc', - include_expansions_in_env=['OPENSSL_VERSION', 'OPENSSL_USE_STATIC_LIBS'], + include_expansions_in_env=[ + 'OPENSSL_USE_STATIC_LIBS', + 'OPENSSL_VERSION', + 'UV_INSTALL_DIR', + ], script='.evergreen/scripts/openssl-compat-check.sh', ), ] @@ -71,7 +79,7 @@ def tasks(): tags=[TAG, f'openssl-{version}', f'openssl-{link_type}', distro_name, compiler], commands=[ FetchSource.call(), - FindCMakeLatest.call(), + InstallUV.call(), OpenSSLSetup.call(vars=vars), FunctionCall(func="run auth tests"), ], @@ -92,7 +100,7 @@ def tasks(): tags=[TAG, f'openssl-fips-{version}', f'openssl-{link_type}', distro_name, compiler], commands=[ FetchSource.call(), - FindCMakeLatest.call(), + InstallUV.call(), OpenSSLSetup.call(vars=vars), FunctionCall(func="run auth tests"), ], diff --git a/.evergreen/config_generator/components/scan_build.py b/.evergreen/config_generator/components/scan_build.py index cace4f67b5f..5738f29e3ca 100644 --- a/.evergreen/config_generator/components/scan_build.py +++ b/.evergreen/config_generator/components/scan_build.py @@ -3,7 +3,7 @@ from shrub.v3.evg_command import FunctionCall from shrub.v3.evg_task import EvgTask, EvgTaskRef -from config_generator.components.funcs.find_cmake_latest import FindCMakeLatest +from config_generator.components.funcs.install_uv import InstallUV from config_generator.etc.distros import find_large_distro from config_generator.etc.distros import make_distro_str @@ -68,7 +68,7 @@ def tasks(): run_on=distro.name, tags=tags, commands=[ - FindCMakeLatest.call(), + InstallUV.call(), ScanBuild.call(vars=compile_vars if compile_vars else None), FunctionCall(func='upload scan artifacts'), ], diff --git a/.evergreen/config_generator/etc/compile.py b/.evergreen/config_generator/etc/compile.py index 6e72b5757a4..2b63fa6df02 100644 --- a/.evergreen/config_generator/etc/compile.py +++ b/.evergreen/config_generator/etc/compile.py @@ -4,7 +4,7 @@ from config_generator.etc.distros import make_distro_str from config_generator.etc.distros import compiler_to_vars -from config_generator.components.funcs.find_cmake_latest import FindCMakeLatest +from config_generator.components.funcs.install_uv import InstallUV from config_generator.components.funcs.upload_build import UploadBuild @@ -37,7 +37,7 @@ def generate_compile_tasks(SSL, TAG, SASL_TO_FUNC, MATRIX, MORE_TAGS=None, MORE_ task_name = f'{tag}-{task_name}' commands = [] - commands.append(FindCMakeLatest.call()) + commands.append(InstallUV.call()) commands.append(SASL_TO_FUNC[sasl].call(vars=compile_vars if compile_vars else None)) commands.append(UploadBuild.call()) diff --git a/.evergreen/config_generator/etc/cse/test.py b/.evergreen/config_generator/etc/cse/test.py index ae2fe60de1b..3057ac38dc2 100644 --- a/.evergreen/config_generator/etc/cse/test.py +++ b/.evergreen/config_generator/etc/cse/test.py @@ -11,6 +11,7 @@ from config_generator.components.funcs.bootstrap_mongo_orchestration import BootstrapMongoOrchestration from config_generator.components.funcs.fetch_build import FetchBuild from config_generator.components.funcs.fetch_det import FetchDET +from config_generator.components.funcs.install_uv import InstallUV from config_generator.components.funcs.run_mock_kms_servers import RunMockKMSServers from config_generator.components.funcs.run_tests import RunTests @@ -62,6 +63,7 @@ def generate_test_tasks(SSL, TAG, MATRIX): test_commands.append(expansions_update(updates=updates)) test_commands.append(FetchDET.call()) test_commands.append(BootstrapMongoOrchestration.call()) + test_commands.append(InstallUV.call()) test_commands.append(RunMockKMSServers.call()) test_commands.append(RunTests.call()) diff --git a/.evergreen/config_generator/etc/sanitizers/test.py b/.evergreen/config_generator/etc/sanitizers/test.py index e8cf927ec4f..2dad2d4279d 100644 --- a/.evergreen/config_generator/etc/sanitizers/test.py +++ b/.evergreen/config_generator/etc/sanitizers/test.py @@ -11,6 +11,7 @@ from config_generator.components.funcs.bootstrap_mongo_orchestration import BootstrapMongoOrchestration from config_generator.components.funcs.fetch_build import FetchBuild from config_generator.components.funcs.fetch_det import FetchDET +from config_generator.components.funcs.install_uv import InstallUV from config_generator.components.funcs.run_simple_http_server import RunSimpleHTTPServer from config_generator.components.funcs.run_mock_kms_servers import RunMockKMSServers from config_generator.components.funcs.run_tests import RunTests @@ -87,6 +88,7 @@ def generate_test_tasks(SSL, TAG, MATRIX, MORE_COMPILE_TAGS=None, MORE_TEST_TAGS test_commands.append(expansions_update(updates=updates)) test_commands.append(FetchDET.call()) test_commands.append(BootstrapMongoOrchestration.call()) + test_commands.append(InstallUV.call()) test_commands.append(RunSimpleHTTPServer.call()) if 'cse' in MORE_COMPILE_TAGS: diff --git a/.evergreen/config_generator/etc/sasl/test.py b/.evergreen/config_generator/etc/sasl/test.py index 661656f9899..33cad9da182 100644 --- a/.evergreen/config_generator/etc/sasl/test.py +++ b/.evergreen/config_generator/etc/sasl/test.py @@ -11,6 +11,7 @@ from config_generator.components.funcs.bootstrap_mongo_orchestration import BootstrapMongoOrchestration from config_generator.components.funcs.fetch_build import FetchBuild from config_generator.components.funcs.fetch_det import FetchDET +from config_generator.components.funcs.install_uv import InstallUV from config_generator.components.funcs.run_simple_http_server import RunSimpleHTTPServer from config_generator.components.funcs.run_tests import RunTests @@ -63,6 +64,7 @@ def generate_test_tasks(SSL, TAG, MATRIX): test_commands.append(expansions_update(updates=updates)) test_commands.append(FetchDET.call()) test_commands.append(BootstrapMongoOrchestration.call()) + test_commands.append(InstallUV.call()) test_commands.append(RunSimpleHTTPServer.call()) test_commands.append(RunTests.call()) diff --git a/.evergreen/generated_configs/functions.yml b/.evergreen/generated_configs/functions.yml index 2081883f53c..1f603727854 100644 --- a/.evergreen/generated_configs/functions.yml +++ b/.evergreen/generated_configs/functions.yml @@ -1,36 +1,5 @@ functions: abi-compliance-check: - - command: subprocess.exec - type: setup - params: - binary: bash - args: - - -c - - | - if [[ -n "$XDG_CACHE_DIR" ]]; then - cache_dir="$XDG_CACHE_DIR" # XDG Base Directory specification. - elif [[ -n "$LOCALAPPDATA" ]]; then - cache_dir="$LOCALAPPDATA" # Windows. - elif [[ -n "$USERPROFILE" ]]; then - cache_dir="$USERPROFILE/.cache" # Windows (fallback). - elif [[ -d "$HOME/Library/Caches" ]]; then - cache_dir="$HOME/Library/Caches" # MacOS. - elif [[ -n "$HOME" ]]; then - cache_dir="$HOME/.cache" # Linux-like. - elif [[ -d ~/.cache ]]; then - cache_dir="~/.cache" # Linux-like (fallback). - else - cache_dir="$(pwd)/.cache" # EVG task directory (fallback). - fi - - mkdir -p "$cache_dir/mongo-c-driver" || exit - cache_dir="$(cd "$cache_dir/mongo-c-driver" && pwd)" || exit - - printf "MONGO_C_DRIVER_CACHE_DIR: %s\n" "$cache_dir" >|expansions.set-cache-dir.yml - - command: expansions.update - type: setup - params: - file: expansions.set-cache-dir.yml - command: subprocess.exec type: setup params: @@ -49,6 +18,7 @@ functions: add_expansions_to_env: true include_expansions_in_env: - MONGO_C_DRIVER_CACHE_DIR + - UV_INSTALL_DIR args: - -c - .evergreen/scripts/abi-compliance-check.sh @@ -123,7 +93,7 @@ functions: DRYRUN: "1" args: - -c - - uv run --frozen --only-group=format tools/format.py --mode=check + - PATH="${UV_INSTALL_DIR}:$PATH" uv run --frozen --only-group=format tools/format.py --mode=check cse-sasl-cyrus-darwinssl-compile: - command: expansions.update params: @@ -245,20 +215,6 @@ functions: args: - -c - find .evergreen -type f -name "*.sh" -exec chmod +rx "{}" \; - - command: subprocess.exec - type: setup - params: - binary: bash - args: - - -c - - | - set -o errexit - . drivers-evergreen-tools/.evergreen/find-python3.sh - echo "PYTHON3_BINARY: $(find_python3)" >|python3_binary.yml - - command: expansions.update - type: setup - params: - file: python3_binary.yml fetch-source: - command: git.get_project type: setup @@ -295,16 +251,81 @@ functions: for file in $(find .evergreen/scripts -type f); do chmod +rx "$file" || exit done - find-cmake-latest: + install-uv: + - command: subprocess.exec + type: setup + params: + binary: bash + args: + - -c + - | + if [[ -n "$XDG_CACHE_DIR" ]]; then + cache_dir="$XDG_CACHE_DIR" # XDG Base Directory specification. + elif [[ -n "$LOCALAPPDATA" ]]; then + cache_dir="$LOCALAPPDATA" # Windows. + elif [[ -n "$USERPROFILE" ]]; then + cache_dir="$USERPROFILE/.cache" # Windows (fallback). + elif [[ -d "$HOME/Library/Caches" ]]; then + cache_dir="$HOME/Library/Caches" # MacOS. + elif [[ -n "$HOME" ]]; then + cache_dir="$HOME/.cache" # Linux-like. + elif [[ -d ~/.cache ]]; then + cache_dir="~/.cache" # Linux-like (fallback). + else + cache_dir="$(pwd)/.cache" # EVG task directory (fallback). + fi + + mkdir -p "$cache_dir/mongo-c-driver" || exit + cache_dir="$(cd "$cache_dir/mongo-c-driver" && pwd)" || exit + + printf "MONGO_C_DRIVER_CACHE_DIR: %s\n" "$cache_dir" >|expansions.set-cache-dir.yml + - command: expansions.update + type: setup + params: + file: expansions.set-cache-dir.yml - command: subprocess.exec type: setup params: binary: bash - working_dir: mongoc - retry_on_failure: true args: - -c - - . .evergreen/scripts/find-cmake-latest.sh && find_cmake_latest + - | + set -o errexit + set -o pipefail + + version="0.8.13" + + if [[ ! -n "${MONGO_C_DRIVER_CACHE_DIR}" ]]; then + echo "MONGO_C_DRIVER_CACHE_DIR is not defined!" 1>&2 + exit 1 + fi + + uv_install_dir="${MONGO_C_DRIVER_CACHE_DIR}/uv-$version" + mkdir -p "$uv_install_dir" + + if ! command -v "$uv_install_dir/uv" 2>/dev/null; then + script="$(mktemp)" + cp -f mongoc/.evergreen/scripts/uv-installer.sh "$script" + chmod +x "$script" + ( + . mongoc/.evergreen/scripts/patch-uv-installer.sh + patch_uv_installer "$script" "$version" + ) + env \ + UV_INSTALL_DIR="$uv_install_dir" \ + UV_UNMANAGED_INSTALL=1 \ + INSTALLER_PRINT_VERBOSE=1 \ + "$script" + fi + + PATH="$uv_install_dir:$PATH" command -V uv + PATH="$uv_install_dir:$PATH" uv --version + + printf "UV_INSTALL_DIR: %s\n" "$uv_install_dir" >|expansions.uv.yml + - command: expansions.update + type: setup + params: + file: expansions.uv.yml kms-divergence-check: - command: subprocess.exec type: test @@ -326,7 +347,7 @@ functions: - -c - | # See SphinxBuild.cmake for EVG_DOCS_BUILD reasoning - uv run --frozen --only-group docs env EVG_DOCS_BUILD=1 .evergreen/scripts/build-docs.sh + PATH="${UV_INSTALL_DIR}:$PATH" uv run --frozen --only-group docs env EVG_DOCS_BUILD=1 .evergreen/scripts/build-docs.sh openssl-compat: - command: subprocess.exec type: setup @@ -334,9 +355,9 @@ functions: binary: bash working_dir: mongoc include_expansions_in_env: - - OPENSSL_VERSION - OPENSSL_ENABLE_FIPS - OPENSSL_USE_STATIC_LIBS + - OPENSSL_VERSION args: - -c - .evergreen/scripts/openssl-compat-setup.sh @@ -346,8 +367,9 @@ functions: binary: bash working_dir: mongoc include_expansions_in_env: - - OPENSSL_VERSION - OPENSSL_USE_STATIC_LIBS + - OPENSSL_VERSION + - UV_INSTALL_DIR args: - -c - .evergreen/scripts/openssl-compat-check.sh @@ -433,13 +455,14 @@ functions: binary: bash working_dir: mongoc background: true + include_expansions_in_env: + - UV_INSTALL_DIR args: - -c - | set -o errexit echo "Starting simple HTTP server..." - command -V "${PYTHON3_BINARY}" >/dev/null - "${PYTHON3_BINARY}" .evergreen/scripts/simple_http_server.py + PATH="${UV_INSTALL_DIR}:$PATH" uvx python .evergreen/scripts/simple_http_server.py echo "Starting simple HTTP server... done." run-tests: - command: subprocess.exec diff --git a/.evergreen/generated_configs/legacy-config.yml b/.evergreen/generated_configs/legacy-config.yml index 3b19a9e65fb..c20f583a76a 100644 --- a/.evergreen/generated_configs/legacy-config.yml +++ b/.evergreen/generated_configs/legacy-config.yml @@ -88,6 +88,7 @@ functions: working_dir: mongoc include_expansions_in_env: - distro_id + - UV_INSTALL_DIR shell: bash script: |- set -o errexit @@ -96,6 +97,7 @@ functions: export BUILD_SAMPLE_WITH_CMAKE=${BUILD_SAMPLE_WITH_CMAKE} export ENABLE_SSL=${ENABLE_SSL} export ENABLE_SNAPPY=${ENABLE_SNAPPY} + PATH="${UV_INSTALL_DIR}:$PATH" LINK_STATIC= .evergreen/scripts/link-sample-program.sh LINK_STATIC=1 .evergreen/scripts/link-sample-program.sh link sample program bson: @@ -105,11 +107,13 @@ functions: working_dir: mongoc include_expansions_in_env: - distro_id + - UV_INSTALL_DIR shell: bash script: |- set -o errexit # Compile a program that links dynamically or statically to libbson, # using variables from pkg-config or from CMake's find_package command. + PATH="${UV_INSTALL_DIR}:$PATH" BUILD_SAMPLE_WITH_CMAKE= LINK_STATIC= .evergreen/scripts/link-sample-program-bson.sh BUILD_SAMPLE_WITH_CMAKE= LINK_STATIC=1 .evergreen/scripts/link-sample-program-bson.sh BUILD_SAMPLE_WITH_CMAKE=1 LINK_STATIC= .evergreen/scripts/link-sample-program-bson.sh @@ -119,8 +123,6 @@ functions: type: test params: working_dir: mongoc - include_expansions_in_env: - - distro_id shell: bash script: |- set -o errexit @@ -129,9 +131,7 @@ functions: # find_package command. export ENABLE_SSL=${ENABLE_SSL} export ENABLE_SNAPPY=${ENABLE_SNAPPY} - . .evergreen/scripts/use-tools.sh paths - . .evergreen/scripts/find-cmake-latest.sh - export CMAKE="$(native-path "$(find_cmake_latest)")" + PATH="${UV_INSTALL_DIR}:$PATH" LINK_STATIC= cmd.exe /c .\\.evergreen\\scripts\\link-sample-program-msvc.cmd LINK_STATIC=1 cmd.exe /c .\\.evergreen\\scripts\\link-sample-program-msvc.cmd link sample program mingw: @@ -139,24 +139,18 @@ functions: type: test params: working_dir: mongoc - include_expansions_in_env: - - distro_id shell: bash script: |- set -o errexit # Build libmongoc with CMake and compile a program that links # dynamically to it, using variables from pkg-config.exe. - . .evergreen/scripts/use-tools.sh paths - . .evergreen/scripts/find-cmake-latest.sh - export CMAKE="$(native-path "$(find_cmake_latest)")" + PATH="${UV_INSTALL_DIR}:$PATH" cmd.exe /c .\\.evergreen\\scripts\\link-sample-program-mingw.cmd link sample program MSVC bson: - command: shell.exec type: test params: working_dir: mongoc - include_expansions_in_env: - - distro_id shell: bash script: |- set -o errexit @@ -165,9 +159,7 @@ functions: # find_package command. export ENABLE_SSL=${ENABLE_SSL} export ENABLE_SNAPPY=${ENABLE_SNAPPY} - . .evergreen/scripts/use-tools.sh paths - . .evergreen/scripts/find-cmake-latest.sh - export CMAKE="$(native-path "$(find_cmake_latest)")" + PATH="${UV_INSTALL_DIR}:$PATH" LINK_STATIC= cmd.exe /c .\\.evergreen\\scripts\\link-sample-program-msvc-bson.cmd LINK_STATIC=1 cmd.exe /c .\\.evergreen\\scripts\\link-sample-program-msvc-bson.cmd link sample program mingw bson: @@ -180,9 +172,7 @@ functions: set -o errexit # Build libmongoc with CMake and compile a program that links # dynamically to it, using variables from pkg-config.exe. - . .evergreen/scripts/use-tools.sh paths - . .evergreen/scripts/find-cmake-latest.sh - export CMAKE="$(native-path "$(find_cmake_latest)")" + PATH="${UV_INSTALL_DIR}:$PATH" cmd.exe /c .\\.evergreen\\scripts\\link-sample-program-mingw-bson.cmd update codecov.io: - command: shell.exec @@ -247,7 +237,7 @@ tasks: tags: - hardened commands: - - func: find-cmake-latest + - func: install-uv - command: shell.exec type: test params: @@ -263,7 +253,7 @@ tasks: - compression - zlib commands: - - func: find-cmake-latest + - func: install-uv - command: shell.exec type: test params: @@ -279,7 +269,7 @@ tasks: - compression - snappy commands: - - func: find-cmake-latest + - func: install-uv - command: shell.exec type: test params: @@ -295,7 +285,7 @@ tasks: - compression - zstd commands: - - func: find-cmake-latest + - func: install-uv - command: shell.exec type: test params: @@ -312,7 +302,7 @@ tasks: - nosasl - nossl commands: - - func: find-cmake-latest + - func: install-uv - command: shell.exec type: test params: @@ -325,7 +315,7 @@ tasks: - func: upload-build - name: debug-compile-lto commands: - - func: find-cmake-latest + - func: install-uv - command: shell.exec type: test params: @@ -338,7 +328,7 @@ tasks: - func: upload-build - name: debug-compile-lto-thin commands: - - func: find-cmake-latest + - func: install-uv - command: shell.exec type: test params: @@ -354,7 +344,7 @@ tasks: - debug-compile - no-counters commands: - - func: find-cmake-latest + - func: install-uv - command: shell.exec type: test params: @@ -367,7 +357,7 @@ tasks: - func: upload-build - name: compile-tracing commands: - - func: find-cmake-latest + - func: install-uv - command: shell.exec type: test params: @@ -380,7 +370,7 @@ tasks: - func: upload-build - name: release-compile commands: - - func: find-cmake-latest + - func: install-uv - command: shell.exec type: test params: @@ -397,7 +387,7 @@ tasks: - nosasl - openssl commands: - - func: find-cmake-latest + - func: install-uv - command: shell.exec type: test params: @@ -414,7 +404,7 @@ tasks: - debug-compile - nosasl commands: - - func: find-cmake-latest + - func: install-uv - command: shell.exec type: test params: @@ -431,7 +421,7 @@ tasks: - nosasl - winssl commands: - - func: find-cmake-latest + - func: install-uv - command: shell.exec type: test params: @@ -448,7 +438,7 @@ tasks: - openssl - sasl commands: - - func: find-cmake-latest + - func: install-uv - command: shell.exec type: test params: @@ -465,7 +455,7 @@ tasks: - debug-compile - sasl commands: - - func: find-cmake-latest + - func: install-uv - command: shell.exec type: test params: @@ -478,7 +468,7 @@ tasks: - func: upload-build - name: debug-compile-rdtscp commands: - - func: find-cmake-latest + - func: install-uv - command: shell.exec type: test params: @@ -495,7 +485,7 @@ tasks: - sspi - winssl commands: - - func: find-cmake-latest + - func: install-uv - command: shell.exec type: test params: @@ -510,7 +500,7 @@ tasks: tags: - debug-compile commands: - - func: find-cmake-latest + - func: install-uv - command: shell.exec type: test params: @@ -525,6 +515,7 @@ tasks: commands: - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: link sample program vars: BUILD_SAMPLE_WITH_CMAKE: 1 @@ -532,6 +523,7 @@ tasks: commands: - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: link sample program vars: BUILD_SAMPLE_WITH_CMAKE: 1 @@ -540,6 +532,7 @@ tasks: commands: - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: link sample program vars: BUILD_SAMPLE_WITH_CMAKE: 1 @@ -548,6 +541,7 @@ tasks: commands: - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: link sample program vars: BUILD_SAMPLE_WITH_CMAKE: 1 @@ -555,6 +549,7 @@ tasks: commands: - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: link sample program MSVC - name: link-with-cmake-windows-ssl commands: @@ -562,6 +557,7 @@ tasks: - func: bootstrap-mongo-orchestration vars: SSL: openssl + - func: install-uv - func: link sample program MSVC vars: ENABLE_SSL: 1 @@ -569,6 +565,7 @@ tasks: commands: - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: link sample program MSVC vars: ENABLE_SNAPPY: 'ON' @@ -576,35 +573,43 @@ tasks: commands: - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: link sample program mingw - name: link-with-pkg-config commands: - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: link sample program - name: link-with-pkg-config-mac commands: - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: link sample program - name: link-with-pkg-config-ssl commands: - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: link sample program vars: ENABLE_SSL: 1 - name: link-with-bson commands: + - func: install-uv - func: link sample program bson - name: link-with-bson-mac commands: + - func: install-uv - func: link sample program bson - name: link-with-bson-windows commands: + - func: install-uv - func: link sample program MSVC bson - name: link-with-bson-mingw commands: + - func: install-uv - func: link sample program mingw bson - name: debian-package-build commands: @@ -712,7 +717,7 @@ tasks: .evergreen/scripts/build_snapshot_rpm.sh - name: debug-compile-with-warnings commands: - - func: find-cmake-latest + - func: install-uv - command: shell.exec type: test params: @@ -725,10 +730,14 @@ tasks: - func: upload-build - name: install-libmongoc-after-libbson commands: + - func: install-uv - command: shell.exec type: test params: working_dir: mongoc + include_expansions_in_env: + - distro_id + - UV_INSTALL_DIR shell: bash script: |- set -o errexit @@ -738,6 +747,7 @@ tasks: - latest - test-coverage commands: + - func: install-uv - func: compile coverage vars: SASL: AUTO @@ -763,6 +773,7 @@ tasks: - latest - test-coverage commands: + - func: install-uv - func: compile coverage vars: COMPILE_LIBMONGOCRYPT: 'ON' @@ -933,6 +944,7 @@ tasks: vars: AUTH: noauth SSL: nossl + - func: install-uv - func: run-simple-http-server - func: run-tests vars: @@ -955,6 +967,7 @@ tasks: vars: AUTH: noauth SSL: nossl + - func: install-uv - func: run-simple-http-server - func: run-tests vars: @@ -977,6 +990,7 @@ tasks: vars: AUTH: noauth SSL: nossl + - func: install-uv - func: run-simple-http-server - func: run-tests vars: @@ -995,6 +1009,7 @@ tasks: vars: MONGODB_VERSION: latest TOPOLOGY: server + - func: install-uv - func: run-simple-http-server - func: run-tests vars: @@ -1014,6 +1029,7 @@ tasks: vars: MONGODB_VERSION: latest TOPOLOGY: server + - func: install-uv - func: run-simple-http-server - func: run-tests vars: @@ -1071,7 +1087,7 @@ tasks: - asan - authentication-tests commands: - - func: find-cmake-latest + - func: install-uv - command: shell.exec type: test params: @@ -1102,6 +1118,7 @@ tasks: REQUIRE_API_VERSION: 'true' SSL: ssl TOPOLOGY: server + - func: install-uv - func: run-simple-http-server - func: run-tests vars: @@ -1126,6 +1143,7 @@ tasks: ORCHESTRATION_FILE: versioned-api-testing.json SSL: nossl TOPOLOGY: server + - func: install-uv - func: run-simple-http-server - func: run-tests vars: @@ -1150,6 +1168,7 @@ tasks: REQUIRE_API_VERSION: 'true' SSL: ssl TOPOLOGY: server + - func: install-uv - func: run-simple-http-server - func: run-tests vars: @@ -1174,6 +1193,7 @@ tasks: ORCHESTRATION_FILE: versioned-api-testing.json SSL: nossl TOPOLOGY: server + - func: install-uv - func: run-simple-http-server - func: run-tests vars: @@ -1198,6 +1218,7 @@ tasks: REQUIRE_API_VERSION: 'true' SSL: ssl TOPOLOGY: server + - func: install-uv - func: run-simple-http-server - func: run-tests vars: @@ -1222,6 +1243,7 @@ tasks: ORCHESTRATION_FILE: versioned-api-testing.json SSL: nossl TOPOLOGY: server + - func: install-uv - func: run-simple-http-server - func: run-tests vars: @@ -1246,6 +1268,7 @@ tasks: REQUIRE_API_VERSION: 'true' SSL: ssl TOPOLOGY: server + - func: install-uv - func: run-simple-http-server - func: run-tests vars: @@ -1270,6 +1293,7 @@ tasks: ORCHESTRATION_FILE: versioned-api-testing.json SSL: nossl TOPOLOGY: server + - func: install-uv - func: run-simple-http-server - func: run-tests vars: @@ -1291,6 +1315,7 @@ tasks: BUILD_NAME: debug-compile-nosasl-nossl - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests vars: @@ -1310,6 +1335,7 @@ tasks: BUILD_NAME: debug-compile-nosasl-nossl - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests vars: @@ -1329,6 +1355,7 @@ tasks: BUILD_NAME: debug-compile-nosasl-nossl - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests vars: @@ -1348,34 +1375,33 @@ tasks: BUILD_NAME: debug-compile-nosasl-nossl - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests vars: URI: mongodb://localhost/ - name: debug-compile-aws commands: - - func: find-cmake-latest + - func: install-uv - command: shell.exec type: test params: working_dir: mongoc redirect_standard_error_to_output: true include_expansions_in_env: - - distro_id - CC shell: bash script: |- set -o errexit set -o errexit set -o pipefail - . .evergreen/scripts/find-cmake-latest.sh - cmake_binary="$(find_cmake_latest)" + PATH="${UV_INSTALL_DIR}:$PATH" # Use ccache if able. . .evergreen/scripts/find-ccache.sh find_ccache_and_export_vars "$(pwd)" || true # Compile test-awsauth. Disable unnecessary dependencies since test-awsauth is copied to a remote Ubuntu 20.04 ECS cluster for testing, which may not have all dependent libraries. - "$cmake_binary" -DENABLE_TRACING=ON -DENABLE_SASL=OFF -DENABLE_SNAPPY=OFF -DENABLE_ZSTD=OFF -DENABLE_CLIENT_SIDE_ENCRYPTION=OFF -S . -B cmake-build - "$cmake_binary" --build cmake-build --target test-awsauth + uvx cmake -DENABLE_TRACING=ON -DENABLE_SASL=OFF -DENABLE_SNAPPY=OFF -DENABLE_ZSTD=OFF -DENABLE_CLIENT_SIDE_ENCRYPTION=OFF -S . -B cmake-build + uvx cmake --build cmake-build --target test-awsauth - func: upload-build - name: test-aws-openssl-regular-latest tags: @@ -9800,7 +9826,7 @@ tasks: - name: testazurekms-task commands: - func: fetch-source - - func: find-cmake-latest + - func: install-uv - command: shell.exec params: add_expansions_to_env: true @@ -9843,7 +9869,7 @@ tasks: - name: testazurekms-fail-task commands: - func: fetch-source - - func: find-cmake-latest + - func: install-uv - command: shell.exec params: add_expansions_to_env: true @@ -9868,7 +9894,7 @@ tasks: - name: testgcpkms-task commands: - func: fetch-source - - func: find-cmake-latest + - func: install-uv - command: shell.exec params: add_expansions_to_env: true @@ -9908,7 +9934,7 @@ tasks: GCPKMS_CMD="LD_LIBRARY_PATH=./testgcpkms MONGODB_URI='mongodb://localhost:27017' ./testgcpkms/test-gcpkms" $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/run-command.sh - name: testgcpkms-fail-task commands: - - func: find-cmake-latest + - func: install-uv - command: shell.exec params: add_expansions_to_env: true diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index 76b24381e89..7d270fae2bf 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -1,12 +1,13 @@ tasks: - name: abi-compliance-check commands: + - func: install-uv - func: abi-compliance-check - name: asan-cse-sasl-cyrus-openssl-rhel8-latest-clang-compile run_on: rhel8-latest-large tags: [sanitizers-matrix-asan, compile, rhel8-latest, clang, cse, asan, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: cse-sasl-cyrus-openssl-compile vars: CC: clang @@ -32,6 +33,7 @@ tasks: - { key: CLIENT_SIDE_ENCRYPTION, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -56,6 +58,7 @@ tasks: - { key: SKIP_CRYPT_SHARED_LIB, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -79,6 +82,7 @@ tasks: - { key: CLIENT_SIDE_ENCRYPTION, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -103,6 +107,7 @@ tasks: - { key: SKIP_CRYPT_SHARED_LIB, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -126,6 +131,7 @@ tasks: - { key: CLIENT_SIDE_ENCRYPTION, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -150,6 +156,7 @@ tasks: - { key: SKIP_CRYPT_SHARED_LIB, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -173,6 +180,7 @@ tasks: - { key: CLIENT_SIDE_ENCRYPTION, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -197,6 +205,7 @@ tasks: - { key: SKIP_CRYPT_SHARED_LIB, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -220,6 +229,7 @@ tasks: - { key: CLIENT_SIDE_ENCRYPTION, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -244,6 +254,7 @@ tasks: - { key: SKIP_CRYPT_SHARED_LIB, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -267,6 +278,7 @@ tasks: - { key: CLIENT_SIDE_ENCRYPTION, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -291,6 +303,7 @@ tasks: - { key: SKIP_CRYPT_SHARED_LIB, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -314,6 +327,7 @@ tasks: - { key: CLIENT_SIDE_ENCRYPTION, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -338,6 +352,7 @@ tasks: - { key: SKIP_CRYPT_SHARED_LIB, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -361,6 +376,7 @@ tasks: - { key: CLIENT_SIDE_ENCRYPTION, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -385,6 +401,7 @@ tasks: - { key: SKIP_CRYPT_SHARED_LIB, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -408,6 +425,7 @@ tasks: - { key: CLIENT_SIDE_ENCRYPTION, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -432,6 +450,7 @@ tasks: - { key: SKIP_CRYPT_SHARED_LIB, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -455,6 +474,7 @@ tasks: - { key: CLIENT_SIDE_ENCRYPTION, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -479,6 +499,7 @@ tasks: - { key: SKIP_CRYPT_SHARED_LIB, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -502,6 +523,7 @@ tasks: - { key: CLIENT_SIDE_ENCRYPTION, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -526,6 +548,7 @@ tasks: - { key: SKIP_CRYPT_SHARED_LIB, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -549,6 +572,7 @@ tasks: - { key: CLIENT_SIDE_ENCRYPTION, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -573,6 +597,7 @@ tasks: - { key: SKIP_CRYPT_SHARED_LIB, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -596,6 +621,7 @@ tasks: - { key: CLIENT_SIDE_ENCRYPTION, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -620,6 +646,7 @@ tasks: - { key: SKIP_CRYPT_SHARED_LIB, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -643,6 +670,7 @@ tasks: - { key: CLIENT_SIDE_ENCRYPTION, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -667,6 +695,7 @@ tasks: - { key: SKIP_CRYPT_SHARED_LIB, value: "on" } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-mock-kms-servers - func: run-tests @@ -674,7 +703,7 @@ tasks: run_on: rhel8-latest-large tags: [sanitizers-matrix-asan, compile, rhel8-latest, clang, asan, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-cyrus-openssl-compile vars: CC: clang @@ -699,6 +728,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: asan-sasl-cyrus-openssl-rhel8-latest-clang-test-4.2-server-auth @@ -720,6 +750,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: asan-sasl-cyrus-openssl-rhel8-latest-clang-test-4.2-sharded-auth @@ -741,6 +772,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: asan-sasl-cyrus-openssl-rhel8-latest-clang-test-4.4-replica-auth @@ -762,6 +794,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: asan-sasl-cyrus-openssl-rhel8-latest-clang-test-4.4-server-auth @@ -783,6 +816,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: asan-sasl-cyrus-openssl-rhel8-latest-clang-test-4.4-sharded-auth @@ -804,6 +838,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: asan-sasl-cyrus-openssl-rhel8-latest-clang-test-5.0-replica-auth @@ -825,6 +860,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: asan-sasl-cyrus-openssl-rhel8-latest-clang-test-5.0-server-auth @@ -846,6 +882,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: asan-sasl-cyrus-openssl-rhel8-latest-clang-test-5.0-sharded-auth @@ -867,6 +904,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: asan-sasl-cyrus-openssl-rhel8-latest-clang-test-6.0-replica-auth @@ -888,6 +926,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: asan-sasl-cyrus-openssl-rhel8-latest-clang-test-6.0-server-auth @@ -909,6 +948,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: asan-sasl-cyrus-openssl-rhel8-latest-clang-test-6.0-sharded-auth @@ -930,6 +970,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: asan-sasl-cyrus-openssl-rhel8-latest-clang-test-7.0-replica-auth @@ -951,6 +992,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: asan-sasl-cyrus-openssl-rhel8-latest-clang-test-7.0-server-auth @@ -972,6 +1014,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: asan-sasl-cyrus-openssl-rhel8-latest-clang-test-7.0-sharded-auth @@ -993,6 +1036,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: asan-sasl-cyrus-openssl-rhel8-latest-clang-test-8.0-replica-auth @@ -1014,6 +1058,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: asan-sasl-cyrus-openssl-rhel8-latest-clang-test-8.0-server-auth @@ -1035,6 +1080,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: asan-sasl-cyrus-openssl-rhel8-latest-clang-test-8.0-sharded-auth @@ -1056,6 +1102,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: asan-sasl-cyrus-openssl-rhel8-latest-clang-test-latest-replica-auth @@ -1077,6 +1124,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: asan-sasl-cyrus-openssl-rhel8-latest-clang-test-latest-server-auth @@ -1098,6 +1146,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: asan-sasl-cyrus-openssl-rhel8-latest-clang-test-latest-sharded-auth @@ -1119,6 +1168,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: check-headers @@ -1643,12 +1693,13 @@ tasks: - name: clang-format tags: [clang-format] commands: + - func: install-uv - func: clang-format - name: cse-sasl-cyrus-darwinssl-macos-14-arm64-clang-compile run_on: macos-14-arm64 tags: [cse-matrix-darwinssl, compile, macos-14-arm64, clang, cse, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: cse-sasl-cyrus-darwinssl-compile vars: CC: clang @@ -1673,6 +1724,7 @@ tasks: - { key: SSL, value: darwinssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-darwinssl-macos-14-arm64-clang-test-6.0-server-auth @@ -1694,6 +1746,7 @@ tasks: - { key: SSL, value: darwinssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-darwinssl-macos-14-arm64-clang-test-6.0-sharded-auth @@ -1715,6 +1768,7 @@ tasks: - { key: SSL, value: darwinssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-darwinssl-macos-14-arm64-clang-test-7.0-replica-auth @@ -1736,6 +1790,7 @@ tasks: - { key: SSL, value: darwinssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-darwinssl-macos-14-arm64-clang-test-7.0-server-auth @@ -1757,6 +1812,7 @@ tasks: - { key: SSL, value: darwinssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-darwinssl-macos-14-arm64-clang-test-7.0-sharded-auth @@ -1778,6 +1834,7 @@ tasks: - { key: SSL, value: darwinssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-darwinssl-macos-14-arm64-clang-test-8.0-replica-auth @@ -1799,6 +1856,7 @@ tasks: - { key: SSL, value: darwinssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-darwinssl-macos-14-arm64-clang-test-8.0-server-auth @@ -1820,6 +1878,7 @@ tasks: - { key: SSL, value: darwinssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-darwinssl-macos-14-arm64-clang-test-8.0-sharded-auth @@ -1841,6 +1900,7 @@ tasks: - { key: SSL, value: darwinssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-darwinssl-macos-14-arm64-clang-test-latest-replica-auth @@ -1862,6 +1922,7 @@ tasks: - { key: SSL, value: darwinssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-darwinssl-macos-14-arm64-clang-test-latest-server-auth @@ -1883,6 +1944,7 @@ tasks: - { key: SSL, value: darwinssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-darwinssl-macos-14-arm64-clang-test-latest-sharded-auth @@ -1904,13 +1966,14 @@ tasks: - { key: SSL, value: darwinssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-darwinssl-macos-14-clang-compile run_on: macos-14 tags: [cse-matrix-darwinssl, compile, macos-14, clang, cse, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: cse-sasl-cyrus-darwinssl-compile vars: CC: clang @@ -1935,6 +1998,7 @@ tasks: - { key: SSL, value: darwinssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-darwinssl-macos-14-clang-test-4.4-sharded-auth @@ -1956,6 +2020,7 @@ tasks: - { key: SSL, value: darwinssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-darwinssl-macos-14-clang-test-5.0-sharded-auth @@ -1977,13 +2042,14 @@ tasks: - { key: SSL, value: darwinssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-debian11-clang-compile run_on: debian11-large tags: [cse-matrix-openssl, compile, debian11, clang, cse, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: cse-sasl-cyrus-openssl-compile vars: CC: clang @@ -1993,7 +2059,7 @@ tasks: run_on: debian11-large tags: [cse-matrix-openssl, compile, debian11, gcc, cse, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: cse-sasl-cyrus-openssl-compile vars: CC: gcc @@ -2003,7 +2069,7 @@ tasks: run_on: debian12-large tags: [cse-matrix-openssl, compile, debian12, clang, cse, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: cse-sasl-cyrus-openssl-compile vars: CC: clang @@ -2013,7 +2079,7 @@ tasks: run_on: debian12-large tags: [cse-matrix-openssl, compile, debian12, gcc, cse, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: cse-sasl-cyrus-openssl-compile vars: CC: gcc @@ -2023,7 +2089,7 @@ tasks: run_on: rhel8-latest-large tags: [cse-matrix-openssl, compile, rhel8-latest, gcc, cse, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: cse-sasl-cyrus-openssl-compile vars: CC: gcc @@ -2048,6 +2114,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-rhel8-latest-gcc-test-4.2-server-auth @@ -2069,6 +2136,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-rhel8-latest-gcc-test-4.2-sharded-auth @@ -2090,6 +2158,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-rhel8-latest-gcc-test-4.4-replica-auth @@ -2111,6 +2180,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-rhel8-latest-gcc-test-4.4-server-auth @@ -2132,6 +2202,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-rhel8-latest-gcc-test-4.4-sharded-auth @@ -2153,6 +2224,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-rhel8-latest-gcc-test-5.0-replica-auth @@ -2174,6 +2246,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-rhel8-latest-gcc-test-5.0-server-auth @@ -2195,6 +2268,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-rhel8-latest-gcc-test-5.0-sharded-auth @@ -2216,6 +2290,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-rhel8-latest-gcc-test-6.0-replica-auth @@ -2237,6 +2312,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-rhel8-latest-gcc-test-6.0-server-auth @@ -2258,6 +2334,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-rhel8-latest-gcc-test-6.0-sharded-auth @@ -2279,6 +2356,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-rhel8-latest-gcc-test-7.0-replica-auth @@ -2300,6 +2378,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-rhel8-latest-gcc-test-7.0-server-auth @@ -2321,6 +2400,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-rhel8-latest-gcc-test-7.0-sharded-auth @@ -2342,6 +2422,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-rhel8-latest-gcc-test-8.0-replica-auth @@ -2363,6 +2444,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-rhel8-latest-gcc-test-8.0-server-auth @@ -2384,6 +2466,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-rhel8-latest-gcc-test-8.0-sharded-auth @@ -2405,6 +2488,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-rhel8-latest-gcc-test-latest-replica-auth @@ -2426,6 +2510,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-rhel8-latest-gcc-test-latest-server-auth @@ -2447,6 +2532,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-rhel8-latest-gcc-test-latest-sharded-auth @@ -2468,6 +2554,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-rhel8-zseries-gcc-compile @@ -2475,7 +2562,7 @@ tasks: tags: [cse-matrix-openssl, compile, rhel8-zseries, gcc, cse, sasl-cyrus] patchable: false commands: - - func: find-cmake-latest + - func: install-uv - func: cse-sasl-cyrus-openssl-compile vars: CC: gcc @@ -2501,6 +2588,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-rhel8-zseries-gcc-test-latest-sharded-auth @@ -2523,13 +2611,14 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-rhel80-gcc-compile run_on: rhel80-large tags: [cse-matrix-openssl, compile, rhel80, gcc, cse, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: cse-sasl-cyrus-openssl-compile vars: CC: gcc @@ -2539,7 +2628,7 @@ tasks: run_on: ubuntu2004-arm64-large tags: [cse-matrix-openssl, compile, ubuntu2004-arm64, gcc, cse, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: cse-sasl-cyrus-openssl-compile vars: CC: gcc @@ -2564,6 +2653,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-ubuntu2004-arm64-gcc-test-4.4-server-auth @@ -2585,6 +2675,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-ubuntu2004-arm64-gcc-test-4.4-sharded-auth @@ -2606,6 +2697,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-ubuntu2004-arm64-gcc-test-5.0-replica-auth @@ -2627,6 +2719,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-ubuntu2004-arm64-gcc-test-5.0-server-auth @@ -2648,6 +2741,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-ubuntu2004-arm64-gcc-test-5.0-sharded-auth @@ -2669,6 +2763,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-ubuntu2004-arm64-gcc-test-6.0-replica-auth @@ -2690,6 +2785,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-ubuntu2004-arm64-gcc-test-6.0-server-auth @@ -2711,6 +2807,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-ubuntu2004-arm64-gcc-test-6.0-sharded-auth @@ -2732,6 +2829,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-ubuntu2004-arm64-gcc-test-7.0-replica-auth @@ -2753,6 +2851,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-ubuntu2004-arm64-gcc-test-7.0-server-auth @@ -2774,6 +2873,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-ubuntu2004-arm64-gcc-test-7.0-sharded-auth @@ -2795,6 +2895,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-ubuntu2004-arm64-gcc-test-8.0-replica-auth @@ -2816,6 +2917,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-ubuntu2004-arm64-gcc-test-8.0-server-auth @@ -2837,6 +2939,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-ubuntu2004-arm64-gcc-test-8.0-sharded-auth @@ -2858,6 +2961,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-ubuntu2004-arm64-gcc-test-latest-replica-auth @@ -2879,6 +2983,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-ubuntu2004-arm64-gcc-test-latest-server-auth @@ -2900,6 +3005,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-ubuntu2004-arm64-gcc-test-latest-sharded-auth @@ -2921,13 +3027,14 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-ubuntu2004-clang-compile run_on: ubuntu2004-large tags: [cse-matrix-openssl, compile, ubuntu2004, clang, cse, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: cse-sasl-cyrus-openssl-compile vars: CC: clang @@ -2937,7 +3044,7 @@ tasks: run_on: ubuntu2004-large tags: [cse-matrix-openssl, compile, ubuntu2004, gcc, cse, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: cse-sasl-cyrus-openssl-compile vars: CC: gcc @@ -2947,7 +3054,7 @@ tasks: run_on: ubuntu2204-large tags: [cse-matrix-openssl, compile, ubuntu2204, clang-12, cse, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: cse-sasl-cyrus-openssl-compile vars: CC: clang-12 @@ -2957,7 +3064,7 @@ tasks: run_on: ubuntu2204-large tags: [cse-matrix-openssl, compile, ubuntu2204, gcc, cse, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: cse-sasl-cyrus-openssl-compile vars: CC: gcc @@ -2967,7 +3074,7 @@ tasks: run_on: ubuntu2404-large tags: [cse-matrix-openssl, compile, ubuntu2404, clang-14, cse, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: cse-sasl-cyrus-openssl-compile vars: CC: clang-14 @@ -2977,7 +3084,7 @@ tasks: run_on: ubuntu2404-large tags: [cse-matrix-openssl, compile, ubuntu2404, gcc, cse, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: cse-sasl-cyrus-openssl-compile vars: CC: gcc @@ -2987,7 +3094,7 @@ tasks: run_on: windows-vsCurrent-large tags: [cse-matrix-openssl, compile, windows-vsCurrent, vs2022x64, cse, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: cse-sasl-cyrus-openssl-compile vars: CMAKE_GENERATOR: Visual Studio 17 2022 @@ -3012,6 +3119,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-windows-2019-vs2022-x64-test-4.2-server-auth @@ -3033,6 +3141,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-windows-2019-vs2022-x64-test-4.2-sharded-auth @@ -3054,6 +3163,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-windows-2019-vs2022-x64-test-4.4-replica-auth @@ -3075,6 +3185,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-windows-2019-vs2022-x64-test-4.4-server-auth @@ -3096,6 +3207,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-windows-2019-vs2022-x64-test-4.4-sharded-auth @@ -3117,6 +3229,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-windows-2019-vs2022-x64-test-5.0-replica-auth @@ -3138,6 +3251,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-windows-2019-vs2022-x64-test-5.0-server-auth @@ -3159,6 +3273,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-windows-2019-vs2022-x64-test-5.0-sharded-auth @@ -3180,6 +3295,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-windows-2019-vs2022-x64-test-6.0-replica-auth @@ -3201,6 +3317,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-windows-2019-vs2022-x64-test-6.0-server-auth @@ -3222,6 +3339,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-windows-2019-vs2022-x64-test-6.0-sharded-auth @@ -3243,6 +3361,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-windows-2019-vs2022-x64-test-7.0-replica-auth @@ -3264,6 +3383,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-windows-2019-vs2022-x64-test-7.0-server-auth @@ -3285,6 +3405,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-windows-2019-vs2022-x64-test-7.0-sharded-auth @@ -3306,6 +3427,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-windows-2019-vs2022-x64-test-8.0-replica-auth @@ -3327,6 +3449,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-windows-2019-vs2022-x64-test-8.0-server-auth @@ -3348,6 +3471,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-windows-2019-vs2022-x64-test-8.0-sharded-auth @@ -3369,6 +3493,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-windows-2019-vs2022-x64-test-latest-replica-auth @@ -3390,6 +3515,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-windows-2019-vs2022-x64-test-latest-server-auth @@ -3411,6 +3537,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-openssl-windows-2019-vs2022-x64-test-latest-sharded-auth @@ -3432,13 +3559,14 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-winssl-windows-2019-vs2015-x64-compile run_on: windows-vsCurrent-large tags: [cse-matrix-winssl, compile, windows-vsCurrent, vs2015x64, cse, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: cse-sasl-cyrus-winssl-compile vars: CMAKE_GENERATOR: Visual Studio 14 2015 @@ -3463,6 +3591,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-winssl-windows-2019-vs2015-x64-test-latest-sharded-auth @@ -3484,13 +3613,14 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-winssl-windows-2019-vs2022-x64-compile run_on: windows-vsCurrent-large tags: [cse-matrix-winssl, compile, windows-vsCurrent, vs2022x64, cse, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: cse-sasl-cyrus-winssl-compile vars: CMAKE_GENERATOR: Visual Studio 17 2022 @@ -3515,6 +3645,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-winssl-windows-2019-vs2022-x64-test-4.2-server-auth @@ -3536,6 +3667,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-winssl-windows-2019-vs2022-x64-test-4.2-sharded-auth @@ -3557,6 +3689,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-winssl-windows-2019-vs2022-x64-test-4.4-replica-auth @@ -3578,6 +3711,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-winssl-windows-2019-vs2022-x64-test-4.4-server-auth @@ -3599,6 +3733,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-winssl-windows-2019-vs2022-x64-test-4.4-sharded-auth @@ -3620,6 +3755,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-winssl-windows-2019-vs2022-x64-test-5.0-replica-auth @@ -3641,6 +3777,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-winssl-windows-2019-vs2022-x64-test-5.0-server-auth @@ -3662,6 +3799,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-winssl-windows-2019-vs2022-x64-test-5.0-sharded-auth @@ -3683,6 +3821,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-winssl-windows-2019-vs2022-x64-test-6.0-replica-auth @@ -3704,6 +3843,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-winssl-windows-2019-vs2022-x64-test-6.0-server-auth @@ -3725,6 +3865,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-winssl-windows-2019-vs2022-x64-test-6.0-sharded-auth @@ -3746,6 +3887,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-winssl-windows-2019-vs2022-x64-test-7.0-replica-auth @@ -3767,6 +3909,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-winssl-windows-2019-vs2022-x64-test-7.0-server-auth @@ -3788,6 +3931,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-winssl-windows-2019-vs2022-x64-test-7.0-sharded-auth @@ -3809,6 +3953,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-winssl-windows-2019-vs2022-x64-test-8.0-replica-auth @@ -3830,6 +3975,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-winssl-windows-2019-vs2022-x64-test-8.0-server-auth @@ -3851,6 +3997,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-winssl-windows-2019-vs2022-x64-test-8.0-sharded-auth @@ -3872,6 +4019,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-winssl-windows-2019-vs2022-x64-test-latest-replica-auth @@ -3893,6 +4041,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-winssl-windows-2019-vs2022-x64-test-latest-server-auth @@ -3914,6 +4063,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: cse-sasl-cyrus-winssl-windows-2019-vs2022-x64-test-latest-sharded-auth @@ -3935,6 +4085,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-mock-kms-servers - func: run-tests - name: kms-divergence-check @@ -3944,7 +4095,7 @@ tasks: run_on: rhel8-latest-large tags: [loadbalanced, rhel8-latest, gcc] commands: - - func: find-cmake-latest + - func: install-uv - command: subprocess.exec type: test params: @@ -3954,6 +4105,9 @@ tasks: CC: gcc CFLAGS: -fno-omit-frame-pointer SSL: OPENSSL + include_expansions_in_env: + - distro_id + - UV_INSTALL_DIR args: - -c - .evergreen/scripts/compile.sh @@ -3974,6 +4128,7 @@ tasks: MONGODB_VERSION: "5.0" SSL: openssl TOPOLOGY: sharded_cluster + - func: install-uv - func: run-simple-http-server - func: start-load-balancer vars: @@ -4000,6 +4155,7 @@ tasks: MONGODB_VERSION: "5.0" SSL: nossl TOPOLOGY: sharded_cluster + - func: install-uv - func: run-simple-http-server - func: start-load-balancer vars: @@ -4026,6 +4182,7 @@ tasks: MONGODB_VERSION: "6.0" SSL: openssl TOPOLOGY: sharded_cluster + - func: install-uv - func: run-simple-http-server - func: start-load-balancer vars: @@ -4052,6 +4209,7 @@ tasks: MONGODB_VERSION: "6.0" SSL: nossl TOPOLOGY: sharded_cluster + - func: install-uv - func: run-simple-http-server - func: start-load-balancer vars: @@ -4078,6 +4236,7 @@ tasks: MONGODB_VERSION: "7.0" SSL: openssl TOPOLOGY: sharded_cluster + - func: install-uv - func: run-simple-http-server - func: start-load-balancer vars: @@ -4104,6 +4263,7 @@ tasks: MONGODB_VERSION: "7.0" SSL: nossl TOPOLOGY: sharded_cluster + - func: install-uv - func: run-simple-http-server - func: start-load-balancer vars: @@ -4130,6 +4290,7 @@ tasks: MONGODB_VERSION: "8.0" SSL: openssl TOPOLOGY: sharded_cluster + - func: install-uv - func: run-simple-http-server - func: start-load-balancer vars: @@ -4156,6 +4317,7 @@ tasks: MONGODB_VERSION: "8.0" SSL: nossl TOPOLOGY: sharded_cluster + - func: install-uv - func: run-simple-http-server - func: start-load-balancer vars: @@ -4182,6 +4344,7 @@ tasks: MONGODB_VERSION: latest SSL: openssl TOPOLOGY: sharded_cluster + - func: install-uv - func: run-simple-http-server - func: start-load-balancer vars: @@ -4208,6 +4371,7 @@ tasks: MONGODB_VERSION: latest SSL: nossl TOPOLOGY: sharded_cluster + - func: install-uv - func: run-simple-http-server - func: start-load-balancer vars: @@ -4220,16 +4384,15 @@ tasks: SSL: nossl - name: make-docs commands: - - func: find-cmake-latest + - func: install-uv - func: make-docs - func: upload-docs - func: upload-man-pages - name: mock-server-test run_on: ubuntu2204-small commands: - - func: fetch-det + - func: install-uv - func: run-simple-http-server - - func: find-cmake-latest - command: subprocess.exec type: test params: @@ -4252,7 +4415,7 @@ tasks: tags: [openssl-compat, openssl-1.0.2, openssl-shared, ubuntu2404, gcc] commands: - func: fetch-source - - func: find-cmake-latest + - func: install-uv - func: openssl-compat vars: OPENSSL_VERSION: 1.0.2 @@ -4262,7 +4425,7 @@ tasks: tags: [openssl-compat, openssl-1.0.2, openssl-static, ubuntu2404, gcc] commands: - func: fetch-source - - func: find-cmake-latest + - func: install-uv - func: openssl-compat vars: OPENSSL_USE_STATIC_LIBS: "ON" @@ -4273,7 +4436,7 @@ tasks: tags: [openssl-compat, openssl-1.1.1, openssl-shared, ubuntu2404, gcc] commands: - func: fetch-source - - func: find-cmake-latest + - func: install-uv - func: openssl-compat vars: OPENSSL_VERSION: 1.1.1 @@ -4283,7 +4446,7 @@ tasks: tags: [openssl-compat, openssl-1.1.1, openssl-static, ubuntu2404, gcc] commands: - func: fetch-source - - func: find-cmake-latest + - func: install-uv - func: openssl-compat vars: OPENSSL_USE_STATIC_LIBS: "ON" @@ -4294,7 +4457,7 @@ tasks: tags: [openssl-compat, openssl-3.0.9, openssl-shared, ubuntu2404, gcc] commands: - func: fetch-source - - func: find-cmake-latest + - func: install-uv - func: openssl-compat vars: OPENSSL_VERSION: 3.0.9 @@ -4304,7 +4467,7 @@ tasks: tags: [openssl-compat, openssl-3.0.9, openssl-static, ubuntu2404, gcc] commands: - func: fetch-source - - func: find-cmake-latest + - func: install-uv - func: openssl-compat vars: OPENSSL_USE_STATIC_LIBS: "ON" @@ -4315,7 +4478,7 @@ tasks: tags: [openssl-compat, openssl-3.1.2, openssl-shared, ubuntu2404, gcc] commands: - func: fetch-source - - func: find-cmake-latest + - func: install-uv - func: openssl-compat vars: OPENSSL_VERSION: 3.1.2 @@ -4325,7 +4488,7 @@ tasks: tags: [openssl-compat, openssl-3.1.2, openssl-static, ubuntu2404, gcc] commands: - func: fetch-source - - func: find-cmake-latest + - func: install-uv - func: openssl-compat vars: OPENSSL_USE_STATIC_LIBS: "ON" @@ -4336,7 +4499,7 @@ tasks: tags: [openssl-compat, openssl-3.2.5, openssl-shared, ubuntu2404, gcc] commands: - func: fetch-source - - func: find-cmake-latest + - func: install-uv - func: openssl-compat vars: OPENSSL_VERSION: 3.2.5 @@ -4346,7 +4509,7 @@ tasks: tags: [openssl-compat, openssl-3.2.5, openssl-static, ubuntu2404, gcc] commands: - func: fetch-source - - func: find-cmake-latest + - func: install-uv - func: openssl-compat vars: OPENSSL_USE_STATIC_LIBS: "ON" @@ -4357,7 +4520,7 @@ tasks: tags: [openssl-compat, openssl-3.3.4, openssl-shared, ubuntu2404, gcc] commands: - func: fetch-source - - func: find-cmake-latest + - func: install-uv - func: openssl-compat vars: OPENSSL_VERSION: 3.3.4 @@ -4367,7 +4530,7 @@ tasks: tags: [openssl-compat, openssl-3.3.4, openssl-static, ubuntu2404, gcc] commands: - func: fetch-source - - func: find-cmake-latest + - func: install-uv - func: openssl-compat vars: OPENSSL_USE_STATIC_LIBS: "ON" @@ -4378,7 +4541,7 @@ tasks: tags: [openssl-compat, openssl-3.4.2, openssl-shared, ubuntu2404, gcc] commands: - func: fetch-source - - func: find-cmake-latest + - func: install-uv - func: openssl-compat vars: OPENSSL_VERSION: 3.4.2 @@ -4388,7 +4551,7 @@ tasks: tags: [openssl-compat, openssl-3.4.2, openssl-static, ubuntu2404, gcc] commands: - func: fetch-source - - func: find-cmake-latest + - func: install-uv - func: openssl-compat vars: OPENSSL_USE_STATIC_LIBS: "ON" @@ -4399,7 +4562,7 @@ tasks: tags: [openssl-compat, openssl-3.5.1, openssl-shared, ubuntu2404, gcc] commands: - func: fetch-source - - func: find-cmake-latest + - func: install-uv - func: openssl-compat vars: OPENSSL_VERSION: 3.5.1 @@ -4409,7 +4572,7 @@ tasks: tags: [openssl-compat, openssl-3.5.1, openssl-static, ubuntu2404, gcc] commands: - func: fetch-source - - func: find-cmake-latest + - func: install-uv - func: openssl-compat vars: OPENSSL_USE_STATIC_LIBS: "ON" @@ -4420,7 +4583,7 @@ tasks: tags: [openssl-compat, openssl-fips-3.0.9, openssl-shared, ubuntu2404, gcc] commands: - func: fetch-source - - func: find-cmake-latest + - func: install-uv - func: openssl-compat vars: OPENSSL_ENABLE_FIPS: "ON" @@ -4431,7 +4594,7 @@ tasks: tags: [openssl-compat, openssl-fips-3.0.9, openssl-static, ubuntu2404, gcc] commands: - func: fetch-source - - func: find-cmake-latest + - func: install-uv - func: openssl-compat vars: OPENSSL_ENABLE_FIPS: "ON" @@ -4443,7 +4606,7 @@ tasks: tags: [openssl-compat, openssl-fips-3.1.2, openssl-shared, ubuntu2404, gcc] commands: - func: fetch-source - - func: find-cmake-latest + - func: install-uv - func: openssl-compat vars: OPENSSL_ENABLE_FIPS: "ON" @@ -4454,7 +4617,7 @@ tasks: tags: [openssl-compat, openssl-fips-3.1.2, openssl-static, ubuntu2404, gcc] commands: - func: fetch-source - - func: find-cmake-latest + - func: install-uv - func: openssl-compat vars: OPENSSL_ENABLE_FIPS: "ON" @@ -4465,7 +4628,7 @@ tasks: run_on: macos-14-arm64 tags: [sasl-matrix-darwinssl, compile, macos-14-arm64, clang, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-cyrus-darwinssl-compile vars: CC: clang @@ -4490,6 +4653,7 @@ tasks: - { key: SSL, value: darwinssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-darwinssl-macos-14-arm64-clang-test-7.0-replica-auth @@ -4511,6 +4675,7 @@ tasks: - { key: SSL, value: darwinssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-darwinssl-macos-14-arm64-clang-test-8.0-replica-auth @@ -4532,6 +4697,7 @@ tasks: - { key: SSL, value: darwinssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-darwinssl-macos-14-arm64-clang-test-latest-replica-auth @@ -4553,13 +4719,14 @@ tasks: - { key: SSL, value: darwinssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-darwinssl-macos-14-clang-compile run_on: macos-14 tags: [sasl-matrix-darwinssl, compile, macos-14, clang, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-cyrus-darwinssl-compile vars: CC: clang @@ -4584,6 +4751,7 @@ tasks: - { key: SSL, value: darwinssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-darwinssl-macos-14-clang-test-4.4-replica-auth @@ -4605,6 +4773,7 @@ tasks: - { key: SSL, value: darwinssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-darwinssl-macos-14-clang-test-5.0-replica-auth @@ -4626,13 +4795,14 @@ tasks: - { key: SSL, value: darwinssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-amazon2023-arm64-latest-large-m8g-gcc-compile run_on: amazon2023-arm64-latest-large-m8g tags: [sasl-matrix-openssl, compile, amazon2023-arm64-latest-large-m8g, gcc, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-cyrus-openssl-compile vars: CC: gcc @@ -4657,6 +4827,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-amazon2023-arm64-latest-large-m8g-gcc-test-latest-server-auth @@ -4678,6 +4849,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-amazon2023-arm64-latest-large-m8g-gcc-test-latest-sharded-auth @@ -4699,13 +4871,14 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-debian11-gcc-compile run_on: debian11-large tags: [sasl-matrix-openssl, compile, debian11, gcc, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-cyrus-openssl-compile vars: CC: gcc @@ -4715,7 +4888,7 @@ tasks: run_on: debian12-large tags: [sasl-matrix-openssl, compile, debian12, gcc, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-cyrus-openssl-compile vars: CC: gcc @@ -4725,7 +4898,7 @@ tasks: run_on: rhel8-latest-large tags: [sasl-matrix-openssl, compile, rhel8-latest, gcc, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-cyrus-openssl-compile vars: CC: gcc @@ -4750,6 +4923,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-rhel8-latest-gcc-test-4.4-server-auth @@ -4771,6 +4945,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-rhel8-latest-gcc-test-5.0-server-auth @@ -4792,6 +4967,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-rhel8-latest-gcc-test-6.0-server-auth @@ -4813,6 +4989,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-rhel8-latest-gcc-test-7.0-server-auth @@ -4834,6 +5011,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-rhel8-latest-gcc-test-8.0-server-auth @@ -4855,6 +5033,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-rhel8-latest-gcc-test-latest-server-auth @@ -4876,6 +5055,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-rhel8-power-gcc-compile @@ -4883,7 +5063,7 @@ tasks: tags: [sasl-matrix-openssl, compile, rhel8-power, gcc, sasl-cyrus] patchable: false commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-cyrus-openssl-compile vars: CC: gcc @@ -4909,6 +5089,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-rhel8-power-gcc-test-4.4-server-auth @@ -4931,6 +5112,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-rhel8-power-gcc-test-5.0-server-auth @@ -4953,6 +5135,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-rhel8-power-gcc-test-6.0-server-auth @@ -4975,6 +5158,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-rhel8-power-gcc-test-7.0-server-auth @@ -4997,6 +5181,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-rhel8-power-gcc-test-8.0-server-auth @@ -5019,6 +5204,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-rhel8-power-gcc-test-latest-server-auth @@ -5041,6 +5227,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-rhel8-zseries-gcc-compile @@ -5048,7 +5235,7 @@ tasks: tags: [sasl-matrix-openssl, compile, rhel8-zseries, gcc, sasl-cyrus] patchable: false commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-cyrus-openssl-compile vars: CC: gcc @@ -5074,6 +5261,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-rhel8-zseries-gcc-test-6.0-server-auth @@ -5096,6 +5284,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-rhel8-zseries-gcc-test-7.0-server-auth @@ -5118,6 +5307,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-rhel8-zseries-gcc-test-8.0-server-auth @@ -5140,6 +5330,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-rhel8-zseries-gcc-test-latest-server-auth @@ -5162,13 +5353,14 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-rhel80-gcc-compile run_on: rhel80-large tags: [sasl-matrix-openssl, compile, rhel80, gcc, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-cyrus-openssl-compile vars: CC: gcc @@ -5178,7 +5370,7 @@ tasks: run_on: ubuntu2004-arm64-large tags: [sasl-matrix-openssl, compile, ubuntu2004-arm64, gcc, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-cyrus-openssl-compile vars: CC: gcc @@ -5203,6 +5395,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-ubuntu2004-arm64-gcc-test-5.0-server-auth @@ -5224,6 +5417,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-ubuntu2004-arm64-gcc-test-6.0-server-auth @@ -5245,6 +5439,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-ubuntu2004-arm64-gcc-test-7.0-server-auth @@ -5266,6 +5461,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-ubuntu2004-arm64-gcc-test-8.0-server-auth @@ -5287,6 +5483,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-ubuntu2004-arm64-gcc-test-latest-server-auth @@ -5308,13 +5505,14 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-cyrus-openssl-ubuntu2004-clang-compile run_on: ubuntu2004-large tags: [sasl-matrix-openssl, compile, ubuntu2004, clang, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-cyrus-openssl-compile vars: CC: clang @@ -5324,7 +5522,7 @@ tasks: run_on: ubuntu2204-large tags: [sasl-matrix-openssl, compile, ubuntu2204, clang-12, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-cyrus-openssl-compile vars: CC: clang-12 @@ -5334,7 +5532,7 @@ tasks: run_on: ubuntu2204-large tags: [sasl-matrix-openssl, compile, ubuntu2204, gcc, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-cyrus-openssl-compile vars: CC: gcc @@ -5344,7 +5542,7 @@ tasks: run_on: ubuntu2404-large tags: [sasl-matrix-openssl, compile, ubuntu2404, clang-14, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-cyrus-openssl-compile vars: CC: clang-14 @@ -5354,7 +5552,7 @@ tasks: run_on: ubuntu2404-large tags: [sasl-matrix-openssl, compile, ubuntu2404, gcc, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-cyrus-openssl-compile vars: CC: gcc @@ -5364,7 +5562,7 @@ tasks: run_on: windows-vsCurrent-large tags: [sasl-matrix-openssl, compile, windows-vsCurrent, vs2017x64, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-cyrus-openssl-compile vars: CMAKE_GENERATOR: Visual Studio 15 2017 @@ -5389,13 +5587,14 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-off-nossl-rhel8-latest-gcc-compile run_on: rhel8-latest-large tags: [sasl-matrix-nossl, compile, rhel8-latest, gcc, sasl-off] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-off-nossl-compile vars: CC: gcc @@ -5420,6 +5619,7 @@ tasks: - { key: SSL, value: nossl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-off-nossl-rhel8-latest-gcc-test-4.2-server-noauth @@ -5441,6 +5641,7 @@ tasks: - { key: SSL, value: nossl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-off-nossl-rhel8-latest-gcc-test-4.2-sharded-noauth @@ -5462,6 +5663,7 @@ tasks: - { key: SSL, value: nossl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-off-nossl-rhel8-latest-gcc-test-4.4-replica-noauth @@ -5483,6 +5685,7 @@ tasks: - { key: SSL, value: nossl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-off-nossl-rhel8-latest-gcc-test-4.4-server-noauth @@ -5504,6 +5707,7 @@ tasks: - { key: SSL, value: nossl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-off-nossl-rhel8-latest-gcc-test-4.4-sharded-noauth @@ -5525,6 +5729,7 @@ tasks: - { key: SSL, value: nossl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-off-nossl-rhel8-latest-gcc-test-5.0-replica-noauth @@ -5546,6 +5751,7 @@ tasks: - { key: SSL, value: nossl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-off-nossl-rhel8-latest-gcc-test-5.0-server-noauth @@ -5567,6 +5773,7 @@ tasks: - { key: SSL, value: nossl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-off-nossl-rhel8-latest-gcc-test-5.0-sharded-noauth @@ -5588,6 +5795,7 @@ tasks: - { key: SSL, value: nossl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-off-nossl-rhel8-latest-gcc-test-6.0-replica-noauth @@ -5609,6 +5817,7 @@ tasks: - { key: SSL, value: nossl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-off-nossl-rhel8-latest-gcc-test-6.0-server-noauth @@ -5630,6 +5839,7 @@ tasks: - { key: SSL, value: nossl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-off-nossl-rhel8-latest-gcc-test-6.0-sharded-noauth @@ -5651,6 +5861,7 @@ tasks: - { key: SSL, value: nossl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-off-nossl-rhel8-latest-gcc-test-7.0-replica-noauth @@ -5672,6 +5883,7 @@ tasks: - { key: SSL, value: nossl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-off-nossl-rhel8-latest-gcc-test-7.0-server-noauth @@ -5693,6 +5905,7 @@ tasks: - { key: SSL, value: nossl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-off-nossl-rhel8-latest-gcc-test-7.0-sharded-noauth @@ -5714,6 +5927,7 @@ tasks: - { key: SSL, value: nossl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-off-nossl-rhel8-latest-gcc-test-8.0-replica-noauth @@ -5735,6 +5949,7 @@ tasks: - { key: SSL, value: nossl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-off-nossl-rhel8-latest-gcc-test-8.0-server-noauth @@ -5756,6 +5971,7 @@ tasks: - { key: SSL, value: nossl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-off-nossl-rhel8-latest-gcc-test-8.0-sharded-noauth @@ -5777,6 +5993,7 @@ tasks: - { key: SSL, value: nossl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-off-nossl-rhel8-latest-gcc-test-latest-replica-noauth @@ -5798,6 +6015,7 @@ tasks: - { key: SSL, value: nossl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-off-nossl-rhel8-latest-gcc-test-latest-server-noauth @@ -5819,6 +6037,7 @@ tasks: - { key: SSL, value: nossl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-off-nossl-rhel8-latest-gcc-test-latest-sharded-noauth @@ -5840,13 +6059,14 @@ tasks: - { key: SSL, value: nossl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-off-nossl-ubuntu2204-gcc-compile run_on: ubuntu2204-large tags: [sasl-matrix-nossl, compile, ubuntu2204, gcc, sasl-off] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-off-nossl-compile vars: CC: gcc @@ -5856,7 +6076,7 @@ tasks: run_on: ubuntu2404-large tags: [sasl-matrix-nossl, compile, ubuntu2404, gcc, sasl-off] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-off-nossl-compile vars: CC: gcc @@ -5866,7 +6086,7 @@ tasks: run_on: windows-vsCurrent-large tags: [sasl-matrix-nossl, compile, windows-vsCurrent, vs2017x64, sasl-off] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-off-nossl-compile vars: CMAKE_GENERATOR: Visual Studio 15 2017 @@ -5876,7 +6096,7 @@ tasks: run_on: windows-vsCurrent-large tags: [sasl-matrix-winssl, compile, windows-vsCurrent, vs2015x64, sasl-off] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-off-winssl-compile vars: CMAKE_GENERATOR: Visual Studio 14 2015 @@ -5886,7 +6106,7 @@ tasks: run_on: windows-vsCurrent-large tags: [sasl-matrix-winssl, compile, windows-vsCurrent, vs2017x64, sasl-off] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-off-winssl-compile vars: CMAKE_GENERATOR: Visual Studio 15 2017 @@ -5896,7 +6116,7 @@ tasks: run_on: windows-vsCurrent-large tags: [sasl-matrix-winssl, compile, windows-vsCurrent, vs2019x64, sasl-off] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-off-winssl-compile vars: CMAKE_GENERATOR: Visual Studio 16 2019 @@ -5906,7 +6126,7 @@ tasks: run_on: windows-vsCurrent-large tags: [sasl-matrix-winssl, compile, windows-vsCurrent, vs2022x64, sasl-off] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-off-winssl-compile vars: CMAKE_GENERATOR: Visual Studio 17 2022 @@ -5916,7 +6136,7 @@ tasks: run_on: windows-vsCurrent-large tags: [sasl-matrix-winssl, compile, windows-vsCurrent, vs2022x86, sasl-off] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-off-winssl-compile vars: CMAKE_GENERATOR: Visual Studio 17 2022 @@ -5926,7 +6146,7 @@ tasks: run_on: windows-vsCurrent-large tags: [sasl-matrix-winssl, compile, windows-vsCurrent, mingw, sasl-sspi] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-sspi-winssl-compile vars: CC: gcc @@ -5951,6 +6171,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-mingw-test-latest-sharded-auth @@ -5972,13 +6193,14 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-vs2015-x64-compile run_on: windows-vsCurrent-large tags: [sasl-matrix-winssl, compile, windows-vsCurrent, vs2015x64, sasl-sspi] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-sspi-winssl-compile vars: CMAKE_GENERATOR: Visual Studio 14 2015 @@ -5988,7 +6210,7 @@ tasks: run_on: windows-vsCurrent-large tags: [sasl-matrix-winssl, compile, windows-vsCurrent, vs2017x64, sasl-sspi] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-sspi-winssl-compile vars: CMAKE_GENERATOR: Visual Studio 15 2017 @@ -5998,7 +6220,7 @@ tasks: run_on: windows-vsCurrent-large tags: [sasl-matrix-winssl, compile, windows-vsCurrent, vs2019x64, sasl-sspi] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-sspi-winssl-compile vars: CMAKE_GENERATOR: Visual Studio 16 2019 @@ -6008,7 +6230,7 @@ tasks: run_on: windows-vsCurrent-large tags: [sasl-matrix-winssl, compile, windows-vsCurrent, vs2022x64, sasl-sspi] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-sspi-winssl-compile vars: CMAKE_GENERATOR: Visual Studio 17 2022 @@ -6033,6 +6255,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-vs2022-x64-test-4.2-server-auth @@ -6054,6 +6277,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-vs2022-x64-test-4.2-sharded-auth @@ -6075,6 +6299,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-vs2022-x64-test-4.4-replica-auth @@ -6096,6 +6321,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-vs2022-x64-test-4.4-server-auth @@ -6117,6 +6343,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-vs2022-x64-test-4.4-sharded-auth @@ -6138,6 +6365,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-vs2022-x64-test-5.0-replica-auth @@ -6159,6 +6387,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-vs2022-x64-test-5.0-server-auth @@ -6180,6 +6409,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-vs2022-x64-test-5.0-sharded-auth @@ -6201,6 +6431,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-vs2022-x64-test-6.0-replica-auth @@ -6222,6 +6453,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-vs2022-x64-test-6.0-server-auth @@ -6243,6 +6475,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-vs2022-x64-test-6.0-sharded-auth @@ -6264,6 +6497,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-vs2022-x64-test-7.0-replica-auth @@ -6285,6 +6519,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-vs2022-x64-test-7.0-server-auth @@ -6306,6 +6541,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-vs2022-x64-test-7.0-sharded-auth @@ -6327,6 +6563,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-vs2022-x64-test-8.0-replica-auth @@ -6348,6 +6585,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-vs2022-x64-test-8.0-server-auth @@ -6369,6 +6607,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-vs2022-x64-test-8.0-sharded-auth @@ -6390,6 +6629,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-vs2022-x64-test-latest-replica-auth @@ -6411,6 +6651,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-vs2022-x64-test-latest-server-auth @@ -6432,6 +6673,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-vs2022-x64-test-latest-sharded-auth @@ -6453,13 +6695,14 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-vs2022-x86-compile run_on: windows-vsCurrent-large tags: [sasl-matrix-winssl, compile, windows-vsCurrent, vs2022x86, sasl-sspi] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-sspi-winssl-compile vars: CMAKE_GENERATOR: Visual Studio 17 2022 @@ -6484,6 +6727,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sasl-sspi-winssl-windows-2019-vs2022-x86-test-latest-sharded-auth @@ -6505,6 +6749,7 @@ tasks: - { key: SSL, value: winssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: sbom @@ -6516,7 +6761,7 @@ tasks: run_on: macos-14-arm64 tags: [scan-build-matrix, macos-14-arm64, clang] commands: - - func: find-cmake-latest + - func: install-uv - func: scan-build vars: CC: clang @@ -6526,7 +6771,7 @@ tasks: run_on: ubuntu2004-arm64-large tags: [scan-build-matrix, ubuntu2004-arm64, clang] commands: - - func: find-cmake-latest + - func: install-uv - func: scan-build vars: CC: clang @@ -6536,7 +6781,7 @@ tasks: run_on: ubuntu2004-large tags: [scan-build-matrix, ubuntu2004, clang, i686] commands: - - func: find-cmake-latest + - func: install-uv - func: scan-build vars: CC: clang @@ -6547,7 +6792,7 @@ tasks: run_on: debian11-large tags: [std-matrix, debian11, gcc, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc-10 @@ -6557,7 +6802,7 @@ tasks: run_on: macos-14-arm64 tags: [std-matrix, macos-14-arm64, clang, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -6567,7 +6812,7 @@ tasks: run_on: rhel7-latest-large tags: [std-matrix, rhel7-latest, gcc, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -6577,7 +6822,7 @@ tasks: run_on: rhel80-large tags: [std-matrix, rhel80, clang, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -6587,7 +6832,7 @@ tasks: run_on: rhel80-large tags: [std-matrix, rhel80, gcc, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -6597,7 +6842,7 @@ tasks: run_on: rhel84-large tags: [std-matrix, rhel84, clang, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -6607,7 +6852,7 @@ tasks: run_on: rhel84-large tags: [std-matrix, rhel84, gcc, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -6617,7 +6862,7 @@ tasks: run_on: rhel90-large tags: [std-matrix, rhel90, clang, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -6627,7 +6872,7 @@ tasks: run_on: rhel90-large tags: [std-matrix, rhel90, gcc, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -6637,7 +6882,7 @@ tasks: run_on: rhel91-large tags: [std-matrix, rhel91, clang, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -6647,7 +6892,7 @@ tasks: run_on: rhel92-large tags: [std-matrix, rhel92, clang, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -6657,7 +6902,7 @@ tasks: run_on: rhel92-large tags: [std-matrix, rhel92, gcc, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -6667,7 +6912,7 @@ tasks: run_on: rhel93-large tags: [std-matrix, rhel93, clang, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -6677,7 +6922,7 @@ tasks: run_on: rhel94-large tags: [std-matrix, rhel94, clang, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -6687,7 +6932,7 @@ tasks: run_on: rhel94-large tags: [std-matrix, rhel94, gcc, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -6697,7 +6942,7 @@ tasks: run_on: rhel95-large tags: [std-matrix, rhel95, clang, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -6707,7 +6952,7 @@ tasks: run_on: rhel95-large tags: [std-matrix, rhel95, gcc, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -6717,7 +6962,7 @@ tasks: run_on: ubuntu2004-large tags: [std-matrix, ubuntu2004, clang, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang-10 @@ -6727,7 +6972,7 @@ tasks: run_on: ubuntu2004-large tags: [std-matrix, ubuntu2004, gcc, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc-9 @@ -6737,7 +6982,7 @@ tasks: run_on: ubuntu2204-large tags: [std-matrix, ubuntu2204, clang, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang-12 @@ -6747,7 +6992,7 @@ tasks: run_on: ubuntu2404-large tags: [std-matrix, ubuntu2404, gcc, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc-13 @@ -6757,7 +7002,7 @@ tasks: run_on: windows-vsCurrent-large tags: [std-matrix, windows-vsCurrent, vs2015x64, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CMAKE_GENERATOR: Visual Studio 14 2015 @@ -6767,7 +7012,7 @@ tasks: run_on: windows-vsCurrent-large tags: [std-matrix, windows-vsCurrent, vs2017x64, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CMAKE_GENERATOR: Visual Studio 15 2017 @@ -6777,7 +7022,7 @@ tasks: run_on: windows-vsCurrent-large tags: [std-matrix, windows-vsCurrent, vs2019x64, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CMAKE_GENERATOR: Visual Studio 16 2019 @@ -6787,7 +7032,7 @@ tasks: run_on: windows-vsCurrent-large tags: [std-matrix, windows-vsCurrent, vs2022x64, compile, std-c11] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CMAKE_GENERATOR: Visual Studio 17 2022 @@ -6797,7 +7042,7 @@ tasks: run_on: debian11-large tags: [std-matrix, debian11, gcc, compile, std-c17] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc-10 @@ -6807,7 +7052,7 @@ tasks: run_on: macos-14-arm64 tags: [std-matrix, macos-14-arm64, clang, compile, std-c17] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -6817,7 +7062,7 @@ tasks: run_on: rhel80-large tags: [std-matrix, rhel80, clang, compile, std-c17] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -6827,7 +7072,7 @@ tasks: run_on: rhel80-large tags: [std-matrix, rhel80, gcc, compile, std-c17] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -6837,7 +7082,7 @@ tasks: run_on: rhel84-large tags: [std-matrix, rhel84, clang, compile, std-c17] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -6847,7 +7092,7 @@ tasks: run_on: rhel84-large tags: [std-matrix, rhel84, gcc, compile, std-c17] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -6857,7 +7102,7 @@ tasks: run_on: rhel90-large tags: [std-matrix, rhel90, clang, compile, std-c17] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -6867,7 +7112,7 @@ tasks: run_on: rhel90-large tags: [std-matrix, rhel90, gcc, compile, std-c17] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -6877,7 +7122,7 @@ tasks: run_on: rhel91-large tags: [std-matrix, rhel91, clang, compile, std-c17] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -6887,7 +7132,7 @@ tasks: run_on: rhel92-large tags: [std-matrix, rhel92, clang, compile, std-c17] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -6897,7 +7142,7 @@ tasks: run_on: rhel92-large tags: [std-matrix, rhel92, gcc, compile, std-c17] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -6907,7 +7152,7 @@ tasks: run_on: rhel93-large tags: [std-matrix, rhel93, clang, compile, std-c17] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -6917,7 +7162,7 @@ tasks: run_on: rhel94-large tags: [std-matrix, rhel94, clang, compile, std-c17] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -6927,7 +7172,7 @@ tasks: run_on: rhel94-large tags: [std-matrix, rhel94, gcc, compile, std-c17] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -6937,7 +7182,7 @@ tasks: run_on: rhel95-large tags: [std-matrix, rhel95, clang, compile, std-c17] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -6947,7 +7192,7 @@ tasks: run_on: rhel95-large tags: [std-matrix, rhel95, gcc, compile, std-c17] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -6957,7 +7202,7 @@ tasks: run_on: ubuntu2004-large tags: [std-matrix, ubuntu2004, clang, compile, std-c17] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang-10 @@ -6967,7 +7212,7 @@ tasks: run_on: ubuntu2004-large tags: [std-matrix, ubuntu2004, gcc, compile, std-c17] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc-9 @@ -6977,7 +7222,7 @@ tasks: run_on: ubuntu2204-large tags: [std-matrix, ubuntu2204, clang, compile, std-c17] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang-12 @@ -6987,7 +7232,7 @@ tasks: run_on: ubuntu2404-large tags: [std-matrix, ubuntu2404, gcc, compile, std-c17] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc-13 @@ -6997,7 +7242,7 @@ tasks: run_on: windows-vsCurrent-large tags: [std-matrix, windows-vsCurrent, vs2019x64, compile, std-c17] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CMAKE_GENERATOR: Visual Studio 16 2019 @@ -7007,7 +7252,7 @@ tasks: run_on: windows-vsCurrent-large tags: [std-matrix, windows-vsCurrent, vs2022x64, compile, std-c17] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CMAKE_GENERATOR: Visual Studio 17 2022 @@ -7017,7 +7262,7 @@ tasks: run_on: debian11-large tags: [std-matrix, debian11, gcc, compile, std-c23] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc-10 @@ -7027,7 +7272,7 @@ tasks: run_on: macos-14-arm64 tags: [std-matrix, macos-14-arm64, clang, compile, std-c23] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -7037,7 +7282,7 @@ tasks: run_on: rhel84-large tags: [std-matrix, rhel84, clang, compile, std-c23] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -7047,7 +7292,7 @@ tasks: run_on: rhel90-large tags: [std-matrix, rhel90, clang, compile, std-c23] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -7057,7 +7302,7 @@ tasks: run_on: rhel90-large tags: [std-matrix, rhel90, gcc, compile, std-c23] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -7067,7 +7312,7 @@ tasks: run_on: rhel91-large tags: [std-matrix, rhel91, clang, compile, std-c23] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -7077,7 +7322,7 @@ tasks: run_on: rhel92-large tags: [std-matrix, rhel92, clang, compile, std-c23] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -7087,7 +7332,7 @@ tasks: run_on: rhel92-large tags: [std-matrix, rhel92, gcc, compile, std-c23] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -7097,7 +7342,7 @@ tasks: run_on: rhel93-large tags: [std-matrix, rhel93, clang, compile, std-c23] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -7107,7 +7352,7 @@ tasks: run_on: rhel94-large tags: [std-matrix, rhel94, clang, compile, std-c23] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -7117,7 +7362,7 @@ tasks: run_on: rhel94-large tags: [std-matrix, rhel94, gcc, compile, std-c23] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -7127,7 +7372,7 @@ tasks: run_on: rhel95-large tags: [std-matrix, rhel95, clang, compile, std-c23] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -7137,7 +7382,7 @@ tasks: run_on: rhel95-large tags: [std-matrix, rhel95, gcc, compile, std-c23] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -7147,7 +7392,7 @@ tasks: run_on: ubuntu2004-large tags: [std-matrix, ubuntu2004, clang, compile, std-c23] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang-10 @@ -7157,7 +7402,7 @@ tasks: run_on: ubuntu2004-large tags: [std-matrix, ubuntu2004, gcc, compile, std-c23] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc-9 @@ -7167,7 +7412,7 @@ tasks: run_on: ubuntu2204-large tags: [std-matrix, ubuntu2204, clang, compile, std-c23] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang-12 @@ -7177,7 +7422,7 @@ tasks: run_on: ubuntu2404-large tags: [std-matrix, ubuntu2404, gcc, compile, std-c23] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc-13 @@ -7187,7 +7432,7 @@ tasks: run_on: debian11-large tags: [std-matrix, debian11, gcc, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc-10 @@ -7197,7 +7442,7 @@ tasks: run_on: macos-14-arm64 tags: [std-matrix, macos-14-arm64, clang, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -7207,7 +7452,7 @@ tasks: run_on: rhel7-latest-large tags: [std-matrix, rhel7-latest, gcc, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -7217,7 +7462,7 @@ tasks: run_on: rhel80-large tags: [std-matrix, rhel80, clang, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -7227,7 +7472,7 @@ tasks: run_on: rhel80-large tags: [std-matrix, rhel80, gcc, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -7237,7 +7482,7 @@ tasks: run_on: rhel84-large tags: [std-matrix, rhel84, clang, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -7247,7 +7492,7 @@ tasks: run_on: rhel84-large tags: [std-matrix, rhel84, gcc, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -7257,7 +7502,7 @@ tasks: run_on: rhel90-large tags: [std-matrix, rhel90, clang, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -7267,7 +7512,7 @@ tasks: run_on: rhel90-large tags: [std-matrix, rhel90, gcc, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -7277,7 +7522,7 @@ tasks: run_on: rhel91-large tags: [std-matrix, rhel91, clang, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -7287,7 +7532,7 @@ tasks: run_on: rhel92-large tags: [std-matrix, rhel92, clang, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -7297,7 +7542,7 @@ tasks: run_on: rhel92-large tags: [std-matrix, rhel92, gcc, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -7307,7 +7552,7 @@ tasks: run_on: rhel93-large tags: [std-matrix, rhel93, clang, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -7317,7 +7562,7 @@ tasks: run_on: rhel94-large tags: [std-matrix, rhel94, clang, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -7327,7 +7572,7 @@ tasks: run_on: rhel94-large tags: [std-matrix, rhel94, gcc, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -7337,7 +7582,7 @@ tasks: run_on: rhel95-large tags: [std-matrix, rhel95, clang, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang @@ -7347,7 +7592,7 @@ tasks: run_on: rhel95-large tags: [std-matrix, rhel95, gcc, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc @@ -7357,7 +7602,7 @@ tasks: run_on: ubuntu2004-large tags: [std-matrix, ubuntu2004, clang, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang-10 @@ -7367,7 +7612,7 @@ tasks: run_on: ubuntu2004-large tags: [std-matrix, ubuntu2004, gcc, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc-9 @@ -7377,7 +7622,7 @@ tasks: run_on: ubuntu2204-large tags: [std-matrix, ubuntu2204, clang, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: clang-12 @@ -7387,7 +7632,7 @@ tasks: run_on: ubuntu2404-large tags: [std-matrix, ubuntu2404, gcc, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CC: gcc-13 @@ -7397,7 +7642,7 @@ tasks: run_on: windows-vsCurrent-large tags: [std-matrix, windows-vsCurrent, vs2015x64, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CMAKE_GENERATOR: Visual Studio 14 2015 @@ -7407,7 +7652,7 @@ tasks: run_on: windows-vsCurrent-large tags: [std-matrix, windows-vsCurrent, vs2017x64, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CMAKE_GENERATOR: Visual Studio 15 2017 @@ -7417,7 +7662,7 @@ tasks: run_on: windows-vsCurrent-large tags: [std-matrix, windows-vsCurrent, vs2019x64, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CMAKE_GENERATOR: Visual Studio 16 2019 @@ -7427,7 +7672,7 @@ tasks: run_on: windows-vsCurrent-large tags: [std-matrix, windows-vsCurrent, vs2022x64, compile, std-c99] commands: - - func: find-cmake-latest + - func: install-uv - func: std-compile vars: CMAKE_GENERATOR: Visual Studio 17 2022 @@ -7437,7 +7682,7 @@ tasks: run_on: rhel8-latest-large tags: [sanitizers-matrix-tsan, compile, rhel8-latest, clang, tsan, sasl-cyrus] commands: - - func: find-cmake-latest + - func: install-uv - func: sasl-cyrus-openssl-compile vars: CC: clang @@ -7462,6 +7707,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: tsan-sasl-cyrus-openssl-rhel8-latest-clang-test-4.2-server-auth @@ -7483,6 +7729,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: tsan-sasl-cyrus-openssl-rhel8-latest-clang-test-4.2-sharded-auth @@ -7504,6 +7751,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: tsan-sasl-cyrus-openssl-rhel8-latest-clang-test-4.4-replica-auth @@ -7525,6 +7773,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: tsan-sasl-cyrus-openssl-rhel8-latest-clang-test-4.4-server-auth @@ -7546,6 +7795,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: tsan-sasl-cyrus-openssl-rhel8-latest-clang-test-4.4-sharded-auth @@ -7567,6 +7817,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: tsan-sasl-cyrus-openssl-rhel8-latest-clang-test-5.0-replica-auth @@ -7588,6 +7839,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: tsan-sasl-cyrus-openssl-rhel8-latest-clang-test-5.0-server-auth @@ -7609,6 +7861,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: tsan-sasl-cyrus-openssl-rhel8-latest-clang-test-5.0-sharded-auth @@ -7630,6 +7883,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: tsan-sasl-cyrus-openssl-rhel8-latest-clang-test-6.0-replica-auth @@ -7651,6 +7905,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: tsan-sasl-cyrus-openssl-rhel8-latest-clang-test-6.0-server-auth @@ -7672,6 +7927,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: tsan-sasl-cyrus-openssl-rhel8-latest-clang-test-6.0-sharded-auth @@ -7693,6 +7949,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: tsan-sasl-cyrus-openssl-rhel8-latest-clang-test-7.0-replica-auth @@ -7714,6 +7971,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: tsan-sasl-cyrus-openssl-rhel8-latest-clang-test-7.0-server-auth @@ -7735,6 +7993,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: tsan-sasl-cyrus-openssl-rhel8-latest-clang-test-7.0-sharded-auth @@ -7756,6 +8015,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: tsan-sasl-cyrus-openssl-rhel8-latest-clang-test-8.0-replica-auth @@ -7777,6 +8037,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: tsan-sasl-cyrus-openssl-rhel8-latest-clang-test-8.0-server-auth @@ -7798,6 +8059,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: tsan-sasl-cyrus-openssl-rhel8-latest-clang-test-8.0-sharded-auth @@ -7819,6 +8081,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: tsan-sasl-cyrus-openssl-rhel8-latest-clang-test-latest-replica-auth @@ -7840,6 +8103,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: tsan-sasl-cyrus-openssl-rhel8-latest-clang-test-latest-server-auth @@ -7861,6 +8125,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: tsan-sasl-cyrus-openssl-rhel8-latest-clang-test-latest-sharded-auth @@ -7882,6 +8147,7 @@ tasks: - { key: SSL, value: openssl } - func: fetch-det - func: bootstrap-mongo-orchestration + - func: install-uv - func: run-simple-http-server - func: run-tests - name: verify-headers diff --git a/.evergreen/legacy_config_generator/evergreen_config_lib/functions.py b/.evergreen/legacy_config_generator/evergreen_config_lib/functions.py index d6d799c2e4d..6de7c75a93e 100644 --- a/.evergreen/legacy_config_generator/evergreen_config_lib/functions.py +++ b/.evergreen/legacy_config_generator/evergreen_config_lib/functions.py @@ -69,21 +69,23 @@ export BUILD_SAMPLE_WITH_CMAKE=${BUILD_SAMPLE_WITH_CMAKE} export ENABLE_SSL=${ENABLE_SSL} export ENABLE_SNAPPY=${ENABLE_SNAPPY} + PATH="${UV_INSTALL_DIR}:$PATH" LINK_STATIC= .evergreen/scripts/link-sample-program.sh LINK_STATIC=1 .evergreen/scripts/link-sample-program.sh ''', - include_expansions_in_env=['distro_id']), + include_expansions_in_env=['distro_id', 'UV_INSTALL_DIR']), )), ('link sample program bson', Function( shell_mongoc(r''' # Compile a program that links dynamically or statically to libbson, # using variables from pkg-config or from CMake's find_package command. + PATH="${UV_INSTALL_DIR}:$PATH" BUILD_SAMPLE_WITH_CMAKE= LINK_STATIC= .evergreen/scripts/link-sample-program-bson.sh BUILD_SAMPLE_WITH_CMAKE= LINK_STATIC=1 .evergreen/scripts/link-sample-program-bson.sh BUILD_SAMPLE_WITH_CMAKE=1 LINK_STATIC= .evergreen/scripts/link-sample-program-bson.sh BUILD_SAMPLE_WITH_CMAKE=1 LINK_STATIC=1 .evergreen/scripts/link-sample-program-bson.sh ''', - include_expansions_in_env=['distro_id']), + include_expansions_in_env=['distro_id', 'UV_INSTALL_DIR']), )), ('link sample program MSVC', Function( shell_mongoc(r''' @@ -92,24 +94,18 @@ # find_package command. export ENABLE_SSL=${ENABLE_SSL} export ENABLE_SNAPPY=${ENABLE_SNAPPY} - . .evergreen/scripts/use-tools.sh paths - . .evergreen/scripts/find-cmake-latest.sh - export CMAKE="$(native-path "$(find_cmake_latest)")" + PATH="${UV_INSTALL_DIR}:$PATH" LINK_STATIC= cmd.exe /c .\\.evergreen\\scripts\\link-sample-program-msvc.cmd LINK_STATIC=1 cmd.exe /c .\\.evergreen\\scripts\\link-sample-program-msvc.cmd - ''', - include_expansions_in_env=['distro_id']), + ''') )), ('link sample program mingw', Function( shell_mongoc(r''' # Build libmongoc with CMake and compile a program that links # dynamically to it, using variables from pkg-config.exe. - . .evergreen/scripts/use-tools.sh paths - . .evergreen/scripts/find-cmake-latest.sh - export CMAKE="$(native-path "$(find_cmake_latest)")" + PATH="${UV_INSTALL_DIR}:$PATH" cmd.exe /c .\\.evergreen\\scripts\\link-sample-program-mingw.cmd - ''', - include_expansions_in_env=['distro_id']), + ''') )), ('link sample program MSVC bson', Function( shell_mongoc(r''' @@ -118,23 +114,18 @@ # find_package command. export ENABLE_SSL=${ENABLE_SSL} export ENABLE_SNAPPY=${ENABLE_SNAPPY} - . .evergreen/scripts/use-tools.sh paths - . .evergreen/scripts/find-cmake-latest.sh - export CMAKE="$(native-path "$(find_cmake_latest)")" + PATH="${UV_INSTALL_DIR}:$PATH" LINK_STATIC= cmd.exe /c .\\.evergreen\\scripts\\link-sample-program-msvc-bson.cmd LINK_STATIC=1 cmd.exe /c .\\.evergreen\\scripts\\link-sample-program-msvc-bson.cmd - ''', - include_expansions_in_env=['distro_id']), + ''') )), ('link sample program mingw bson', Function( shell_mongoc(r''' # Build libmongoc with CMake and compile a program that links # dynamically to it, using variables from pkg-config.exe. - . .evergreen/scripts/use-tools.sh paths - . .evergreen/scripts/find-cmake-latest.sh - export CMAKE="$(native-path "$(find_cmake_latest)")" + PATH="${UV_INSTALL_DIR}:$PATH" cmd.exe /c .\\.evergreen\\scripts\\link-sample-program-mingw-bson.cmd - '''), + ''') )), ('update codecov.io', Function( shell_mongoc(r''' diff --git a/.evergreen/legacy_config_generator/evergreen_config_lib/tasks.py b/.evergreen/legacy_config_generator/evergreen_config_lib/tasks.py index 311c57d49b9..fe4bd8e32d2 100644 --- a/.evergreen/legacy_config_generator/evergreen_config_lib/tasks.py +++ b/.evergreen/legacy_config_generator/evergreen_config_lib/tasks.py @@ -16,6 +16,8 @@ from itertools import chain from typing import ClassVar, Iterable, Literal, Mapping, MutableMapping, MutableSequence, Optional, Sequence +from config_generator.components.funcs.install_uv import InstallUV + from evergreen_config_generator import Value, Scalar from evergreen_config_generator.functions import func, s3_put from evergreen_config_generator.tasks import ( @@ -122,7 +124,7 @@ def to_dict(self): script += " .evergreen/scripts/compile.sh" - commands.append(func('find-cmake-latest')) + commands.append(func(InstallUV.name)) commands.append(shell_mongoc(script, add_expansions_to_env=True)) commands.append(func("upload-build")) commands.extend(self.suffix_commands) @@ -169,6 +171,8 @@ def __init__( else: bootstrap_commands = [] + bootstrap_commands += [func(InstallUV.name)] + super().__init__( task_name=task_name, commands=bootstrap_commands + list(suffix_commands), @@ -273,7 +277,13 @@ def __init__( CompileTask("debug-compile-with-warnings", CFLAGS="-Werror -Wno-cast-align"), NamedTask( "install-libmongoc-after-libbson", - commands=[shell_mongoc(".evergreen/scripts/install-libmongoc-after-libbson.sh"),], + commands=[ + func(InstallUV.name), + shell_mongoc( + ".evergreen/scripts/install-libmongoc-after-libbson.sh", + include_expansions_in_env=['distro_id', 'UV_INSTALL_DIR'], + ), + ], ), ] @@ -310,6 +320,7 @@ def cse(self) -> bool: return bool(self.settings.cse) def post_commands(self) -> Iterable[Value]: + yield func(InstallUV.name) if self.cse: yield func( "compile coverage", @@ -451,6 +462,7 @@ def post_commands(self) -> Iterable[Value]: yield func("fetch-build", BUILD_NAME=self.build_task_name) yield func("fetch-det") yield func("bootstrap-mongo-orchestration", AUTH="noauth", SSL="nossl") + yield func(InstallUV.name) yield func("run-simple-http-server") yield func("run-tests", AUTH="noauth", SSL="nossl", COMPRESSORS=",".join(self._compressor_list())) @@ -498,6 +510,7 @@ def pre_commands(self) -> Iterable[Value]: yield func("fetch-build", BUILD_NAME=self._main_dep) yield func("fetch-det") yield func("bootstrap-mongo-orchestration", MONGODB_VERSION=self._version, TOPOLOGY=self._topo) + yield func(InstallUV.name) yield func("run-simple-http-server") yield func("run-tests", URI=self._uri) @@ -566,7 +579,7 @@ def pre_commands(self) -> Iterable[Value]: "authentication-tests-asan-memcheck", tags=["authentication-tests", "asan"], commands=[ - func("find-cmake-latest"), + func(InstallUV.name), shell_mongoc( """ env SANITIZE=address SASL=AUTO SSL=OPENSSL .evergreen/scripts/compile.sh @@ -598,6 +611,7 @@ def pre_commands(self) -> Iterable[Value]: MONGODB_VERSION=server_version, REQUIRE_API_VERSION="true", ), + func(InstallUV.name), func("run-simple-http-server"), func("run-tests", MONGODB_API_VERSION=1, AUTH="auth", SSL="ssl"), ], @@ -616,6 +630,7 @@ def pre_commands(self) -> Iterable[Value]: MONGODB_VERSION=server_version, ORCHESTRATION_FILE="versioned-api-testing.json", ), + func(InstallUV.name), func("run-simple-http-server"), func("run-tests", MONGODB_API_VERSION=1, AUTH="noauth", SSL="nossl"), ], @@ -646,6 +661,7 @@ def post_commands(self) -> Iterable[Value]: func("fetch-build", BUILD_NAME="debug-compile-nosasl-nossl"), func("fetch-det"), func("bootstrap-mongo-orchestration"), + func(InstallUV.name), func("run-simple-http-server"), func( "run-tests", @@ -683,24 +699,23 @@ def do_is_valid_combination(self) -> bool: aws_compile_task = NamedTask( "debug-compile-aws", commands=[ - func('find-cmake-latest'), + func(InstallUV.name), shell_mongoc( """ set -o errexit set -o pipefail - . .evergreen/scripts/find-cmake-latest.sh - cmake_binary="$(find_cmake_latest)" + PATH="${UV_INSTALL_DIR}:$PATH" # Use ccache if able. . .evergreen/scripts/find-ccache.sh find_ccache_and_export_vars "$(pwd)" || true # Compile test-awsauth. Disable unnecessary dependencies since test-awsauth is copied to a remote Ubuntu 20.04 ECS cluster for testing, which may not have all dependent libraries. - "$cmake_binary" -DENABLE_TRACING=ON -DENABLE_SASL=OFF -DENABLE_SNAPPY=OFF -DENABLE_ZSTD=OFF -DENABLE_CLIENT_SIDE_ENCRYPTION=OFF -S . -B cmake-build - "$cmake_binary" --build cmake-build --target test-awsauth + uvx cmake -DENABLE_TRACING=ON -DENABLE_SASL=OFF -DENABLE_SNAPPY=OFF -DENABLE_ZSTD=OFF -DENABLE_CLIENT_SIDE_ENCRYPTION=OFF -S . -B cmake-build + uvx cmake --build cmake-build --target test-awsauth """, - include_expansions_in_env=['distro_id', 'CC'], + include_expansions_in_env=['CC'], redirect_standard_error_to_output=True, ), func("upload-build"), diff --git a/.evergreen/legacy_config_generator/evergreen_config_lib/testazurekms.py b/.evergreen/legacy_config_generator/evergreen_config_lib/testazurekms.py index 5160fa73e4a..c3e9621c731 100644 --- a/.evergreen/legacy_config_generator/evergreen_config_lib/testazurekms.py +++ b/.evergreen/legacy_config_generator/evergreen_config_lib/testazurekms.py @@ -18,6 +18,8 @@ from collections import OrderedDict as OD from typing import MutableSequence +from config_generator.components.funcs.install_uv import InstallUV + from evergreen_config_generator.functions import shell_exec, func from evergreen_config_generator.tasks import NamedTask from evergreen_config_generator.variants import Variant @@ -29,7 +31,7 @@ def _create_tasks(): passtask = NamedTask(task_name="testazurekms-task") passtask.commands = [ func("fetch-source"), - func("find-cmake-latest"), + func(InstallUV.name), shell_exec( r""" echo "Building test-azurekms ... begin" @@ -74,7 +76,7 @@ def _create_tasks(): failtask = NamedTask(task_name="testazurekms-fail-task") failtask.commands = [ func("fetch-source"), - func("find-cmake-latest"), + func(InstallUV.name), shell_exec( r""" pushd mongoc diff --git a/.evergreen/legacy_config_generator/evergreen_config_lib/testgcpkms.py b/.evergreen/legacy_config_generator/evergreen_config_lib/testgcpkms.py index ccdf6720021..d2eae19ed02 100644 --- a/.evergreen/legacy_config_generator/evergreen_config_lib/testgcpkms.py +++ b/.evergreen/legacy_config_generator/evergreen_config_lib/testgcpkms.py @@ -17,7 +17,7 @@ from collections import OrderedDict as OD from typing import MutableSequence -from config_generator.components.funcs.find_cmake_latest import FindCMakeLatest +from config_generator.components.funcs.install_uv import InstallUV from evergreen_config_generator.functions import shell_exec, func from evergreen_config_generator.tasks import NamedTask @@ -30,7 +30,7 @@ def _create_tasks(): task_name="testgcpkms-task", commands=[ func("fetch-source"), - func("find-cmake-latest"), + func(InstallUV.name), shell_exec( r""" echo "Building test-gcpkms ... begin" @@ -72,7 +72,7 @@ def _create_tasks(): failtask = NamedTask( task_name="testgcpkms-fail-task", commands=[ - func("find-cmake-latest"), + func(InstallUV.name), shell_exec( r""" pushd mongoc diff --git a/.evergreen/scripts/build-docs.sh b/.evergreen/scripts/build-docs.sh index 850825286fb..b6f4e579f66 100755 --- a/.evergreen/scripts/build-docs.sh +++ b/.evergreen/scripts/build-docs.sh @@ -3,18 +3,17 @@ set -o errexit # Exit the script with error if any of the commands fail . "$(dirname "${BASH_SOURCE[0]}")/use-tools.sh" paths -. "$(dirname "${BASH_SOURCE[0]}")/find-cmake-latest.sh" -CMAKE=$(find_cmake_latest) +. "$MONGOC_DIR/.evergreen/scripts/install-build-tools.sh" # Check that a CLion user didn't accidentally convert NEWS from UTF-8 to ASCII grep "á" NEWS > /dev/null || (echo "NEWS file appears to have lost its UTF-8 encoding?" || exit 1) build_dir=$MONGOC_DIR/_build/for-docs -"$CMAKE" --fresh -S "$MONGOC_DIR" -B "$build_dir" \ +uvx cmake --fresh -G "Ninja" -S "$MONGOC_DIR" -B "$build_dir" \ -D ENABLE_MAN_PAGES=ON \ -D ENABLE_HTML_DOCS=ON \ -D ENABLE_ZLIB=BUNDLED -"$CMAKE" --build "$build_dir" \ +uvx cmake --build "$build_dir" \ --parallel 8 \ --target bson-doc \ --target mongoc-doc diff --git a/.evergreen/scripts/compile-openssl-static.sh b/.evergreen/scripts/compile-openssl-static.sh index e74eda13244..f68480849e9 100755 --- a/.evergreen/scripts/compile-openssl-static.sh +++ b/.evergreen/scripts/compile-openssl-static.sh @@ -8,7 +8,7 @@ set -o pipefail . "$(dirname "${BASH_SOURCE[0]}")/use-tools.sh" paths check_var_opt CC -check_var_opt CMAKE_GENERATOR +check_var_opt CMAKE_GENERATOR "Ninja" check_var_opt CMAKE_GENERATOR_PLATFORM check_var_opt MARCH @@ -26,6 +26,12 @@ if [[ -n "${EXTRA_CMAKE_PREFIX_PATH:-}" ]]; then cmake_prefix_path+=";${EXTRA_CMAKE_PREFIX_PATH}" fi +. "${script_dir:?}/install-build-tools.sh" +install_build_tools + +cmake --version | head -n 1 +echo "ninja version: $(ninja --version)" + declare -a configure_flags configure_flags_append() { @@ -82,28 +88,15 @@ if [[ "${OSTYPE}" == darwin* && "${HOSTTYPE}" == "arm64" ]]; then configure_flags_append "-DCMAKE_OSX_ARCHITECTURES=arm64" fi -# Ensure find-cmake-latest.sh is sourced *before* add-build-dirs-to-paths.sh -# to avoid interfering with potential CMake build configuration. -# shellcheck source=.evergreen/scripts/find-cmake-latest.sh -. "${script_dir}/find-cmake-latest.sh" # ${CMAKE} -CMAKE=$(find_cmake_latest) - # shellcheck source=.evergreen/scripts/add-build-dirs-to-paths.sh . "${script_dir}/add-build-dirs-to-paths.sh" export PKG_CONFIG_PATH PKG_CONFIG_PATH="${install_dir}/lib/pkgconfig:${PKG_CONFIG_PATH:-}" -if [[ "${OSTYPE}" == darwin* ]]; then - # MacOS does not have nproc. - nproc() { - sysctl -n hw.logicalcpu - } -fi - # Use ccache if able. . "${script_dir:?}/find-ccache.sh" find_ccache_and_export_vars "$(pwd)" || true -"${CMAKE}" "${configure_flags[@]}" . -"${CMAKE}" --build . -- -j "$(nproc)" +cmake "${configure_flags[@]}" . +cmake --build . diff --git a/.evergreen/scripts/compile-scan-build.sh b/.evergreen/scripts/compile-scan-build.sh index 789e571df8f..7991db20a71 100755 --- a/.evergreen/scripts/compile-scan-build.sh +++ b/.evergreen/scripts/compile-scan-build.sh @@ -16,6 +16,10 @@ mongoc_dir="$(to_absolute "${script_dir}/../..")" declare install_dir="${mongoc_dir}/install-dir" declare cmake_prefix_path="${install_dir}" +. "${script_dir:?}/install-build-tools.sh" +install_build_tools +export CMAKE_GENERATOR="Ninja" + declare -a configure_flags configure_flags_append() { @@ -86,14 +90,6 @@ if [[ "${OSTYPE}" == darwin* && "${HOSTTYPE}" == "arm64" ]]; then configure_flags_append "-DCMAKE_OSX_ARCHITECTURES=arm64" fi -# Ensure find-cmake-latest.sh is sourced *before* add-build-dirs-to-paths.sh -# to avoid interfering with potential CMake build configuration. -# shellcheck source=.evergreen/scripts/find-cmake-latest.sh -. "${script_dir}/find-cmake-latest.sh" -cmake_binary="$(find_cmake_latest)" - -"${cmake_binary:?}" --version - # shellcheck source=.evergreen/scripts/add-build-dirs-to-paths.sh . "${script_dir}/add-build-dirs-to-paths.sh" @@ -102,7 +98,7 @@ PKG_CONFIG_PATH="${install_dir}/lib/pkgconfig:${PKG_CONFIG_PATH:-}" echo "Installing libmongocrypt..." # shellcheck source=.evergreen/scripts/compile-libmongocrypt.sh -"${script_dir}/compile-libmongocrypt.sh" "${cmake_binary}" "${mongoc_dir}" "${install_dir}" &>output.txt || { +"${script_dir}/compile-libmongocrypt.sh" "$(command -v cmake)" "${mongoc_dir}" "${install_dir}" &>output.txt || { cat output.txt 1>&2 exit 1 } @@ -159,7 +155,7 @@ fi . "${script_dir:?}/find-ccache.sh" find_ccache_and_export_vars "$(pwd)" || true -"${scan_build_binary}" --use-cc="${CC}" --use-c++="${CXX}" "${cmake_binary}" "${configure_flags[@]}" . +"${scan_build_binary}" --use-cc="${CC}" --use-c++="${CXX}" cmake "${configure_flags[@]}" . if [[ "${OSTYPE}" == darwin* ]]; then # MacOS does not have nproc. @@ -170,5 +166,5 @@ fi declare -r continue_command='{"status":"failed", "type":"test", "should_continue":true, "desc":"scan-build emitted one or more warnings or errors"}' # Put clang static analyzer results in scan/ and fail build if warnings found. -"${scan_build_binary}" --use-cc="${CC}" --use-c++="${CXX}" -o scan --status-bugs "${cmake_binary}" --build . -- -j "$(nproc)" || +"${scan_build_binary}" --use-cc="${CC}" --use-c++="${CXX}" -o scan --status-bugs cmake --build . -- -j "$(nproc)" || curl -sS -d "${continue_command}" -H "Content-Type: application/json" -X POST localhost:2285/task_status diff --git a/.evergreen/scripts/compile-std.sh b/.evergreen/scripts/compile-std.sh index b3fa436f1e8..2a55fb69d1d 100755 --- a/.evergreen/scripts/compile-std.sh +++ b/.evergreen/scripts/compile-std.sh @@ -7,8 +7,10 @@ set -o pipefail . "$(dirname "${BASH_SOURCE[0]}")/env-var-utils.sh" . "$(dirname "${BASH_SOURCE[0]}")/use-tools.sh" paths +check_var_req UV_INSTALL_DIR + check_var_opt CC -check_var_opt CMAKE_GENERATOR +check_var_opt CMAKE_GENERATOR "Ninja" check_var_opt CMAKE_GENERATOR_PLATFORM check_var_req C_STD_VERSION @@ -24,6 +26,9 @@ mongoc_dir="$(to_absolute "${script_dir}/../..")" declare libmongocrypt_install_dir="${mongoc_dir}/libmongocrypt-install-dir" +. "${script_dir:?}/install-build-tools.sh" +install_build_tools + declare -a configure_flags configure_flags_append() { @@ -83,13 +88,6 @@ export CXXFLAGS CFLAGS+=" ${flags+${flags[*]}}" CXXFLAGS+=" ${flags+${flags[*]}}" -# Ensure find-cmake-latest.sh is sourced *before* add-build-dirs-to-paths.sh -# to avoid interfering with potential CMake build configuration. -# shellcheck source=.evergreen/scripts/find-cmake-latest.sh -. "${script_dir}/find-cmake-latest.sh" -declare cmake_binary -cmake_binary="$(find_cmake_latest)" - declare mongoc_build_dir mongoc_install_dir mongoc_build_dir="cmake-build" mongoc_install_dir="cmake-install" @@ -158,13 +156,13 @@ else() endif() endif() DOC -"${cmake_binary:?}" -S . -B build +cmake -S . -B build popd # "$(tmpfile -d)" echo "Checking requested C standard is supported... done." echo "Installing libmongocrypt..." # shellcheck source=.evergreen/scripts/compile-libmongocrypt.sh -"${script_dir}/compile-libmongocrypt.sh" "${cmake_binary}" "${mongoc_dir}" "${libmongocrypt_install_dir:?}" &>output.txt || { +"${script_dir}/compile-libmongocrypt.sh" "$(command -v cmake)" "${mongoc_dir}" "${libmongocrypt_install_dir:?}" &>output.txt || { cat output.txt 1>&2 exit 1 } @@ -190,13 +188,13 @@ fi # Ensure we're starting with a clean slate. rm -rf "${mongoc_build_dir:?}" "${mongoc_install_dir:?}" -"${cmake_binary}" -S . -B "${mongoc_build_dir:?}" "${configure_flags[@]}" -"${cmake_binary}" --build "${mongoc_build_dir:?}" --config Debug \ +cmake -S . -B "${mongoc_build_dir:?}" "${configure_flags[@]}" +cmake --build "${mongoc_build_dir:?}" --config Debug \ --target mongo_c_driver_tests \ --target mongo_c_driver_examples \ --target public-header-warnings \ --target "${all_target:?}" -"${cmake_binary}" --install "${mongoc_build_dir:?}" --config Debug +cmake --install "${mongoc_build_dir:?}" --config Debug # "lib" vs. "lib64" if [[ -d "${mongoc_install_dir:?}/lib64" ]]; then @@ -210,7 +208,7 @@ touch "${mongoc_install_dir:?}/${lib_dir:?}/canary.txt" # Linux/MacOS: uninstall.sh # Windows: uninstall.cmd -"${cmake_binary}" --build "${mongoc_build_dir:?}" --target uninstall +cmake --build "${mongoc_build_dir:?}" --target uninstall # No files should remain except canary.txt. # No directories except top-level directories should remain. diff --git a/.evergreen/scripts/compile-test-azurekms.sh b/.evergreen/scripts/compile-test-azurekms.sh index 1ac0986e67a..b1da4a9a49c 100755 --- a/.evergreen/scripts/compile-test-azurekms.sh +++ b/.evergreen/scripts/compile-test-azurekms.sh @@ -6,11 +6,13 @@ set -o nounset # Working directory is expected to be mongo-c-driver repo. ROOT=$(pwd) INSTALL_DIR=$ROOT/install -. .evergreen/scripts/find-cmake-latest.sh -declare cmake_binary -cmake_binary="$(find_cmake_latest)" + +. .evergreen/scripts/install-build-tools.sh +install_build_tools +export CMAKE_GENERATOR="Ninja" + echo "Installing libmongocrypt ... begin" -.evergreen/scripts/compile-libmongocrypt.sh "${cmake_binary}" "$ROOT" "$INSTALL_DIR" &>output.txt || { +.evergreen/scripts/compile-libmongocrypt.sh "$(command -v cmake)" "$ROOT" "$INSTALL_DIR" &>output.txt || { cat output.txt 1>&2 exit 1 } @@ -22,7 +24,7 @@ find_ccache_and_export_vars "$(pwd)" || true echo "Compile test-azurekms ... begin" # Disable unnecessary dependencies. test-azurekms is copied to a remote host for testing, which may not have all dependent libraries. -"${cmake_binary}" \ +cmake \ -DENABLE_SASL=OFF \ -DENABLE_SNAPPY=OFF \ -DENABLE_ZSTD=OFF \ @@ -31,5 +33,5 @@ echo "Compile test-azurekms ... begin" -DENABLE_CLIENT_SIDE_ENCRYPTION=ON \ -DCMAKE_PREFIX_PATH="$INSTALL_DIR" \ . -"${cmake_binary}" --build . --target test-azurekms +cmake --build . --target test-azurekms echo "Compile test-azurekms ... end" diff --git a/.evergreen/scripts/compile-test-gcpkms.sh b/.evergreen/scripts/compile-test-gcpkms.sh index 79647291dcc..d430846365d 100755 --- a/.evergreen/scripts/compile-test-gcpkms.sh +++ b/.evergreen/scripts/compile-test-gcpkms.sh @@ -6,11 +6,13 @@ set -o nounset # Working directory is expected to be mongo-c-driver repo. ROOT=$(pwd) INSTALL_DIR=$ROOT/install -. .evergreen/scripts/find-cmake-latest.sh -declare cmake_binary -cmake_binary="$(find_cmake_latest)" + +. .evergreen/scripts/install-build-tools.sh +install_build_tools +export CMAKE_GENERATOR="Ninja" + echo "Installing libmongocrypt ... begin" -.evergreen/scripts/compile-libmongocrypt.sh "${cmake_binary}" "$ROOT" "$INSTALL_DIR" &>output.txt || { +.evergreen/scripts/compile-libmongocrypt.sh "$(command -v cmake)" "$ROOT" "$INSTALL_DIR" &>output.txt || { cat output.txt 1>&2 exit 1 } @@ -22,7 +24,7 @@ find_ccache_and_export_vars "$(pwd)" || true echo "Compile test-gcpkms ... begin" # Disable unnecessary dependencies. test-gcpkms is copied to a remote host for testing, which may not have all dependent libraries. -"${cmake_binary}" \ +cmake \ -DENABLE_SASL=OFF \ -DENABLE_SNAPPY=OFF \ -DENABLE_ZSTD=OFF \ @@ -31,5 +33,5 @@ echo "Compile test-gcpkms ... begin" -DENABLE_CLIENT_SIDE_ENCRYPTION=ON \ -DCMAKE_PREFIX_PATH="$INSTALL_DIR" \ . -"${cmake_binary}" --build . --target test-gcpkms +cmake --build . --target test-gcpkms echo "Compile test-gcpkms ... end" diff --git a/.evergreen/scripts/compile-unix.sh b/.evergreen/scripts/compile-unix.sh index f21ee86a097..4be89742ae9 100755 --- a/.evergreen/scripts/compile-unix.sh +++ b/.evergreen/scripts/compile-unix.sh @@ -7,9 +7,11 @@ set -o pipefail . "$(dirname "${BASH_SOURCE[0]}")/env-var-utils.sh" . "$(dirname "${BASH_SOURCE[0]}")/use-tools.sh" paths +check_var_req UV_INSTALL_DIR + check_var_opt C_STD_VERSION # CMake default: 99. check_var_opt CC -check_var_opt CMAKE_GENERATOR +check_var_opt CMAKE_GENERATOR "Ninja" check_var_opt CMAKE_GENERATOR_PLATFORM check_var_opt CFLAGS check_var_opt CHECK_LOG "OFF" @@ -44,6 +46,9 @@ if [[ -n "${EXTRA_CMAKE_PREFIX_PATH:-}" ]]; then cmake_prefix_path+=";${EXTRA_CMAKE_PREFIX_PATH}" fi +. "${script_dir:?}/install-build-tools.sh" +install_build_tools + declare -a configure_flags configure_flags_append() { @@ -128,12 +133,6 @@ if [[ "${OSTYPE}" == darwin* && "${HOSTTYPE}" == "arm64" ]]; then configure_flags_append "-DCMAKE_OSX_ARCHITECTURES=arm64" fi -# shellcheck source=.evergreen/scripts/find-cmake-version.sh -. "${script_dir}/find-cmake-latest.sh" -declare cmake_binary -cmake_binary="$(find_cmake_latest)" -"${cmake_binary:?}" --version - # shellcheck source=.evergreen/scripts/add-build-dirs-to-paths.sh . "${script_dir}/add-build-dirs-to-paths.sh" @@ -155,7 +154,7 @@ IFS=' ' read -ra extra_configure_flags <<<"${EXTRA_CONFIGURE_FLAGS:-}" if [[ "${COMPILE_LIBMONGOCRYPT}" == "ON" ]]; then echo "Installing libmongocrypt..." # shellcheck source=.evergreen/scripts/compile-libmongocrypt.sh - "${script_dir}/compile-libmongocrypt.sh" "${cmake_binary}" "${mongoc_dir}" "${install_dir}" &>output.txt || { + "${script_dir}/compile-libmongocrypt.sh" "$(command -v cmake)" "${mongoc_dir}" "${install_dir}" &>output.txt || { cat output.txt 1>&2 exit 1 } @@ -176,17 +175,17 @@ find_ccache_and_export_vars "$(pwd)" || true declare build_dir build_dir="cmake-build" -"${cmake_binary}" -S . -B "${build_dir:?}" "${configure_flags[@]}" ${extra_configure_flags[@]+"${extra_configure_flags[@]}"} . -"${cmake_binary}" --build "${build_dir:?}" -"${cmake_binary}" --install "${build_dir:?}" +cmake -S . -B "${build_dir:?}" "${configure_flags[@]}" ${extra_configure_flags[@]+"${extra_configure_flags[@]}"} . +cmake --build "${build_dir:?}" +cmake --install "${build_dir:?}" # For use by test tasks, which directly use the binary directory contents. -"${cmake_binary}" --build "${build_dir:?}" --target mongo_c_driver_tests +cmake --build "${build_dir:?}" --target mongo_c_driver_tests # Also validate examples. -"${cmake_binary}" --build "${build_dir:?}" --target mongo_c_driver_examples +cmake --build "${build_dir:?}" --target mongo_c_driver_examples if [[ "$EXTRA_CONFIGURE_FLAGS" != *"ENABLE_MONGOC=OFF"* ]]; then # Check public headers for extra warnings. - "${cmake_binary}" --build "${build_dir:?}" --target public-header-warnings + cmake --build "${build_dir:?}" --target public-header-warnings fi diff --git a/.evergreen/scripts/compile-windows.sh b/.evergreen/scripts/compile-windows.sh index 9a0bdabd3a2..a3254507187 100755 --- a/.evergreen/scripts/compile-windows.sh +++ b/.evergreen/scripts/compile-windows.sh @@ -9,6 +9,8 @@ set -o igncr # Ignore CR in this script for Windows compatibility. . "$(dirname "${BASH_SOURCE[0]}")/env-var-utils.sh" . "$(dirname "${BASH_SOURCE[0]}")/use-tools.sh" paths +check_var_req UV_INSTALL_DIR + check_var_opt C_STD_VERSION # CMake default: 99. check_var_opt CC check_var_opt CMAKE_GENERATOR @@ -29,6 +31,9 @@ script_dir="$(to_absolute "$(dirname "${BASH_SOURCE[0]}")")" declare mongoc_dir mongoc_dir="$(to_absolute "${script_dir}/../..")" +. "${script_dir:?}/install-build-tools.sh" +install_build_tools + declare -a configure_flags configure_flags_append() { @@ -73,73 +78,67 @@ fi configure_flags_append "-DCMAKE_BUILD_TYPE=${build_config:?}" configure_flags_append "-DENABLE_SSL=${SSL:-}" - # shellcheck source=.evergreen/scripts/find-cmake-version.sh -. "${script_dir}/find-cmake-latest.sh" -declare cmake_binary -cmake_binary="$(find_cmake_latest)" -"${cmake_binary:?}" --version - -export CMAKE_BUILD_PARALLEL_LEVEL -CMAKE_BUILD_PARALLEL_LEVEL="$(nproc)" - declare build_dir build_dir="cmake-build" +# Use ccache if able. +. "${script_dir:?}/find-ccache.sh" +find_ccache_and_export_vars "$(pwd)" || true + if [[ "${CC}" =~ 'gcc' ]]; then + export CMAKE_GENERATOR="Ninja" + # MinGW has trouble compiling src/cpp-check.cpp without some assistance. configure_flags_append "-DCMAKE_CXX_STANDARD=11" - env \ - "${cmake_binary:?}" \ + cmake \ -S . \ -B "${build_dir:?}" \ -G "Ninja" \ "${configure_flags[@]}" \ "${extra_configure_flags[@]}" - env "${cmake_binary:?}" --build "${build_dir:?}" - env "${cmake_binary:?}" --build "${build_dir:?}" --target mongo_c_driver_tests - env "${cmake_binary:?}" --build "${build_dir:?}" --target mongo_c_driver_examples - exit 0 -fi - -# MSBuild needs additional assistance. -# https://devblogs.microsoft.com/cppblog/improved-parallelism-in-msbuild/ -export UseMultiToolTask=1 -export EnforceProcessCountAcrossBuilds=1 - -if [ "${COMPILE_LIBMONGOCRYPT}" = "ON" ]; then - echo "Installing libmongocrypt..." - # shellcheck source=.evergreen/scripts/compile-libmongocrypt.sh - "${script_dir}/compile-libmongocrypt.sh" "${cmake_binary}" "$(native-path "${mongoc_dir}")" "${install_dir}" &>output.txt || { - cat output.txt 1>&2 - exit 1 - } - echo "Installing libmongocrypt... done." - - # Fail if the C driver is unable to find the installed libmongocrypt. - configure_flags_append "-DENABLE_CLIENT_SIDE_ENCRYPTION=ON" -fi + cmake --build "${build_dir:?}" + cmake --build "${build_dir:?}" --target mongo_c_driver_tests + cmake --build "${build_dir:?}" --target mongo_c_driver_examples +else + # MSBuild task-based parallelism (VS 2019 16.3 and newer). + export UseMultiToolTask=true + export EnforceProcessCountAcrossBuilds=true + # MSBuild inter-project parallelism via CMake (3.26 and newer). + export CMAKE_BUILD_PARALLEL_LEVEL + CMAKE_BUILD_PARALLEL_LEVEL="$(nproc)" # /maxcpucount + + if [ "${COMPILE_LIBMONGOCRYPT}" = "ON" ]; then + echo "Installing libmongocrypt..." + # shellcheck source=.evergreen/scripts/compile-libmongocrypt.sh + "${script_dir}/compile-libmongocrypt.sh" "$(command -v cmake)" "$(native-path "${mongoc_dir}")" "${install_dir}" &>output.txt || { + cat output.txt 1>&2 + exit 1 + } + echo "Installing libmongocrypt... done." + + # Fail if the C driver is unable to find the installed libmongocrypt. + configure_flags_append "-DENABLE_CLIENT_SIDE_ENCRYPTION=ON" + fi -# Use ccache if able. -. "${script_dir:?}/find-ccache.sh" -find_ccache_and_export_vars "$(pwd)" || true -if command -v "${CMAKE_C_COMPILER_LAUNCHER:-}" && [[ "${OSTYPE:?}" == cygwin ]]; then - configure_flags_append "-DCMAKE_POLICY_DEFAULT_CMP0141=NEW" - configure_flags_append "-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=$<$:Embedded>" -fi + if command -v "${CMAKE_C_COMPILER_LAUNCHER:-}" && [[ "${OSTYPE:?}" == cygwin ]]; then + configure_flags_append "-DCMAKE_POLICY_DEFAULT_CMP0141=NEW" + configure_flags_append "-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=$<$:Embedded>" + fi -"${cmake_binary:?}" -S . -B "${build_dir:?}" "${configure_flags[@]}" "${extra_configure_flags[@]}" -"${cmake_binary:?}" --build "${build_dir:?}" --config "${build_config:?}" -"${cmake_binary:?}" --install "${build_dir:?}" --config "${build_config:?}" + cmake -S . -B "${build_dir:?}" "${configure_flags[@]}" "${extra_configure_flags[@]}" + cmake --build "${build_dir:?}" --config "${build_config:?}" + cmake --install "${build_dir:?}" --config "${build_config:?}" -# For use by test tasks, which directly use the binary directory contents. -"${cmake_binary:?}" --build "${build_dir:?}" --config "${build_config:?}" --target mongo_c_driver_tests + # For use by test tasks, which directly use the binary directory contents. + cmake --build "${build_dir:?}" --config "${build_config:?}" --target mongo_c_driver_tests -# Also validate examples. -"${cmake_binary:?}" --build "${build_dir:?}" --config "${build_config:?}" --target mongo_c_driver_examples + # Also validate examples. + cmake --build "${build_dir:?}" --config "${build_config:?}" --target mongo_c_driver_examples -if [[ "$EXTRA_CONFIGURE_FLAGS" != *"ENABLE_MONGOC=OFF"* ]]; then - # Check public headers for extra warnings. - "${cmake_binary:?}" --build "${build_dir:?}" --config "${build_config:?}" --target public-header-warnings + if [[ "$EXTRA_CONFIGURE_FLAGS" != *"ENABLE_MONGOC=OFF"* ]]; then + # Check public headers for extra warnings. + cmake --build "${build_dir:?}" --config "${build_config:?}" --target public-header-warnings + fi fi diff --git a/.evergreen/scripts/find-cmake-latest.sh b/.evergreen/scripts/find-cmake-latest.sh deleted file mode 100755 index 95ced01402e..00000000000 --- a/.evergreen/scripts/find-cmake-latest.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -find_cmake_latest() { - . "$(dirname "${BASH_SOURCE[0]}")/use-tools.sh" paths || return - - declare script_dir - script_dir="$(to_absolute "$(dirname "${BASH_SOURCE[0]}")")" || return - - # shellcheck source=.evergreen/scripts/find-cmake-version.sh - . "${script_dir}/find-cmake-version.sh" || return - - find_cmake_version 3 30 2 -} diff --git a/.evergreen/scripts/find-cmake-version.sh b/.evergreen/scripts/find-cmake-version.sh deleted file mode 100755 index 6424302a46a..00000000000 --- a/.evergreen/scripts/find-cmake-version.sh +++ /dev/null @@ -1,273 +0,0 @@ -#!/usr/bin/env bash - -# Used to workaround curl certificate validation failures on certain distros. -. "$(dirname "${BASH_SOURCE[0]}")/use-tools.sh" platform download - -# Create a temporary directory in the existing directory $1. -make_tmpdir_in() { - declare -r target_dir="${1:?"missing path to target directory"}" - - if [[ ! -d "${target_dir}" ]]; then - echo "make_tmpdir_in: target directory ${target_dir} does not exist!" 1>&2 - return 1 - fi - - declare tmpdir - - { - if [[ "${OSTYPE:?}" == darwin* ]]; then - # mktemp on MacOS does not support -p. - tmpdir="$(mktemp -d)" || return - declare tmpbase - tmpbase="$(basename "${tmpdir}")" || return - mv -f "${tmpdir}" "${target_dir}" || return - tmpdir="${target_dir}/${tmpbase}" || return - else - tmpdir="$(mktemp -d -p "${target_dir}")" || return - fi - } 1>&2 - - printf "%s" "${tmpdir}" -} - -# Identify the cache directory to use on the current distro. -local_cache_dir() { - declare res - case "${OSTYPE:?}" in - cygwin) - res="$(cygpath -au "${LOCALAPPDATA:?}")" || return - ;; - darwin*) - res="${HOME:?}/Library/Caches" - ;; - linux*) - res="${HOME:?}/.cache" - ;; - esac - : "${res:?"unrecognized operating system ${OSTYPE:?}"}" - - printf "%s" "${res:?}" -} - -# Ensure "good enough" atomicity when two or more tasks running on the same host -# attempt to install a version of CMake. -cmake_replace_version() { - declare -r cache="${1:?"missing path to cache directory"}" - declare -r root="${2:?"missing path to latest CMake root directory"}" - declare -r version="${3:?"missing latest CMake version"}" - declare -r cmake_cache="${cache}/cmake-${version}" - - # Doesn't matter who creates the cache directory. - mkdir -p "${cache}" || return - - # Should not happen, but handle it anyways. - [[ -L "${cmake_cache}" ]] || rm -rf "${cmake_cache}" || return - - # Temporary directory to create new symlink. - declare tmpdir - tmpdir="$(make_tmpdir_in "${cache}")" || return - - # Symlink to the new CMake root directory. - ln -s "${root}" "${tmpdir}/cmake-${version}" || return - - # Atomic substitution of symlink from old to new CMake root directory. - mv -f "${tmpdir}/cmake-${version}" "${cache}" || return - - # Be nice and clean up the now-empty temporary directory. - rmdir "${tmpdir}" || return -} - -# find_cmake_version -# -# Usage: -# find_cmake_version 3 1 0 -# cmake_binary="$(find_cmake_version 3 1 0)" -# cmake_binary="$(find_cmake_version 3 25 0 2>/dev/null)" -# BYPASS_CMAKE_CACHE=ON cmake_binary="$(find_cmake_version 3 25 0)" -# -# Return 0 (true) if a CMake binary matching the requested version is available -# or successfully obtained from https://cmake.org/files. -# Return a non-zero (false) value otherwise. -# -# If successful, print the name of the CMake binary to stdout (pipe 1). -# Otherwise, no output is printed to stdout (pipe 1). -# -# Diagnostic messages may be printed to stderr (pipe 2). Redirect to /dev/null -# with `2>/dev/null` to silence these messages. -# -# Example: -# cmake_binary="$(find_cmake_version 3 25 0)" || exit -# "${cmake_binary:?}" -S path-to-source -B path-to-build -find_cmake_version() { - # If the BYPASS_CMAKE_CACHE environment variable is set to "ON", the check for - # an existing CMake binary in the mongo-c-driver CMake cache will be skipped - # and the requested CMake binary will be unconditionally downloaded and - # installed from scratch. - : "${BYPASS_CMAKE_CACHE:="OFF"}" - - declare -r major="${1:?"missing CMake major version"}" - declare -r minor="${2:?"missing CMake minor version"}" - declare -r patch="${3:?"missing CMake patch version"}" - declare -r version="${major}.${minor}.${patch}" - - declare cache_dir - cache_dir="$(local_cache_dir)/mongo-c-driver" || return - - declare -r cmake_cache_dir="${cache_dir}/cmake-${version}" - declare -r cmake_binary="${cmake_cache_dir}/bin/cmake" - - if [[ "${BYPASS_CMAKE_CACHE:?}" == "ON" ]]; then - echo "Bypassing lookup of CMake ${version} in mongo-c-driver CMake cache" 1>&2 - else - if command -v "${cmake_binary}" >/dev/null; then - if "${cmake_binary}" --version | grep -q "${version}"; then - echo "Found CMake ${version} in mongo-c-driver CMake cache" 1>&2 - printf "%s" "${cmake_binary}" - return # No work to be done: required CMake binary already exists in cache. - fi - - # Shouldn't happen, but log if it does. - echo "Found inconsistent CMake version in mongo-c-driver CMake cache" 1>&2 - else - echo "CMake ${version} is not present in mongo-c-driver CMake cache" 1>&2 - fi - fi - - declare platform - declare extension - declare decompressor - declare decompressor_args - declare root_dir - - # This logic is only applicable to CMake 3.20 and newer. For CMake versions - # earlier than 3.20 or CMake versions without prebuild binaries for certain - # platforms fallback to building from source. - case "${OSTYPE:?}-${HOSTTYPE:?}" in - cygwin-*) - platform="windows-${HOSTTYPE}" - extension="zip" - decompressor="unzip" - decompressor_args=("-q") - root_dir="cmake-${version}-${platform}" - ;; - darwin*-*) - platform="macos-universal" - extension="tar.gz" - decompressor="tar" - decompressor_args=("xzf") - root_dir="cmake-${version}-${platform}/CMake.app/Contents" - ;; - linux*-s390x | linux*-powerpc64le) ;; # Build from source. - linux*-*) - platform="linux-${HOSTTYPE}" - extension="tar.gz" - decompressor="tar" - decompressor_args=("xzf") - root_dir="cmake-${version}-${platform}" - ;; - *) ;; # Build from source. - esac - - { - # Doesn't matter who creates the cache directory so long as it exists. - mkdir -p "${cache_dir}" || return - - # Avoid polluting current working directory. - declare tmp_cmake_dir - tmp_cmake_dir="$(make_tmpdir_in "${cache_dir}")" || return - } 1>&2 - - if [[ -n "${platform:-}" ]]; then - cmake_download_binary() ( - declare -r cmake_url="https://cmake.org/files/v${major}.${minor}/cmake-${version}-${platform}.${extension}" - - declare -a download_args - download_args=( - --out="cmake.${extension}" - --uri="${cmake_url}" - ) - - # TODO: remove once BUILD-16817 is resolved. - # Workaround SSL certificate validation failures on certain distros. - case "$OS_SHORTNAME-$ARCHNAME" in - ubuntu14-* | ubuntu16-ppc | RedHat7-ppc) - download_args+=(--no-tls-verify) - ;; - esac - - echo "Downloading cmake-${version}-${platform}..." - - cd "${tmp_cmake_dir}" || return - - # Allow download to fail and fallback to building from source. - if download-file "${download_args[@]}"; then - "${decompressor}" "${decompressor_args[@]}" "cmake.${extension}" || return - - cmake_replace_version "${cache_dir}" "$(pwd)/${root_dir}" "${version}" || return - - # Verify CMake binary works as expected. - command -v "${cmake_binary}" || return - - echo "Downloading cmake-${version}-${platform}... done." - else - echo "Could not find prebuild binaries for cmake-${version}-${platform}." - fi - ) 1>&2 - - cmake_download_binary || return - - if command -v "${cmake_binary}" >/dev/null && "${cmake_binary}" --version | grep -q "${version}"; then - # Successfully downloaded binaries. No more work to be done. - printf "%s" "${cmake_binary}" - return - fi - fi - - # Could not obtain a prebuild binary; build CMake from source instead. - ( - declare -r cmake_url="https://cmake.org/files/v${major}.${minor}/cmake-${version}.tar.gz" - - echo "Building cmake-${version} from source..." - - cd "${tmp_cmake_dir}" || return - - curl "${cmake_url}" --output "cmake.tar.gz" || return - tar xzf cmake.tar.gz || return - - if [[ "${OSTYPE}" == darwin* ]]; then - nproc() { sysctl -n hw.logicalcpu; } # MacOS does not have nproc. - fi - - declare -a bootstrap_args - bootstrap_args=( - "--prefix=$(pwd)/install-dir" - "--parallel=$(nproc)" - ) || return - - # Make an attempt to improve CMake build speed by opting into ccache. - export PATH - if command -v /opt/mongodbtoolchain/v4/bin/ccache; then - PATH="${PATH}:/opt/mongodbtoolchain/v4/bin" - bootstrap_args+=("--enable-ccache") - elif command -v /opt/mongodbtoolchain/v3/bin/ccache; then - PATH="${PATH}:/opt/mongodbtoolchain/v3/bin" - bootstrap_args+=("--enable-ccache") - fi - - pushd "cmake-${version}" || return - { - ./bootstrap "${bootstrap_args[@]}" || return - make -j "$(nproc)" install || return - } >/dev/null # Only interested in errors. - popd || return # "cmake-${version}" - - cmake_replace_version "${cache_dir}" "$(pwd)/install-dir" "${version}" || return - - # Verify CMake binary works as expected. - command -v "${cmake_binary}" || return - - echo "Building cmake-${version} from source... done." - ) 1>&2 - - printf "%s" "${cmake_binary}" -} diff --git a/.evergreen/scripts/install-build-tools.sh b/.evergreen/scripts/install-build-tools.sh new file mode 100755 index 00000000000..d9fd9c894f6 --- /dev/null +++ b/.evergreen/scripts/install-build-tools.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +export_uv_tool_dirs() { + UV_TOOL_DIR="$(pwd)/uv-tool" || return + UV_TOOL_BIN_DIR="$(pwd)/uv-bin" || return + + PATH="${UV_TOOL_BIN_DIR:?}:${UV_INSTALL_DIR:?}:${PATH:-}" + + # Windows requires "C:\path\to\dir" instead of "/cygdrive/c/path/to/dir" (PATH is automatically converted). + if [[ "${OSTYPE:?}" == cygwin ]]; then + UV_TOOL_DIR="$(cygpath -aw "${UV_TOOL_DIR:?}")" || return + UV_TOOL_BIN_DIR="$(cygpath -aw "${UV_TOOL_BIN_DIR:?}")" || return + fi + + export UV_TOOL_DIR UV_TOOL_BIN_DIR +} + +install_build_tools() { + export_uv_tool_dirs || return + + uv tool install -q cmake || return + + if [[ -f /etc/redhat-release ]]; then + # Avoid strange "Could NOT find Threads" CMake configuration error on RHEL when using PyPI CMake, PyPI Ninja, and + # C++20 or newer by using MongoDB Toolchain's Ninja binary instead. + ln -sf /opt/mongodbtoolchain/v4/bin/ninja "${UV_TOOL_BIN_DIR:?}/ninja" || return + else + uv tool install -q ninja || return + fi + + cmake --version | head -n 1 || return + echo "ninja version: $(ninja --version)" || return +} diff --git a/.evergreen/scripts/link-sample-program-bson.sh b/.evergreen/scripts/link-sample-program-bson.sh index c17230c9b84..2ad2f73e112 100755 --- a/.evergreen/scripts/link-sample-program-bson.sh +++ b/.evergreen/scripts/link-sample-program-bson.sh @@ -9,9 +9,10 @@ set -o errexit # Exit the script with error if any of the commands fail echo "LINK_STATIC=$LINK_STATIC BUILD_SAMPLE_WITH_CMAKE=$BUILD_SAMPLE_WITH_CMAKE" DIR=$(dirname $0) -. $DIR/find-cmake-latest.sh -CMAKE=$(find_cmake_latest) -. $DIR/check-symlink.sh + +. "${DIR:?}/install-build-tools.sh" +install_build_tools +export CMAKE_GENERATOR="Ninja" # The major version of the project. Appears in certain install filenames. _full_version=$(cat "$DIR/../../VERSION_CURRENT") @@ -54,13 +55,13 @@ fi if [ "$LINK_STATIC" ]; then # Our CMake system builds shared and static by default. - $CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DBUILD_TESTING=OFF -DENABLE_TESTS=OFF -DENABLE_MONGOC=OFF "$SCRATCH_DIR" - $CMAKE --build . --parallel - $CMAKE --build . --parallel --target install + cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DBUILD_TESTING=OFF -DENABLE_TESTS=OFF -DENABLE_MONGOC=OFF "$SCRATCH_DIR" + cmake --build . --parallel + cmake --build . --parallel --target install else - $CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DBUILD_TESTING=OFF -DENABLE_TESTS=OFF -DENABLE_MONGOC=OFF -DENABLE_STATIC=OFF "$SCRATCH_DIR" - $CMAKE --build . --parallel - $CMAKE --build . --parallel --target install + cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DBUILD_TESTING=OFF -DENABLE_TESTS=OFF -DENABLE_MONGOC=OFF -DENABLE_STATIC=OFF "$SCRATCH_DIR" + cmake --build . --parallel + cmake --build . --parallel --target install fi # Revert ccache options, they no longer apply. @@ -78,8 +79,8 @@ if [ "$BUILD_SAMPLE_WITH_CMAKE" ]; then fi cd $EXAMPLE_DIR - $CMAKE -DCMAKE_PREFIX_PATH=$INSTALL_DIR/lib/cmake . - $CMAKE --build . --parallel + cmake -DCMAKE_PREFIX_PATH=$INSTALL_DIR/lib/cmake . + cmake --build . --parallel else # Test our pkg-config file. export PKG_CONFIG_PATH=$INSTALL_DIR/lib/pkgconfig diff --git a/.evergreen/scripts/link-sample-program-mingw-bson.cmd b/.evergreen/scripts/link-sample-program-mingw-bson.cmd index b329ee13945..43648927e6c 100755 --- a/.evergreen/scripts/link-sample-program-mingw-bson.cmd +++ b/.evergreen/scripts/link-sample-program-mingw-bson.cmd @@ -25,9 +25,9 @@ set version=1.31.0 cd %BUILD_DIR% || goto :error rem Build libmongoc, with flags that the downstream R driver mongolite uses -%CMAKE% -G "Ninja" DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DCMAKE_C_FLAGS="-pedantic" -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake -DENABLE_STATIC=ON .. || goto :error -%CMAKE% --build . --parallel || goto :error -%CMAKE% --build . --target install || goto :error +uvx cmake -G "Ninja" DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DCMAKE_C_FLAGS="-pedantic" -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake -DENABLE_STATIC=ON .. || goto :error +uvx cmake --build . --parallel || goto :error +uvx cmake --build . --target install || goto :error rem Test our pkg-config file set EXAMPLE_DIR=%SRCROOT%\src\libbson\examples\ diff --git a/.evergreen/scripts/link-sample-program-mingw.cmd b/.evergreen/scripts/link-sample-program-mingw.cmd index 401280151cd..57857b2e096 100755 --- a/.evergreen/scripts/link-sample-program-mingw.cmd +++ b/.evergreen/scripts/link-sample-program-mingw.cmd @@ -25,9 +25,9 @@ set major=1 cd %BUILD_DIR% || goto :error rem Build libmongoc, with flags that the downstream R driver mongolite uses -%CMAKE% -G "Ninja" -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DCMAKE_C_FLAGS="-pedantic" -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake %CMAKE_FLAGS% .. || goto :error -%CMAKE% --build . --parallel || goto :error -%CMAKE% --build . --target install || goto :error +uvx cmake -G "Ninja" -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DCMAKE_C_FLAGS="-pedantic" -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake %CMAKE_FLAGS% .. || goto :error +uvx cmake --build . --parallel || goto :error +uvx cmake --build . --target install || goto :error rem Test our pkg-config file set EXAMPLE_DIR=%SRCROOT%\src\libmongoc\examples\ diff --git a/.evergreen/scripts/link-sample-program-msvc-bson.cmd b/.evergreen/scripts/link-sample-program-msvc-bson.cmd index b7e3eab1492..9ed0c23579b 100755 --- a/.evergreen/scripts/link-sample-program-msvc-bson.cmd +++ b/.evergreen/scripts/link-sample-program-msvc-bson.cmd @@ -27,13 +27,13 @@ set PATH=%PATH%;%INSTALL_DIR%\bin cd %BUILD_DIR% || goto :error if "%LINK_STATIC%"=="1" ( - %CMAKE% -G "Visual Studio 15 2017" -A x64 -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DENABLE_TESTS=OFF .. || goto :error + uvx cmake -G "Visual Studio 15 2017" -A x64 -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DENABLE_TESTS=OFF .. || goto :error ) else ( - %CMAKE% -G "Visual Studio 15 2017" -A x64 -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DENABLE_TESTS=OFF -DENABLE_STATIC=OFF .. || goto :error + uvx cmake -G "Visual Studio 15 2017" -A x64 -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DENABLE_TESTS=OFF -DENABLE_STATIC=OFF .. || goto :error ) -%CMAKE% --build . --config "Debug" --target ALL_BUILD -- /m || goto :error -%CMAKE% --build . --config "Debug" --target INSTALL -- /m || goto :error +uvx cmake --build . --config "Debug" --target ALL_BUILD -- /m || goto :error +uvx cmake --build . --config "Debug" --target INSTALL -- /m || goto :error rem Test our CMake package config file with CMake's find_package command. set EXAMPLE_DIR=%SRCROOT%\src\libbson\examples\cmake\find_package @@ -43,8 +43,8 @@ if "%LINK_STATIC%"=="1" ( ) cd %EXAMPLE_DIR% || goto :error -%CMAKE% -G "Visual Studio 15 2017" -A x64 -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake . || goto :error -%CMAKE% --build . --config "Debug" --target ALL_BUILD -- /m || goto :error +uvx cmake -G "Visual Studio 15 2017" -A x64 -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake . || goto :error +uvx cmake --build . --config "Debug" --target ALL_BUILD -- /m || goto :error rem Yes, they should've named it "dependencies". dumpbin.exe /dependents Debug\hello_bson.exe || goto :error diff --git a/.evergreen/scripts/link-sample-program-msvc.cmd b/.evergreen/scripts/link-sample-program-msvc.cmd index a6a73efd76c..eee84a3bc22 100755 --- a/.evergreen/scripts/link-sample-program-msvc.cmd +++ b/.evergreen/scripts/link-sample-program-msvc.cmd @@ -33,9 +33,9 @@ if "%ENABLE_SNAPPY%"=="1" ( curl -sS --retry 5 -LO https://github.com/google/snappy/archive/1.1.7.tar.gz || goto :error %TAR% xzf 1.1.7.tar.gz || goto :error cd snappy-1.1.7 || goto :error - %CMAKE% -G "Visual Studio 15 2017" -A x64 -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -S snappy-1.1.7 -B snappy-1.1.7-build || goto :error - %CMAKE% --build snappy-1.1.7-build --config "Debug" --target ALL_BUILD -- /m || goto :error - %CMAKE% --build snappy-1.1.7-build --config "Debug" --target INSTALL -- /m || goto :error + uvx cmake -G "Visual Studio 15 2017" -A x64 -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -S snappy-1.1.7 -B snappy-1.1.7-build || goto :error + uvx cmake --build snappy-1.1.7-build --config "Debug" --target ALL_BUILD -- /m || goto :error + uvx cmake --build snappy-1.1.7-build --config "Debug" --target INSTALL -- /m || goto :error set SNAPPY_OPTION=-DENABLE_SNAPPY=ON ) else ( set SNAPPY_OPTION=-DENABLE_SNAPPY=OFF @@ -44,13 +44,13 @@ if "%ENABLE_SNAPPY%"=="1" ( cd %BUILD_DIR% || goto :error rem Build libmongoc if "%ENABLE_SSL%"=="1" ( - %CMAKE% -G "Visual Studio 15 2017" -A x64 -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DENABLE_SSL=WINDOWS %ENABLE_SNAPPY_OPTION% .. || goto :error + uvx cmake -G "Visual Studio 15 2017" -A x64 -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DENABLE_SSL=WINDOWS %ENABLE_SNAPPY_OPTION% .. || goto :error ) else ( - %CMAKE% -G "Visual Studio 15 2017" -A x64 -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DENABLE_SSL=OFF %ENABLE_SNAPPY_OPTION% .. || goto :error + uvx cmake -G "Visual Studio 15 2017" -A x64 -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DENABLE_SSL=OFF %ENABLE_SNAPPY_OPTION% .. || goto :error ) -%CMAKE% --build . --config "Debug" --target ALL_BUILD -- /m || goto :error -%CMAKE% --build . --config "Debug" --target INSTALL -- /m || goto :error +uvx cmake --build . --config "Debug" --target ALL_BUILD -- /m || goto :error +uvx cmake --build . --config "Debug" --target INSTALL -- /m || goto :error rem Test our CMake package config file with CMake's find_package command. set EXAMPLE_DIR=%SRCROOT%\src\libmongoc\examples\cmake\find_package @@ -67,8 +67,8 @@ if "%ENABLE_SSL%"=="1" ( set MONGODB_EXAMPLE_URI="mongodb://localhost/?ssl=true&sslclientcertificatekeyfile=client.pem&sslcertificateauthorityfile=ca.pem&sslallowinvalidhostnames=true" ) -%CMAKE% -G "Visual Studio 15 2017" -A x64 -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake . || goto :error -%CMAKE% --build . --config "Debug" --target ALL_BUILD -- /m || goto :error +uvx cmake -G "Visual Studio 15 2017" -A x64 -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake . || goto :error +uvx cmake --build . --config "Debug" --target ALL_BUILD -- /m || goto :error rem Yes, they should've named it "dependencies". dumpbin.exe /dependents Debug\hello_mongoc.exe || goto :error diff --git a/.evergreen/scripts/link-sample-program.sh b/.evergreen/scripts/link-sample-program.sh index 52d4c0f1e60..15725d5d193 100755 --- a/.evergreen/scripts/link-sample-program.sh +++ b/.evergreen/scripts/link-sample-program.sh @@ -11,10 +11,13 @@ set -o errexit # Exit the script with error if any of the commands fail echo "LINK_STATIC=$LINK_STATIC BUILD_SAMPLE_WITH_CMAKE=$BUILD_SAMPLE_WITH_CMAKE" +: "${UV_INSTALL_DIR:?}" + DIR=$(dirname $0) -. $DIR/find-cmake-latest.sh -CMAKE=$(find_cmake_latest) -. $DIR/check-symlink.sh + +. "${DIR:?}/install-build-tools.sh" +install_build_tools +export CMAKE_GENERATOR="Ninja" # The major version of the project. Appears in certain install filenames. _full_version=$(cat "$DIR/../../VERSION_CURRENT") @@ -49,6 +52,16 @@ mkdir -p $INSTALL_DIR cd $BUILD_DIR +# Use ccache if able. +if [[ -f $DIR/find-ccache.sh ]]; then + . $DIR/find-ccache.sh + find_ccache_and_export_vars "$SCRATCH_DIR" || true + if command -v "${CMAKE_C_COMPILER_LAUNCHER:-}" && [[ "${OSTYPE:?}" == cygwin ]]; then + configure_flags_append "-DCMAKE_POLICY_DEFAULT_CMP0141=NEW" + configure_flags_append "-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=$<$:Embedded>" + fi +fi + if [ "$ENABLE_SNAPPY" ]; then SNAPPY_CMAKE_OPTION="-DENABLE_SNAPPY=ON" else @@ -74,19 +87,9 @@ fi ZSTD="AUTO" -# Use ccache if able. -if [[ -f $DIR/find-ccache.sh ]]; then - . $DIR/find-ccache.sh - find_ccache_and_export_vars "$SCRATCH_DIR" || true - if command -v "${CMAKE_C_COMPILER_LAUNCHER:-}" && [[ "${OSTYPE:?}" == cygwin ]]; then - configure_flags_append "-DCMAKE_POLICY_DEFAULT_CMP0141=NEW" - configure_flags_append "-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=$<$:Embedded>" - fi -fi - -$CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DCMAKE_PREFIX_PATH=$INSTALL_DIR/lib/cmake -DBUILD_TESTING=OFF $SSL_CMAKE_OPTION $SNAPPY_CMAKE_OPTION $STATIC_CMAKE_OPTION -DENABLE_ZSTD=$ZSTD "$SCRATCH_DIR" -$CMAKE --build . --parallel -$CMAKE --build . --parallel --target install +cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DCMAKE_PREFIX_PATH=$INSTALL_DIR/lib/cmake -DBUILD_TESTING=OFF $SSL_CMAKE_OPTION $SNAPPY_CMAKE_OPTION $STATIC_CMAKE_OPTION -DENABLE_ZSTD=$ZSTD "$SCRATCH_DIR" +cmake --build . --parallel +cmake --build . --parallel --target install # Revert ccache options, they no longer apply. unset CCACHE_BASEDIR CCACHE_NOHASHDIR @@ -120,8 +123,8 @@ if [ "$BUILD_SAMPLE_WITH_CMAKE" ]; then fi cd $EXAMPLE_DIR - $CMAKE -DCMAKE_PREFIX_PATH=$INSTALL_DIR/lib/cmake . - $CMAKE --build . + cmake -DCMAKE_PREFIX_PATH=$INSTALL_DIR/lib/cmake . + cmake --build . else # Test our pkg-config file. export PKG_CONFIG_PATH=$INSTALL_DIR/lib/pkgconfig diff --git a/.evergreen/scripts/openssl-compat-check.sh b/.evergreen/scripts/openssl-compat-check.sh index 9199831ef3e..dbddd811eab 100755 --- a/.evergreen/scripts/openssl-compat-check.sh +++ b/.evergreen/scripts/openssl-compat-check.sh @@ -10,6 +10,8 @@ set -o pipefail check_var_req OPENSSL_VERSION check_var_opt OPENSSL_USE_STATIC_LIBS +check_var_req UV_INSTALL_DIR + declare script_dir script_dir="$(to_absolute "$(dirname "${BASH_SOURCE[0]}")")" @@ -29,18 +31,14 @@ fi declare libmongocrypt_install_dir="${mongoc_dir}/install-dir" -# shellcheck source=.evergreen/scripts/find-cmake-latest.sh -. "${script_dir}/find-cmake-latest.sh" -declare cmake_binary -cmake_binary="$(find_cmake_latest)" - -export CMAKE_BUILD_PARALLEL_LEVEL -CMAKE_BUILD_PARALLEL_LEVEL="$(nproc)" +. "${script_dir:?}/install-build-tools.sh" +install_build_tools +export CMAKE_GENERATOR="Ninja" # libmongocrypt must use the same OpenSSL library. echo "Installing libmongocrypt..." # shellcheck source=.evergreen/scripts/compile-libmongocrypt.sh -"${script_dir}/compile-libmongocrypt.sh" "${cmake_binary:?}" "${mongoc_dir:?}" "${mongoc_install_dir:?}" "${openssl_cmake_flags[@]:?}" &>output.txt || { +"${script_dir}/compile-libmongocrypt.sh" "$(command -v cmake)" "${mongoc_dir:?}" "${mongoc_install_dir:?}" "${openssl_cmake_flags[@]:?}" &>output.txt || { cat output.txt 1>&2 exit 1 } @@ -68,7 +66,7 @@ configure_flags+=("${openssl_cmake_flags[@]:?}") echo "configure_flags: ${configure_flags[*]}" echo "Configuring..." -"${cmake_binary:?}" -S . -B "${mongoc_build_dir:?}" "${configure_flags[@]}" >/dev/null +cmake -S . -B "${mongoc_build_dir:?}" "${configure_flags[@]}" >/dev/null echo "Configuring... done." echo "Verifying the correct OpenSSL library was found..." @@ -104,9 +102,9 @@ echo "Verifying the correct OpenSSL library was found..." echo "Verifying the correct OpenSSL library was found... done." echo "Building..." -"${cmake_binary:?}" --build "${mongoc_build_dir:?}" --target all mongoc-ping test-mongoc-gssapi >/dev/null +cmake --build "${mongoc_build_dir:?}" --target all mongoc-ping test-mongoc-gssapi >/dev/null echo "Building... done." echo "Installing..." -"${cmake_binary:?}" --install "${mongoc_build_dir:?}" +cmake --install "${mongoc_build_dir:?}" echo "Installing... done." diff --git a/.evergreen/scripts/patch-uv-installer.sh b/.evergreen/scripts/patch-uv-installer.sh new file mode 100755 index 00000000000..68654010d83 --- /dev/null +++ b/.evergreen/scripts/patch-uv-installer.sh @@ -0,0 +1,83 @@ +#!/usr/bin/env bash + +# A convenient helper function to download the list of checksums for the specified release. +# The output of this function should be copy-pasted as-is into the array of checksums below. +download_checksums() { + declare version + version="${1:?"usage: download_checkums "}" + + for checksum in $(curl -sSL "https://github.com/astral-sh/uv/releases/download/${version:?}/dist-manifest.json" | jq -r '.releases[0].artifacts.[] | select(startswith("uv-") and (endswith(".zip.sha256") or endswith(".tar.gz.sha256")))'); do + curl -sSL "https://github.com/astral-sh/uv/releases/download/${version:?}/${checksum:?}" + done +} + +# Patches the specified uv-installer.sh script with checksums. +patch_uv_installer() { + declare script version + script="${1:?"usage: patch_uv_installer "}" + version="${2:?"usage: patch_uv_installer "}" + + [[ -f "${script:?}" ]] || { + echo "${script:?} does not exist?" + return 1 + } >&2 + + command -v perl >/dev/null || return + + # Ensure the uv-installer.sh script's version matches the expected version. + app_version="$(perl -lne 'print $1 if m|APP_VERSION="([^"]+)"|' "${script:?}")" || return + + [[ "${app_version:?}" == "${version:?}" ]] || { + echo "${script:?} version ${app_version:?} does not match expected version ${version:?}" + return 1 + } >&2 + + # The output of the `download_checksums` helper function. + checksums=( + c3eddc0e314abb8588f1cdf312f0b060d79e1906eff8f43b64a05ff5e2727872 uv-aarch64-apple-darwin.tar.gz + 5b3a80d385d26fb9f63579a0712d020ec413ada38a6900e88fdfd41b58795b7e *uv-aarch64-pc-windows-msvc.zip + 3bb77b764618f65a969da063d1c4a507d8de5360ca2858f771cab109fa879a4d uv-aarch64-unknown-linux-gnu.tar.gz + 40ba6e62de35820e8460eacee2b5b8f4add70a834d3859f7a60cdfc6b19ab599 uv-aarch64-unknown-linux-musl.tar.gz + f108a49a17b0700d7121b0215575f96c46a203774ed80ef40544005d7af74a67 uv-arm-unknown-linux-musleabihf.tar.gz + 730d8ef57f221ecc572d47b227ecbd8261be08157efb351311f7bc1f6c1c944a uv-armv7-unknown-linux-gnueabihf.tar.gz + b78dacab7c2fb352301d8997c0c705c3959a4e44d7b3afe670aee2397a2c9ab3 uv-armv7-unknown-linux-musleabihf.tar.gz + 08482edef8b077e12e73f76e6b4bb0300c054b8009cfac5cc354297f47d24623 *uv-i686-pc-windows-msvc.zip + 0ce384911d4af9007576ceba2557c5d474a953ced34602ee4e09bd888cee13c0 uv-i686-unknown-linux-gnu.tar.gz + b6462dc8190c7a1eafa74287d8ff213764baa49e098aeeb522fa479d29e1c0bf uv-i686-unknown-linux-musl.tar.gz + 9a8e8a8927df9fa39af79214ab1acfc227dba9d9e690a424cef1dc17296161a8 uv-powerpc64-unknown-linux-gnu.tar.gz + 4880a8e2ba5086e7ed4bd3aecfdae5e353da569ddaac02cd3db598b4c8e77193 uv-powerpc64le-unknown-linux-gnu.tar.gz + 0cd68055cedbc5b1194e7e7ab2b35ac7aa1d835c586fb3778c7acb0e8a8ac822 uv-riscv64gc-unknown-linux-gnu.tar.gz + 8cc2e70bee35c9e437c2308f130b79acc0d7c43e710296990ed76e702e220912 uv-s390x-unknown-linux-gnu.tar.gz + b799253441726351bc60c2e91254a821001e5e2e22a0e2b077d8983f583e8139 uv-x86_64-apple-darwin.tar.gz + 60870fa18d438737088e533ed06617549e42531c522cc9a8fe4455d8e745dc29 *uv-x86_64-pc-windows-msvc.zip + 8ca3db7b2a3199171cfc0870be1f819cb853ddcec29a5fa28dae30278922b7ba uv-x86_64-unknown-linux-gnu.tar.gz + 38ade73396b48fce89d9d1cb8a7e8f02b6e18a2d87467525ee8fb7e09899f70d uv-x86_64-unknown-linux-musl.tar.gz + ) + + # Substitution: + # local _checksum_value + # -> + # local _checksum_value="sha256" + perl -i'' -lpe "s|local _checksum_style$|local _checksum_style=\"sha256\"|" "${script:?}" || return + + # Substitution (for each checksum + artifact in the checksums array): + # case "$_artifact_name" in + # ... + # "") + # ... + # esac + # -> + # case "$_artifact_name" in + # ... + # "") _checksum_value="" + # ... + # esac + for ((i=0; i<"${#checksums[@]}"; i+=2)); do + declare checksum artifact + checksum="${checksums[i]:?}" + artifact="${checksums[i+1]:?}" + + [[ "${artifact:?}" =~ ^\* ]] && artifact="${artifact:1}" + perl -i'' -lpe "s|(\"${artifact:?}\"\))|\$1 _checksum_value=\"${checksum:?}\"|" "${script:?}" || return + done +} diff --git a/.evergreen/scripts/uv-installer.sh b/.evergreen/scripts/uv-installer.sh new file mode 100755 index 00000000000..4a84336554e --- /dev/null +++ b/.evergreen/scripts/uv-installer.sh @@ -0,0 +1,2080 @@ +#!/bin/sh +# shellcheck shell=dash +# shellcheck disable=SC2039 # local is non-POSIX +# +# Licensed under the MIT license +# , at your +# option. This file may not be copied, modified, or distributed +# except according to those terms. + +# This runs on Unix shells like bash/dash/ksh/zsh. It uses the common `local` +# extension. Note: Most shells limit `local` to 1 var per line, contra bash. + +# Some versions of ksh have no `local` keyword. Alias it to `typeset`, but +# beware this makes variables global with f()-style function syntax in ksh93. +# mksh has this alias by default. +has_local() { + # shellcheck disable=SC2034 # deliberately unused + local _has_local +} + +has_local 2>/dev/null || alias local=typeset + +set -u + +APP_NAME="uv" +APP_VERSION="0.8.13" +# Look for GitHub Enterprise-style base URL first +if [ -n "${UV_INSTALLER_GHE_BASE_URL:-}" ]; then + INSTALLER_BASE_URL="$UV_INSTALLER_GHE_BASE_URL" +else + INSTALLER_BASE_URL="${UV_INSTALLER_GITHUB_BASE_URL:-https://github.com}" +fi +if [ -n "${UV_DOWNLOAD_URL:-}" ]; then + ARTIFACT_DOWNLOAD_URL="$UV_DOWNLOAD_URL" +elif [ -n "${INSTALLER_DOWNLOAD_URL:-}" ]; then + ARTIFACT_DOWNLOAD_URL="$INSTALLER_DOWNLOAD_URL" +else + ARTIFACT_DOWNLOAD_URL="${INSTALLER_BASE_URL}/astral-sh/uv/releases/download/0.8.13" +fi +if [ -n "${UV_PRINT_VERBOSE:-}" ]; then + PRINT_VERBOSE="$UV_PRINT_VERBOSE" +else + PRINT_VERBOSE=${INSTALLER_PRINT_VERBOSE:-0} +fi +if [ -n "${UV_PRINT_QUIET:-}" ]; then + PRINT_QUIET="$UV_PRINT_QUIET" +else + PRINT_QUIET=${INSTALLER_PRINT_QUIET:-0} +fi +if [ -n "${UV_NO_MODIFY_PATH:-}" ]; then + NO_MODIFY_PATH="$UV_NO_MODIFY_PATH" +else + NO_MODIFY_PATH=${INSTALLER_NO_MODIFY_PATH:-0} +fi +if [ "${UV_DISABLE_UPDATE:-0}" = "1" ]; then + INSTALL_UPDATER=0 +else + INSTALL_UPDATER=1 +fi +UNMANAGED_INSTALL="${UV_UNMANAGED_INSTALL:-}" +if [ -n "${UNMANAGED_INSTALL}" ]; then + NO_MODIFY_PATH=1 + INSTALL_UPDATER=0 +fi +AUTH_TOKEN="${UV_GITHUB_TOKEN:-}" + +read -r RECEIPT <&2 + say_verbose " from $_url" 1>&2 + say_verbose " to $_file" 1>&2 + + ensure mkdir -p "$_dir" + + if ! downloader "$_url" "$_file"; then + say "failed to download $_url" + say "this may be a standard network error, but it may also indicate" + say "that $APP_NAME's release process is not working. When in doubt" + say "please feel free to open an issue!" + exit 1 + fi + + if [ -n "${_checksum_style:-}" ]; then + verify_checksum "$_file" "$_checksum_style" "$_checksum_value" + else + say "no checksums to verify" + fi + + # ...and then the updater, if it exists + if [ -n "$_updater_name" ] && [ "$INSTALL_UPDATER" = "1" ]; then + local _updater_url="$ARTIFACT_DOWNLOAD_URL/$_updater_name" + # This renames the artifact while doing the download, removing the + # target triple and leaving just the appname-update format + local _updater_file="$_dir/$APP_NAME-update" + + if ! downloader "$_updater_url" "$_updater_file"; then + say "failed to download $_updater_url" + say "this may be a standard network error, but it may also indicate" + say "that $APP_NAME's release process is not working. When in doubt" + say "please feel free to open an issue!" + exit 1 + fi + + # Add the updater to the list of binaries to install + _bins="$_bins $APP_NAME-update" + fi + + # unpack the archive + case "$_zip_ext" in + ".zip") + ensure unzip -q "$_file" -d "$_dir" + ;; + + ".tar."*) + ensure tar xf "$_file" --strip-components 1 -C "$_dir" + ;; + *) + err "unknown archive format: $_zip_ext" + ;; + esac + + install "$_dir" "$_bins" "$_libs" "$_staticlibs" "$_arch" "$@" + local _retval=$? + if [ "$_retval" != 0 ]; then + return "$_retval" + fi + + ignore rm -rf "$_dir" + + # Install the install receipt + if [ "$INSTALL_UPDATER" = "1" ]; then + if ! mkdir -p "$RECEIPT_HOME"; then + err "unable to create receipt directory at $RECEIPT_HOME" + else + echo "$RECEIPT" > "$RECEIPT_HOME/$APP_NAME-receipt.json" + # shellcheck disable=SC2320 + local _retval=$? + fi + else + local _retval=0 + fi + + return "$_retval" +} + +# Replaces $HOME with the variable name for display to the user, +# only if $HOME is defined. +replace_home() { + local _str="$1" + + if [ -n "${HOME:-}" ]; then + echo "$_str" | sed "s,$HOME,\$HOME," + else + echo "$_str" + fi +} + +json_binary_aliases() { + local _arch="$1" + + case "$_arch" in + "aarch64-apple-darwin") + echo '{}' + ;; + "aarch64-pc-windows-gnu") + echo '{}' + ;; + "aarch64-unknown-linux-gnu") + echo '{}' + ;; + "aarch64-unknown-linux-musl-dynamic") + echo '{}' + ;; + "aarch64-unknown-linux-musl-static") + echo '{}' + ;; + "arm-unknown-linux-gnueabihf") + echo '{}' + ;; + "arm-unknown-linux-musl-dynamiceabihf") + echo '{}' + ;; + "arm-unknown-linux-musl-staticeabihf") + echo '{}' + ;; + "armv7-unknown-linux-gnueabihf") + echo '{}' + ;; + "armv7-unknown-linux-musl-dynamiceabihf") + echo '{}' + ;; + "armv7-unknown-linux-musl-staticeabihf") + echo '{}' + ;; + "i686-pc-windows-gnu") + echo '{}' + ;; + "i686-unknown-linux-gnu") + echo '{}' + ;; + "i686-unknown-linux-musl-dynamic") + echo '{}' + ;; + "i686-unknown-linux-musl-static") + echo '{}' + ;; + "powerpc64-unknown-linux-gnu") + echo '{}' + ;; + "powerpc64le-unknown-linux-gnu") + echo '{}' + ;; + "riscv64gc-unknown-linux-gnu") + echo '{}' + ;; + "s390x-unknown-linux-gnu") + echo '{}' + ;; + "x86_64-apple-darwin") + echo '{}' + ;; + "x86_64-pc-windows-gnu") + echo '{}' + ;; + "x86_64-unknown-linux-gnu") + echo '{}' + ;; + "x86_64-unknown-linux-musl-dynamic") + echo '{}' + ;; + "x86_64-unknown-linux-musl-static") + echo '{}' + ;; + *) + echo '{}' + ;; + esac +} + +aliases_for_binary() { + local _bin="$1" + local _arch="$2" + + case "$_arch" in + "aarch64-apple-darwin") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "aarch64-pc-windows-gnu") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "aarch64-unknown-linux-gnu") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "aarch64-unknown-linux-musl-dynamic") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "aarch64-unknown-linux-musl-static") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "arm-unknown-linux-gnueabihf") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "arm-unknown-linux-musl-dynamiceabihf") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "arm-unknown-linux-musl-staticeabihf") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "armv7-unknown-linux-gnueabihf") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "armv7-unknown-linux-musl-dynamiceabihf") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "armv7-unknown-linux-musl-staticeabihf") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "i686-pc-windows-gnu") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "i686-unknown-linux-gnu") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "i686-unknown-linux-musl-dynamic") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "i686-unknown-linux-musl-static") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "powerpc64-unknown-linux-gnu") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "powerpc64le-unknown-linux-gnu") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "riscv64gc-unknown-linux-gnu") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "s390x-unknown-linux-gnu") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "x86_64-apple-darwin") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "x86_64-pc-windows-gnu") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "x86_64-unknown-linux-gnu") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "x86_64-unknown-linux-musl-dynamic") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + "x86_64-unknown-linux-musl-static") + case "$_bin" in + *) + echo "" + ;; + esac + ;; + *) + echo "" + ;; + esac +} + +select_archive_for_arch() { + local _true_arch="$1" + local _archive + + # try each archive, checking runtime conditions like libc versions + # accepting the first one that matches, as it's the best match + case "$_true_arch" in + "aarch64-apple-darwin") + _archive="uv-aarch64-apple-darwin.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + _archive="uv-x86_64-apple-darwin.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "aarch64-pc-windows-gnu") + _archive="uv-aarch64-pc-windows-msvc.zip" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "aarch64-pc-windows-msvc") + _archive="uv-aarch64-pc-windows-msvc.zip" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + _archive="uv-x86_64-pc-windows-msvc.zip" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + _archive="uv-i686-pc-windows-msvc.zip" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "aarch64-unknown-linux-gnu") + _archive="uv-aarch64-unknown-linux-gnu.tar.gz" + if ! check_glibc "2" "28"; then + _archive="" + fi + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + _archive="uv-aarch64-unknown-linux-musl.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "aarch64-unknown-linux-musl-dynamic") + _archive="uv-aarch64-unknown-linux-musl.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "aarch64-unknown-linux-musl-static") + _archive="uv-aarch64-unknown-linux-musl.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "arm-unknown-linux-gnueabihf") + _archive="uv-arm-unknown-linux-musleabihf.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "arm-unknown-linux-musl-dynamiceabihf") + _archive="uv-arm-unknown-linux-musleabihf.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "arm-unknown-linux-musl-staticeabihf") + _archive="uv-arm-unknown-linux-musleabihf.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "armv7-unknown-linux-gnueabihf") + _archive="uv-armv7-unknown-linux-gnueabihf.tar.gz" + if ! check_glibc "2" "17"; then + _archive="" + fi + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + _archive="uv-armv7-unknown-linux-musleabihf.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "armv7-unknown-linux-musl-dynamiceabihf") + _archive="uv-armv7-unknown-linux-musleabihf.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "armv7-unknown-linux-musl-staticeabihf") + _archive="uv-armv7-unknown-linux-musleabihf.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "i686-pc-windows-gnu") + _archive="uv-i686-pc-windows-msvc.zip" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "i686-pc-windows-msvc") + _archive="uv-i686-pc-windows-msvc.zip" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "i686-unknown-linux-gnu") + _archive="uv-i686-unknown-linux-gnu.tar.gz" + if ! check_glibc "2" "17"; then + _archive="" + fi + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + _archive="uv-i686-unknown-linux-musl.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "i686-unknown-linux-musl-dynamic") + _archive="uv-i686-unknown-linux-musl.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "i686-unknown-linux-musl-static") + _archive="uv-i686-unknown-linux-musl.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "powerpc64-unknown-linux-gnu") + _archive="uv-powerpc64-unknown-linux-gnu.tar.gz" + if ! check_glibc "2" "17"; then + _archive="" + fi + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "powerpc64le-unknown-linux-gnu") + _archive="uv-powerpc64le-unknown-linux-gnu.tar.gz" + if ! check_glibc "2" "17"; then + _archive="" + fi + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "riscv64gc-unknown-linux-gnu") + _archive="uv-riscv64gc-unknown-linux-gnu.tar.gz" + if ! check_glibc "2" "31"; then + _archive="" + fi + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "s390x-unknown-linux-gnu") + _archive="uv-s390x-unknown-linux-gnu.tar.gz" + if ! check_glibc "2" "17"; then + _archive="" + fi + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "x86_64-apple-darwin") + _archive="uv-x86_64-apple-darwin.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "x86_64-pc-windows-gnu") + _archive="uv-x86_64-pc-windows-msvc.zip" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "x86_64-pc-windows-msvc") + _archive="uv-x86_64-pc-windows-msvc.zip" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + _archive="uv-i686-pc-windows-msvc.zip" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "x86_64-unknown-linux-gnu") + _archive="uv-x86_64-unknown-linux-gnu.tar.gz" + if ! check_glibc "2" "17"; then + _archive="" + fi + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + _archive="uv-x86_64-unknown-linux-musl.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "x86_64-unknown-linux-musl-dynamic") + _archive="uv-x86_64-unknown-linux-musl.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + "x86_64-unknown-linux-musl-static") + _archive="uv-x86_64-unknown-linux-musl.tar.gz" + if [ -n "$_archive" ]; then + echo "$_archive" + return 0 + fi + ;; + *) + err "there isn't a download for your platform $_true_arch" + ;; + esac + err "no compatible downloads were found for your platform $_true_arch" +} + +check_glibc() { + local _min_glibc_major="$1" + local _min_glibc_series="$2" + + # Parsing version out from line 1 like: + # ldd (Ubuntu GLIBC 2.35-0ubuntu3.1) 2.35 + _local_glibc="$(ldd --version | awk -F' ' '{ if (FNR<=1) print $NF }')" + + if [ "$(echo "${_local_glibc}" | awk -F. '{ print $1 }')" = "$_min_glibc_major" ] && [ "$(echo "${_local_glibc}" | awk -F. '{ print $2 }')" -ge "$_min_glibc_series" ]; then + return 0 + else + say "System glibc version (\`${_local_glibc}') is too old; checking alternatives" >&2 + return 1 + fi +} + +# See discussion of late-bound vs early-bound for why we use single-quotes with env vars +# shellcheck disable=SC2016 +install() { + # This code needs to both compute certain paths for itself to write to, and + # also write them to shell/rc files so that they can look them up to e.g. + # add them to PATH. This requires an active distinction between paths + # and expressions that can compute them. + # + # The distinction lies in when we want env-vars to be evaluated. For instance + # if we determine that we want to install to $HOME/.myapp, which do we add + # to e.g. $HOME/.profile: + # + # * early-bound: export PATH="/home/myuser/.myapp:$PATH" + # * late-bound: export PATH="$HOME/.myapp:$PATH" + # + # In this case most people would prefer the late-bound version, but in other + # cases the early-bound version might be a better idea. In particular when using + # other env-vars than $HOME, they are more likely to be only set temporarily + # for the duration of this install script, so it's more advisable to erase their + # existence with early-bounding. + # + # This distinction is handled by "double-quotes" (early) vs 'single-quotes' (late). + # + # However if we detect that "$SOME_VAR/..." is a subdir of $HOME, we try to rewrite + # it to be '$HOME/...' to get the best of both worlds. + # + # This script has a few different variants, the most complex one being the + # CARGO_HOME version which attempts to install things to Cargo's bin dir, + # potentially setting up a minimal version if the user hasn't ever installed Cargo. + # + # In this case we need to: + # + # * Install to $HOME/.cargo/bin/ + # * Create a shell script at $HOME/.cargo/env that: + # * Checks if $HOME/.cargo/bin/ is on PATH + # * and if not prepends it to PATH + # * Edits $INFERRED_HOME/.profile to run $HOME/.cargo/env (if the line doesn't exist) + # + # To do this we need these 4 values: + + # The actual path we're going to install to + local _install_dir + # The directory C dynamic/static libraries install to + local _lib_install_dir + # The install prefix we write to the receipt. + # For organized install methods like CargoHome, which have + # subdirectories, this is the root without `/bin`. For other + # methods, this is the same as `_install_dir`. + local _receipt_install_dir + # Path to the an shell script that adds install_dir to PATH + local _env_script_path + # Potentially-late-bound version of install_dir to write env_script + local _install_dir_expr + # Potentially-late-bound version of env_script_path to write to rcfiles like $HOME/.profile + local _env_script_path_expr + # Forces the install to occur at this path, not the default + local _force_install_dir + # Which install layout to use - "flat" or "hierarchical" + local _install_layout="unspecified" + # A list of binaries which are shadowed in the PATH + local _shadowed_bins="" + + # Check the newer app-specific variable before falling back + # to the older generic one + if [ -n "${UV_INSTALL_DIR:-}" ]; then + _force_install_dir="$UV_INSTALL_DIR" + _install_layout="flat" + elif [ -n "${CARGO_DIST_FORCE_INSTALL_DIR:-}" ]; then + _force_install_dir="$CARGO_DIST_FORCE_INSTALL_DIR" + _install_layout="flat" + elif [ -n "$UNMANAGED_INSTALL" ]; then + _force_install_dir="$UNMANAGED_INSTALL" + _install_layout="flat" + fi + + # Check if the install layout should be changed from `flat` to `cargo-home` + # for backwards compatible updates of applications that switched layouts. + if [ -n "${_force_install_dir:-}" ]; then + if [ "$_install_layout" = "flat" ]; then + # If the install directory is targeting the Cargo home directory, then + # we assume this application was previously installed that layout + if [ "$_force_install_dir" = "${CARGO_HOME:-${INFERRED_HOME:-}/.cargo}" ]; then + _install_layout="cargo-home" + fi + fi + fi + + # Before actually consulting the configured install strategy, see + # if we're overriding it. + if [ -n "${_force_install_dir:-}" ]; then + case "$_install_layout" in + "hierarchical") + _install_dir="$_force_install_dir/bin" + _lib_install_dir="$_force_install_dir/lib" + _receipt_install_dir="$_force_install_dir" + _env_script_path="$_force_install_dir/env" + _install_dir_expr="$(replace_home "$_force_install_dir/bin")" + _env_script_path_expr="$(replace_home "$_force_install_dir/env")" + ;; + "cargo-home") + _install_dir="$_force_install_dir/bin" + _lib_install_dir="$_force_install_dir/bin" + _receipt_install_dir="$_force_install_dir" + _env_script_path="$_force_install_dir/env" + _install_dir_expr="$(replace_home "$_force_install_dir/bin")" + _env_script_path_expr="$(replace_home "$_force_install_dir/env")" + ;; + "flat") + _install_dir="$_force_install_dir" + _lib_install_dir="$_force_install_dir" + _receipt_install_dir="$_install_dir" + _env_script_path="$_force_install_dir/env" + _install_dir_expr="$(replace_home "$_force_install_dir")" + _env_script_path_expr="$(replace_home "$_force_install_dir/env")" + ;; + *) + err "Unrecognized install layout: $_install_layout" + ;; + esac + fi + if [ -z "${_install_dir:-}" ]; then + _install_layout="flat" + # Install to $XDG_BIN_HOME + if [ -n "${XDG_BIN_HOME:-}" ]; then + _install_dir="$XDG_BIN_HOME" + _lib_install_dir="$_install_dir" + _receipt_install_dir="$_install_dir" + _env_script_path="$XDG_BIN_HOME/env" + _install_dir_expr="$(replace_home "$_install_dir")" + _env_script_path_expr="$(replace_home "$_env_script_path")" + fi + fi + if [ -z "${_install_dir:-}" ]; then + _install_layout="flat" + # Install to $XDG_DATA_HOME/../bin + if [ -n "${XDG_DATA_HOME:-}" ]; then + _install_dir="$XDG_DATA_HOME/../bin" + _lib_install_dir="$_install_dir" + _receipt_install_dir="$_install_dir" + _env_script_path="$XDG_DATA_HOME/../bin/env" + _install_dir_expr="$(replace_home "$_install_dir")" + _env_script_path_expr="$(replace_home "$_env_script_path")" + fi + fi + if [ -z "${_install_dir:-}" ]; then + _install_layout="flat" + # Install to $HOME/.local/bin + if [ -n "${INFERRED_HOME:-}" ]; then + _install_dir="$INFERRED_HOME/.local/bin" + _lib_install_dir="$INFERRED_HOME/.local/bin" + _receipt_install_dir="$_install_dir" + _env_script_path="$INFERRED_HOME/.local/bin/env" + _install_dir_expr="$INFERRED_HOME_EXPRESSION/.local/bin" + _env_script_path_expr="$INFERRED_HOME_EXPRESSION/.local/bin/env" + fi + fi + + if [ -z "$_install_dir_expr" ]; then + err "could not find a valid path to install to!" + fi + + # Identical to the sh version, just with a .fish file extension + # We place it down here to wait until it's been assigned in every + # path. + _fish_env_script_path="${_env_script_path}.fish" + _fish_env_script_path_expr="${_env_script_path_expr}.fish" + + # Replace the temporary cargo home with the calculated one + RECEIPT=$(echo "$RECEIPT" | sed "s,AXO_INSTALL_PREFIX,$_receipt_install_dir,") + # Also replace the aliases with the arch-specific one + RECEIPT=$(echo "$RECEIPT" | sed "s'\"binary_aliases\":{}'\"binary_aliases\":$(json_binary_aliases "$_arch")'") + # And replace the install layout + RECEIPT=$(echo "$RECEIPT" | sed "s'\"install_layout\":\"unspecified\"'\"install_layout\":\"$_install_layout\"'") + if [ "$NO_MODIFY_PATH" = "1" ]; then + RECEIPT=$(echo "$RECEIPT" | sed "s'\"modify_path\":true'\"modify_path\":false'") + fi + + say "installing to $_install_dir" + ensure mkdir -p "$_install_dir" + ensure mkdir -p "$_lib_install_dir" + + # copy all the binaries to the install dir + local _src_dir="$1" + local _bins="$2" + local _libs="$3" + local _staticlibs="$4" + local _arch="$5" + for _bin_name in $_bins; do + local _bin="$_src_dir/$_bin_name" + ensure mv "$_bin" "$_install_dir" + # unzip seems to need this chmod + ensure chmod +x "$_install_dir/$_bin_name" + for _dest in $(aliases_for_binary "$_bin_name" "$_arch"); do + ln -sf "$_install_dir/$_bin_name" "$_install_dir/$_dest" + done + say " $_bin_name" + done + # Like the above, but no aliases + for _lib_name in $_libs; do + local _lib="$_src_dir/$_lib_name" + ensure mv "$_lib" "$_lib_install_dir" + # unzip seems to need this chmod + ensure chmod +x "$_lib_install_dir/$_lib_name" + say " $_lib_name" + done + for _lib_name in $_staticlibs; do + local _lib="$_src_dir/$_lib_name" + ensure mv "$_lib" "$_lib_install_dir" + # unzip seems to need this chmod + ensure chmod +x "$_lib_install_dir/$_lib_name" + say " $_lib_name" + done + + say "everything's installed!" + + # Avoid modifying the users PATH if they are managing their PATH manually + case :$PATH: + in *:$_install_dir:*) NO_MODIFY_PATH=1 ;; + *) ;; + esac + + if [ "0" = "$NO_MODIFY_PATH" ]; then + add_install_dir_to_ci_path "$_install_dir" + add_install_dir_to_path "$_install_dir_expr" "$_env_script_path" "$_env_script_path_expr" ".profile" "sh" + exit1=$? + shotgun_install_dir_to_path "$_install_dir_expr" "$_env_script_path" "$_env_script_path_expr" ".profile .bashrc .bash_profile .bash_login" "sh" + exit2=$? + add_install_dir_to_path "$_install_dir_expr" "$_env_script_path" "$_env_script_path_expr" ".zshrc .zshenv" "sh" + exit3=$? + # This path may not exist by default + ensure mkdir -p "$INFERRED_HOME/.config/fish/conf.d" + exit4=$? + add_install_dir_to_path "$_install_dir_expr" "$_fish_env_script_path" "$_fish_env_script_path_expr" ".config/fish/conf.d/$APP_NAME.env.fish" "fish" + exit5=$? + + if [ "${exit1:-0}" = 1 ] || [ "${exit2:-0}" = 1 ] || [ "${exit3:-0}" = 1 ] || [ "${exit4:-0}" = 1 ] || [ "${exit5:-0}" = 1 ]; then + say "" + say "To add $_install_dir_expr to your PATH, either restart your shell or run:" + say "" + say " source $_env_script_path_expr (sh, bash, zsh)" + say " source $_fish_env_script_path_expr (fish)" + fi + fi + + _shadowed_bins="$(check_for_shadowed_bins "$_install_dir" "$_bins")" + if [ -n "$_shadowed_bins" ]; then + warn "The following commands are shadowed by other commands in your PATH:$_shadowed_bins" + fi +} + +check_for_shadowed_bins() { + local _install_dir="$1" + local _bins="$2" + local _shadow + + for _bin_name in $_bins; do + _shadow="$(command -v "$_bin_name")" + if [ -n "$_shadow" ] && [ "$_shadow" != "$_install_dir/$_bin_name" ]; then + _shadowed_bins="$_shadowed_bins $_bin_name" + fi + done + + echo "$_shadowed_bins" +} + +print_home_for_script() { + local script="$1" + + local _home + case "$script" in + # zsh has a special ZDOTDIR directory, which if set + # should be considered instead of $HOME + .zsh*) + if [ -n "${ZDOTDIR:-}" ]; then + _home="$ZDOTDIR" + else + _home="$INFERRED_HOME" + fi + ;; + *) + _home="$INFERRED_HOME" + ;; + esac + + echo "$_home" +} + +add_install_dir_to_ci_path() { + # Attempt to do CI-specific rituals to get the install-dir on PATH faster + local _install_dir="$1" + + # If GITHUB_PATH is present, then write install_dir to the file it refs. + # After each GitHub Action, the contents will be added to PATH. + # So if you put a curl | sh for this script in its own "run" step, + # the next step will have this dir on PATH. + # + # Note that GITHUB_PATH will not resolve any variables, so we in fact + # want to write install_dir and not install_dir_expr + if [ -n "${GITHUB_PATH:-}" ]; then + ensure echo "$_install_dir" >> "$GITHUB_PATH" + fi +} + +add_install_dir_to_path() { + # Edit rcfiles ($HOME/.profile) to add install_dir to $PATH + # + # We do this slightly indirectly by creating an "env" shell script which checks if install_dir + # is on $PATH already, and prepends it if not. The actual line we then add to rcfiles + # is to just source that script. This allows us to blast it into lots of different rcfiles and + # have it run multiple times without causing problems. It's also specifically compatible + # with the system rustup uses, so that we don't conflict with it. + local _install_dir_expr="$1" + local _env_script_path="$2" + local _env_script_path_expr="$3" + local _rcfiles="$4" + local _shell="$5" + + if [ -n "${INFERRED_HOME:-}" ]; then + local _target + local _home + + # Find the first file in the array that exists and choose + # that as our target to write to + for _rcfile_relative in $_rcfiles; do + _home="$(print_home_for_script "$_rcfile_relative")" + local _rcfile="$_home/$_rcfile_relative" + + if [ -f "$_rcfile" ]; then + _target="$_rcfile" + break + fi + done + + # If we didn't find anything, pick the first entry in the + # list as the default to create and write to + if [ -z "${_target:-}" ]; then + local _rcfile_relative + _rcfile_relative="$(echo "$_rcfiles" | awk '{ print $1 }')" + _home="$(print_home_for_script "$_rcfile_relative")" + _target="$_home/$_rcfile_relative" + fi + + # `source x` is an alias for `. x`, and the latter is more portable/actually-posix. + # This apparently comes up a lot on freebsd. It's easy enough to always add + # the more robust line to rcfiles, but when telling the user to apply the change + # to their current shell ". x" is pretty easy to misread/miscopy, so we use the + # prettier "source x" line there. Hopefully people with Weird Shells are aware + # this is a thing and know to tweak it (or just restart their shell). + local _robust_line=". \"$_env_script_path_expr\"" + local _pretty_line="source \"$_env_script_path_expr\"" + + # Add the env script if it doesn't already exist + if [ ! -f "$_env_script_path" ]; then + say_verbose "creating $_env_script_path" + if [ "$_shell" = "sh" ]; then + write_env_script_sh "$_install_dir_expr" "$_env_script_path" + else + write_env_script_fish "$_install_dir_expr" "$_env_script_path" + fi + else + say_verbose "$_env_script_path already exists" + fi + + # Check if the line is already in the rcfile + # grep: 0 if matched, 1 if no match, and 2 if an error occurred + # + # Ideally we could use quiet grep (-q), but that makes "match" and "error" + # have the same behaviour, when we want "no match" and "error" to be the same + # (on error we want to create the file, which >> conveniently does) + # + # We search for both kinds of line here just to do the right thing in more cases. + if ! grep -F "$_robust_line" "$_target" > /dev/null 2>/dev/null && \ + ! grep -F "$_pretty_line" "$_target" > /dev/null 2>/dev/null + then + # If the script now exists, add the line to source it to the rcfile + # (This will also create the rcfile if it doesn't exist) + if [ -f "$_env_script_path" ]; then + local _line + # Fish has deprecated `.` as an alias for `source` and + # it will be removed in a later version. + # https://fishshell.com/docs/current/cmds/source.html + # By contrast, `.` is the traditional syntax in sh and + # `source` isn't always supported in all circumstances. + if [ "$_shell" = "fish" ]; then + _line="$_pretty_line" + else + _line="$_robust_line" + fi + say_verbose "adding $_line to $_target" + # prepend an extra newline in case the user's file is missing a trailing one + ensure echo "" >> "$_target" + ensure echo "$_line" >> "$_target" + return 1 + fi + else + say_verbose "$_install_dir already on PATH" + fi + fi +} + +shotgun_install_dir_to_path() { + # Edit rcfiles ($HOME/.profile) to add install_dir to $PATH + # (Shotgun edition - write to all provided files that exist rather than just the first) + local _install_dir_expr="$1" + local _env_script_path="$2" + local _env_script_path_expr="$3" + local _rcfiles="$4" + local _shell="$5" + + if [ -n "${INFERRED_HOME:-}" ]; then + local _found=false + local _home + + for _rcfile_relative in $_rcfiles; do + _home="$(print_home_for_script "$_rcfile_relative")" + local _rcfile_abs="$_home/$_rcfile_relative" + + if [ -f "$_rcfile_abs" ]; then + _found=true + add_install_dir_to_path "$_install_dir_expr" "$_env_script_path" "$_env_script_path_expr" "$_rcfile_relative" "$_shell" + fi + done + + # Fall through to previous "create + write to first file in list" behavior + if [ "$_found" = false ]; then + add_install_dir_to_path "$_install_dir_expr" "$_env_script_path" "$_env_script_path_expr" "$_rcfiles" "$_shell" + fi + fi +} + +write_env_script_sh() { + # write this env script to the given path (this cat/EOF stuff is a "heredoc" string) + local _install_dir_expr="$1" + local _env_script_path="$2" + ensure cat < "$_env_script_path" +#!/bin/sh +# add binaries to PATH if they aren't added yet +# affix colons on either side of \$PATH to simplify matching +case ":\${PATH}:" in + *:"$_install_dir_expr":*) + ;; + *) + # Prepending path in case a system-installed binary needs to be overridden + export PATH="$_install_dir_expr:\$PATH" + ;; +esac +EOF +} + +write_env_script_fish() { + # write this env script to the given path (this cat/EOF stuff is a "heredoc" string) + local _install_dir_expr="$1" + local _env_script_path="$2" + ensure cat < "$_env_script_path" +if not contains "$_install_dir_expr" \$PATH + # Prepending path in case a system-installed binary needs to be overridden + set -x PATH "$_install_dir_expr" \$PATH +end +EOF +} + +get_current_exe() { + # Returns the executable used for system architecture detection + # This is only run on Linux + local _current_exe + if test -L /proc/self/exe ; then + _current_exe=/proc/self/exe + else + warn "Unable to find /proc/self/exe. System architecture detection might be inaccurate." + if test -n "$SHELL" ; then + _current_exe=$SHELL + else + need_cmd /bin/sh + _current_exe=/bin/sh + fi + warn "Falling back to $_current_exe." + fi + echo "$_current_exe" +} + +get_bitness() { + need_cmd head + # Architecture detection without dependencies beyond coreutils. + # ELF files start out "\x7fELF", and the following byte is + # 0x01 for 32-bit and + # 0x02 for 64-bit. + # The printf builtin on some shells like dash only supports octal + # escape sequences, so we use those. + local _current_exe=$1 + local _current_exe_head + _current_exe_head=$(head -c 5 "$_current_exe") + if [ "$_current_exe_head" = "$(printf '\177ELF\001')" ]; then + echo 32 + elif [ "$_current_exe_head" = "$(printf '\177ELF\002')" ]; then + echo 64 + else + err "unknown platform bitness" + fi +} + +is_host_amd64_elf() { + local _current_exe=$1 + + need_cmd head + need_cmd tail + # ELF e_machine detection without dependencies beyond coreutils. + # Two-byte field at offset 0x12 indicates the CPU, + # but we're interested in it being 0x3E to indicate amd64, or not that. + local _current_exe_machine + _current_exe_machine=$(head -c 19 "$_current_exe" | tail -c 1) + [ "$_current_exe_machine" = "$(printf '\076')" ] +} + +get_endianness() { + local _current_exe=$1 + local cputype=$2 + local suffix_eb=$3 + local suffix_el=$4 + + # detect endianness without od/hexdump, like get_bitness() does. + need_cmd head + need_cmd tail + + local _current_exe_endianness + _current_exe_endianness="$(head -c 6 "$_current_exe" | tail -c 1)" + if [ "$_current_exe_endianness" = "$(printf '\001')" ]; then + echo "${cputype}${suffix_el}" + elif [ "$_current_exe_endianness" = "$(printf '\002')" ]; then + echo "${cputype}${suffix_eb}" + else + err "unknown platform endianness" + fi +} + +# Detect the Linux/LoongArch UAPI flavor, with all errors being non-fatal. +# Returns 0 or 234 in case of successful detection, 1 otherwise (/tmp being +# noexec, or other causes). +check_loongarch_uapi() { + need_cmd base64 + + local _tmp + if ! _tmp="$(ensure mktemp)"; then + return 1 + fi + + # Minimal Linux/LoongArch UAPI detection, exiting with 0 in case of + # upstream ("new world") UAPI, and 234 (-EINVAL truncated) in case of + # old-world (as deployed on several early commercial Linux distributions + # for LoongArch). + # + # See https://gist.github.com/xen0n/5ee04aaa6cecc5c7794b9a0c3b65fc7f for + # source to this helper binary. + ignore base64 -d > "$_tmp" <&1 | grep -q 'musl'; then + _clibtype="musl-dynamic" + else + # Assume all other linuxes are glibc (even if wrong, static libc fallback will apply) + _clibtype="gnu" + fi + fi + + if [ "$_ostype" = Darwin ]; then + # Darwin `uname -m` can lie due to Rosetta shenanigans. If you manage to + # invoke a native shell binary and then a native uname binary, you can + # get the real answer, but that's hard to ensure, so instead we use + # `sysctl` (which doesn't lie) to check for the actual architecture. + if [ "$_cputype" = i386 ]; then + # Handling i386 compatibility mode in older macOS versions (<10.15) + # running on x86_64-based Macs. + # Starting from 10.15, macOS explicitly bans all i386 binaries from running. + # See: + + # Avoid `sysctl: unknown oid` stderr output and/or non-zero exit code. + if sysctl hw.optional.x86_64 2> /dev/null || true | grep -q ': 1'; then + _cputype=x86_64 + fi + elif [ "$_cputype" = x86_64 ]; then + # Handling x86-64 compatibility mode (a.k.a. Rosetta 2) + # in newer macOS versions (>=11) running on arm64-based Macs. + # Rosetta 2 is built exclusively for x86-64 and cannot run i386 binaries. + + # Avoid `sysctl: unknown oid` stderr output and/or non-zero exit code. + if sysctl hw.optional.arm64 2> /dev/null || true | grep -q ': 1'; then + _cputype=arm64 + fi + fi + fi + + if [ "$_ostype" = SunOS ]; then + # Both Solaris and illumos presently announce as "SunOS" in "uname -s" + # so use "uname -o" to disambiguate. We use the full path to the + # system uname in case the user has coreutils uname first in PATH, + # which has historically sometimes printed the wrong value here. + if [ "$(/usr/bin/uname -o)" = illumos ]; then + _ostype=illumos + fi + + # illumos systems have multi-arch userlands, and "uname -m" reports the + # machine hardware name; e.g., "i86pc" on both 32- and 64-bit x86 + # systems. Check for the native (widest) instruction set on the + # running kernel: + if [ "$_cputype" = i86pc ]; then + _cputype="$(isainfo -n)" + fi + fi + + local _current_exe + case "$_ostype" in + + Android) + _ostype=linux-android + ;; + + Linux) + _current_exe=$(get_current_exe) + _ostype=unknown-linux-$_clibtype + _bitness=$(get_bitness "$_current_exe") + ;; + + FreeBSD) + _ostype=unknown-freebsd + ;; + + NetBSD) + _ostype=unknown-netbsd + ;; + + DragonFly) + _ostype=unknown-dragonfly + ;; + + Darwin) + _ostype=apple-darwin + ;; + + illumos) + _ostype=unknown-illumos + ;; + + MINGW* | MSYS* | CYGWIN* | Windows_NT) + _ostype=pc-windows-gnu + ;; + + *) + err "unrecognized OS type: $_ostype" + ;; + + esac + + case "$_cputype" in + + i386 | i486 | i686 | i786 | x86) + _cputype=i686 + ;; + + xscale | arm) + _cputype=arm + if [ "$_ostype" = "linux-android" ]; then + _ostype=linux-androideabi + fi + ;; + + armv6l) + _cputype=arm + if [ "$_ostype" = "linux-android" ]; then + _ostype=linux-androideabi + else + _ostype="${_ostype}eabihf" + fi + ;; + + armv7l | armv8l) + _cputype=armv7 + if [ "$_ostype" = "linux-android" ]; then + _ostype=linux-androideabi + else + _ostype="${_ostype}eabihf" + fi + ;; + + aarch64 | arm64) + _cputype=aarch64 + ;; + + x86_64 | x86-64 | x64 | amd64) + _cputype=x86_64 + ;; + + mips) + _cputype=$(get_endianness "$_current_exe" mips '' el) + ;; + + mips64) + if [ "$_bitness" -eq 64 ]; then + # only n64 ABI is supported for now + _ostype="${_ostype}abi64" + _cputype=$(get_endianness "$_current_exe" mips64 '' el) + fi + ;; + + ppc) + _cputype=powerpc + ;; + + ppc64) + _cputype=powerpc64 + ;; + + ppc64le) + _cputype=powerpc64le + ;; + + s390x) + _cputype=s390x + ;; + riscv64) + _cputype=riscv64gc + ;; + loongarch64) + _cputype=loongarch64 + ensure_loongarch_uapi + ;; + *) + err "unknown CPU type: $_cputype" + + esac + + # Detect 64-bit linux with 32-bit userland + if [ "${_ostype}" = unknown-linux-gnu ] && [ "${_bitness}" -eq 32 ]; then + case $_cputype in + x86_64) + # 32-bit executable for amd64 = x32 + if is_host_amd64_elf "$_current_exe"; then { + err "x32 linux unsupported" + }; else + _cputype=i686 + fi + ;; + mips64) + _cputype=$(get_endianness "$_current_exe" mips '' el) + ;; + powerpc64) + _cputype=powerpc + ;; + aarch64) + _cputype=armv7 + if [ "$_ostype" = "linux-android" ]; then + _ostype=linux-androideabi + else + _ostype="${_ostype}eabihf" + fi + ;; + riscv64gc) + err "riscv64 with 32-bit userland unsupported" + ;; + esac + fi + + # Detect armv7 but without the CPU features Rust needs in that build, + # and fall back to arm. + if [ "$_ostype" = "unknown-linux-gnueabihf" ] && [ "$_cputype" = armv7 ]; then + if ! (ensure grep '^Features' /proc/cpuinfo | grep -E -q 'neon|simd') ; then + # Either `/proc/cpuinfo` is malformed or unavailable, or + # at least one processor does not have NEON (which is asimd on armv8+). + _cputype=arm + fi + fi + + _arch="${_cputype}-${_ostype}" + + RETVAL="$_arch" +} + +say() { + if [ "0" = "$PRINT_QUIET" ]; then + echo "$1" + fi +} + +say_verbose() { + if [ "1" = "$PRINT_VERBOSE" ]; then + echo "$1" + fi +} + +warn() { + if [ "0" = "$PRINT_QUIET" ]; then + local red + local reset + red=$(tput setaf 1 2>/dev/null || echo '') + reset=$(tput sgr0 2>/dev/null || echo '') + say "${red}WARN${reset}: $1" >&2 + fi +} + +err() { + if [ "0" = "$PRINT_QUIET" ]; then + local red + local reset + red=$(tput setaf 1 2>/dev/null || echo '') + reset=$(tput sgr0 2>/dev/null || echo '') + say "${red}ERROR${reset}: $1" >&2 + fi + exit 1 +} + +need_cmd() { + if ! check_cmd "$1" + then err "need '$1' (command not found)" + fi +} + +check_cmd() { + command -v "$1" > /dev/null 2>&1 + return $? +} + +assert_nz() { + if [ -z "$1" ]; then err "assert_nz $2"; fi +} + +# Run a command that should never fail. If the command fails execution +# will immediately terminate with an error showing the failing +# command. +ensure() { + if ! "$@"; then err "command failed: $*"; fi +} + +# This is just for indicating that commands' results are being +# intentionally ignored. Usually, because it's being executed +# as part of error handling. +ignore() { + "$@" +} + +# This wraps curl or wget. Try curl first, if not installed, +# use wget instead. +downloader() { + # Check if we have a broken snap curl + # https://github.com/boukendesho/curl-snap/issues/1 + _snap_curl=0 + if command -v curl > /dev/null 2>&1; then + _curl_path=$(command -v curl) + if echo "$_curl_path" | grep "/snap/" > /dev/null 2>&1; then + _snap_curl=1 + fi + fi + + # Check if we have a working (non-snap) curl + if check_cmd curl && [ "$_snap_curl" = "0" ] + then _dld=curl + # Try wget for both no curl and the broken snap curl + elif check_cmd wget + then _dld=wget + # If we can't fall back from broken snap curl to wget, report the broken snap curl + elif [ "$_snap_curl" = "1" ] + then + say "curl installed with snap cannot be used to install $APP_NAME" + say "due to missing permissions. Please uninstall it and" + say "reinstall curl with a different package manager (e.g., apt)." + say "See https://github.com/boukendesho/curl-snap/issues/1" + exit 1 + else _dld='curl or wget' # to be used in error message of need_cmd + fi + + if [ "$1" = --check ] + then need_cmd "$_dld" + elif [ "$_dld" = curl ]; then + if [ -n "${AUTH_TOKEN:-}" ]; then + curl -sSfL --header "Authorization: Bearer ${AUTH_TOKEN}" "$1" -o "$2" + else + curl -sSfL "$1" -o "$2" + fi + elif [ "$_dld" = wget ]; then + if [ -n "${AUTH_TOKEN:-}" ]; then + wget --header "Authorization: Bearer ${AUTH_TOKEN}" "$1" -O "$2" + else + wget "$1" -O "$2" + fi + else err "Unknown downloader" # should not reach here + fi +} + +verify_checksum() { + local _file="$1" + local _checksum_style="$2" + local _checksum_value="$3" + local _calculated_checksum + + if [ -z "$_checksum_value" ]; then + return 0 + fi + case "$_checksum_style" in + sha256) + if ! check_cmd sha256sum; then + say "skipping sha256 checksum verification (it requires the 'sha256sum' command)" + return 0 + fi + _calculated_checksum="$(sha256sum -b "$_file" | awk '{printf $1}')" + ;; + sha512) + if ! check_cmd sha512sum; then + say "skipping sha512 checksum verification (it requires the 'sha512sum' command)" + return 0 + fi + _calculated_checksum="$(sha512sum -b "$_file" | awk '{printf $1}')" + ;; + sha3-256) + if ! check_cmd openssl; then + say "skipping sha3-256 checksum verification (it requires the 'openssl' command)" + return 0 + fi + _calculated_checksum="$(openssl dgst -sha3-256 "$_file" | awk '{printf $NF}')" + ;; + sha3-512) + if ! check_cmd openssl; then + say "skipping sha3-512 checksum verification (it requires the 'openssl' command)" + return 0 + fi + _calculated_checksum="$(openssl dgst -sha3-512 "$_file" | awk '{printf $NF}')" + ;; + blake2s) + if ! check_cmd b2sum; then + say "skipping blake2s checksum verification (it requires the 'b2sum' command)" + return 0 + fi + # Test if we have official b2sum with blake2s support + local _well_known_blake2s_checksum="93314a61f470985a40f8da62df10ba0546dc5216e1d45847bf1dbaa42a0e97af" + local _test_blake2s + _test_blake2s="$(printf "can do blake2s" | b2sum -a blake2s | awk '{printf $1}')" || _test_blake2s="" + + if [ "X$_test_blake2s" = "X$_well_known_blake2s_checksum" ]; then + _calculated_checksum="$(b2sum -a blake2s "$_file" | awk '{printf $1}')" || _calculated_checksum="" + else + say "skipping blake2s checksum verification (installed b2sum doesn't support blake2s)" + return 0 + fi + ;; + blake2b) + if ! check_cmd b2sum; then + say "skipping blake2b checksum verification (it requires the 'b2sum' command)" + return 0 + fi + _calculated_checksum="$(b2sum "$_file" | awk '{printf $1}')" + ;; + false) + ;; + *) + say "skipping unknown checksum style: $_checksum_style" + return 0 + ;; + esac + + if [ "$_calculated_checksum" != "$_checksum_value" ]; then + err "checksum mismatch + want: $_checksum_value + got: $_calculated_checksum" + fi +} + +download_binary_and_run_installer "$@" || exit 1