@@ -175,6 +175,11 @@ functions:
175175 git clone [email protected] :mongodb-labs/drivers-evergreen-tools.git 176176 fi
177177 cd drivers-evergreen-tools
178+ # The legacy shell is only present in server 5.0 builds and earlier,
179+ # but there is no 5.0 build for RHEL9, so we have to avoid it
180+ if [[ "${build_variant}" =~ "rhel9" ]]; then
181+ export SKIP_LEGACY_SHELL=1
182+ fi
178183 export DRIVERS_TOOLS=$(pwd)
179184 if [ "Windows_NT" == "$OS" ]; then
180185 export DRIVERS_TOOLS=$(cygpath -m $DRIVERS_TOOLS)
@@ -351,6 +356,7 @@ functions:
351356 params :
352357 shell : bash
353358 working_dir : " mongo-cxx-driver"
359+ include_expansions_in_env : ["distro_id"]
354360 script : |
355361 set -o errexit
356362 set -o pipefail
@@ -367,13 +373,20 @@ functions:
367373 ADDL_OPTS="$ADDL_OPTS -DENABLE_TESTS=OFF"
368374 fi
369375
376+ if [[ -n "${REQUIRED_CXX_STANDARD}" ]]; then
377+ ADDL_OPTS="$ADDL_OPTS -DCMAKE_CXX_STANDARD=${REQUIRED_CXX_STANDARD} -DCMAKE_CXX_STANDARD_REQUIRED=ON"
378+ fi
379+
370380 MONGOC_PREFIX="$(pwd)/../mongoc"
371381 echo "MONGOC_PREFIX=$MONGOC_PREFIX"
372382
373- if [ "Windows_NT " == "$OS" ]; then
383+ if [[ "$OSTYPE " =~ cygwin ] ]; then
374384 MONGOC_PREFIX=$(cygpath -m "$MONGOC_PREFIX")
375385 fi
376- export CMAKE=${cmake}
386+ . "$MONGOC_PREFIX/.evergreen/scripts/find-cmake-latest.sh"
387+ declare cmake_binary
388+ export cmake_binary="$(find_cmake_latest)"
389+ command -v "$cmake_binary"
377390
378391 if [ ! -d ../drivers-evergreen-tools ]; then
379392 git clone --depth 1 [email protected] :mongodb-labs/drivers-evergreen-tools.git ../drivers-evergreen-tools @@ -398,14 +411,15 @@ functions:
398411 params :
399412 shell : bash
400413 working_dir : " mongo-cxx-driver"
414+ include_expansions_in_env : ["distro_id"]
401415 script : |
402416 set -o errexit
403417 set -o pipefail
404418
405419 # Grabs the mongocryptd path
406420 pushd ..
407421 export MONGOCRYPTD_PATH=$(pwd)/
408- if [ "Windows_NT " == "$OS" ]; then
422+ if [[ "$OSTYPE " =~ cygwin ] ]; then
409423 export MONGOCRYPTD_PATH=$(cygpath -m $MONGOCRYPTD_PATH)
410424 fi
411425 popd # ..
@@ -453,7 +467,7 @@ functions:
453467
454468 pushd ../../drivers-evergreen-tools
455469 export DRIVERS_TOOLS=$(pwd)
456- if [ "Windows_NT " == "$OS" ]; then
470+ if [[ "$OSTYPE " =~ cygwin ] ]; then
457471 export DRIVERS_TOOLS=$(cygpath -m $DRIVERS_TOOLS)
458472 fi
459473 popd # ../../drivers-evergreen-tools
@@ -514,7 +528,7 @@ functions:
514528 register_ca_cert() {
515529 local OS=$(uname -s | tr '[:upper:]' '[:lower:]')
516530 echo "register_ca_cert: OS: $OS"
517- case "$OS " in
531+ case "$OSTYPE " in
518532 cygwin*)
519533 certutil.exe -addstore "Root" "$DRIVERS_TOOLS\.evergreen\x509gen\ca.pem"
520534 ;;
@@ -559,7 +573,7 @@ functions:
559573 echo "Waiting for mock KMS servers to start... done."
560574 fi
561575
562- if [ "Windows_NT " == "$OS" ]; then
576+ if [[ "$OSTYPE " =~ cygwin ] ]; then
563577 CTEST_OUTPUT_ON_FAILURE=1 MSBuild.exe /p:Configuration=${build_type} /verbosity:minimal RUN_TESTS.vcxproj
564578 # Only run examples if MONGODB_API_VERSION is unset. We do not append
565579 # API version to example clients, so examples will fail when requireApiVersion
@@ -660,8 +674,7 @@ functions:
660674 export CC="${example_projects_cc}"
661675 export CXX="${example_projects_cxx}"
662676 export CXX_STANDARD="${example_projects_cxx_standard}"
663- export CMAKE=${cmake}
664- if [ "Windows_NT" == "$OS" ]; then
677+ if [[ "$OSTYPE" =~ cygwin ]]; then
665678 export MSVC=1
666679 elif [ "$(uname -s | tr '[:upper:]' '[:lower:]')" == "darwin" ]; then
667680 export DYLD_LIBRARY_PATH="$(pwd)/build/install/lib:$DYLD_LIBRARY_PATH"
@@ -680,6 +693,10 @@ functions:
680693 # is true.
681694 if [[ -z "$MONGODB_API_VERSION" ]]; then
682695 echo "Building example projects..."
696+ . "$PREFIX/.evergreen/scripts/find-cmake-latest.sh"
697+ declare cmake_binary
698+ export cmake_binary="$(find_cmake_latest)"
699+ command -v "$cmake_binary"
683700 .evergreen/build_example_projects.sh
684701 echo "Building example projects... done."
685702 fi
@@ -839,6 +856,39 @@ tasks:
839856 - func : " run_kms_servers"
840857 - func : " test"
841858
859+ - name : compile_and_test_with_shared_libs_cxx20
860+ commands :
861+ - func : " setup"
862+ - func : " start_mongod"
863+ - func : " install_c_driver"
864+ - func : " compile"
865+ vars :
866+ RUN_DISTCHECK : 1
867+ REQUIRED_CXX_STANDARD : 20
868+ - func : " clone_drivers-evergreen-tools"
869+ - func : " run_kms_servers"
870+ - func : " test"
871+ vars :
872+ REQUIRED_CXX_STANDARD : 20
873+ example_projects_cxx_standard : 20
874+
875+ - name : compile_and_test_with_shared_libs_extra_alignment_cxx20
876+ commands :
877+ - func : " setup"
878+ - func : " start_mongod"
879+ - func : " install_c_driver"
880+ vars :
881+ BSON_EXTRA_ALIGNMENT : 1
882+ - func : " compile"
883+ vars :
884+ REQUIRED_CXX_STANDARD : 20
885+ - func : " clone_drivers-evergreen-tools"
886+ - func : " run_kms_servers"
887+ - func : " test"
888+ vars :
889+ REQUIRED_CXX_STANDARD : 20
890+ example_projects_cxx_standard : 20
891+
842892 - name : compile_with_shared_libs
843893 commands :
844894 - func : " setup"
@@ -1171,6 +1221,52 @@ buildvariants:
11711221 # ######################################
11721222 # Linux Buildvariants #
11731223 # ######################################
1224+ - name : rhel9-release-latest
1225+ display_name : " RHEL 9 Release (MongoDB Latest)"
1226+ expansions :
1227+ build_type : " Release"
1228+ tar_options : *linux_tar_options
1229+ extra_path : *linux_extra_path
1230+ cmake_flags : *linux_cmake_flags
1231+ mongodb_version : *version_latest
1232+ lib_dir : " lib64"
1233+ run_on :
1234+ - rhel90-large
1235+ tasks :
1236+ - name : compile_and_test_with_shared_libs
1237+ - name : compile_and_test_with_shared_libs_extra_alignment
1238+ - name : compile_and_test_with_shared_libs_cxx20
1239+ - name : compile_and_test_with_shared_libs_extra_alignment_cxx20
1240+ - name : compile_and_test_with_static_libs
1241+ - name : compile_and_test_with_static_libs_extra_alignment
1242+ - name : compile_and_test_with_shared_libs_replica_set
1243+ - name : build_example_with_add_subdirectory
1244+ distros :
1245+ - rhel90-large
1246+
1247+ - name : arm-rhel9-release-latest
1248+ display_name : " arm64 RHEL 9 Release (MongoDB Latest)"
1249+ expansions :
1250+ build_type : " Release"
1251+ tar_options : *linux_tar_options
1252+ extra_path : *linux_extra_path
1253+ cmake_flags : *linux_cmake_flags
1254+ mongodb_version : *version_latest
1255+ lib_dir : " lib64"
1256+ run_on :
1257+ - rhel90-arm64-large
1258+ tasks :
1259+ - name : compile_and_test_with_shared_libs
1260+ - name : compile_and_test_with_shared_libs_extra_alignment
1261+ - name : compile_and_test_with_shared_libs_cxx20
1262+ - name : compile_and_test_with_shared_libs_extra_alignment_cxx20
1263+ - name : compile_and_test_with_static_libs
1264+ - name : compile_and_test_with_static_libs_extra_alignment
1265+ - name : compile_and_test_with_shared_libs_replica_set
1266+ - name : build_example_with_add_subdirectory
1267+ distros :
1268+ - rhel90-arm64-large
1269+
11741270 - name : debian11-release-latest
11751271 display_name : " Debian 11 Release (MongoDB Latest)"
11761272 expansions :
@@ -1184,6 +1280,8 @@ buildvariants:
11841280 tasks :
11851281 - name : compile_and_test_with_shared_libs
11861282 - name : compile_and_test_with_shared_libs_extra_alignment
1283+ - name : compile_and_test_with_shared_libs_cxx20
1284+ - name : compile_and_test_with_shared_libs_extra_alignment_cxx20
11871285 - name : compile_and_test_with_static_libs
11881286 - name : compile_and_test_with_static_libs_extra_alignment
11891287 - name : compile_and_test_with_shared_libs_replica_set
@@ -1205,6 +1303,8 @@ buildvariants:
12051303 tasks :
12061304 - name : compile_and_test_with_shared_libs
12071305 - name : compile_and_test_with_shared_libs_extra_alignment
1306+ - name : compile_and_test_with_shared_libs_cxx20
1307+ - name : compile_and_test_with_shared_libs_extra_alignment_cxx20
12081308 - name : compile_and_test_with_static_libs
12091309 - name : compile_and_test_with_static_libs_extra_alignment
12101310 - name : compile_and_test_with_shared_libs_replica_set
0 commit comments