Skip to content

Commit 1d317aa

Browse files
committed
squash
1 parent cd9542c commit 1d317aa

File tree

12 files changed

+618
-523
lines changed

12 files changed

+618
-523
lines changed

.evergreen/compile.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ case "$OS" in
4949
;;
5050
esac
5151

52+
5253
cd build
53-
"${cmake_binary}" -G "$GENERATOR" "-DCMAKE_BUILD_TYPE=${BUILD_TYPE}" -DMONGOCXX_ENABLE_SLOW_TESTS=ON -DENABLE_UNINSTALL=ON "$@" ..
54+
"${cmake_binary}" -G "$GENERATOR" "-DCMAKE_BUILD_TYPE=${BUILD_TYPE}" -DENABLE_TESTS=ON -DMONGOCXX_ENABLE_SLOW_TESTS=ON -DENABLE_UNINSTALL=ON "$@" ..
5455
"${cmake_binary}" --build . --config $BUILD_TYPE -- $CMAKE_BUILD_OPTS
5556
"${cmake_binary}" --build . --config $BUILD_TYPE --target install -- $CMAKE_BUILD_OPTS
5657
"${cmake_binary}" --build . --config $BUILD_TYPE --target $CMAKE_EXAMPLES_TARGET -- $CMAKE_BUILD_OPTS

.mci.yml

Lines changed: 71 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,17 @@ functions:
283283
add_expansions_to_env: true
284284
script: mongo-cxx-driver/.evergreen/install_c_driver.sh
285285

286+
# This function may be used to fetch CI scripts in the C driver
287+
"fetch_c_driver_source":
288+
- command: shell.exec
289+
params:
290+
shell: bash
291+
working_dir: "."
292+
script: |
293+
set -o errexit
294+
set -o pipefail
295+
git clone --depth 1 https://github.com/mongodb/mongo-c-driver mongoc
296+
286297
"lint":
287298
- command: shell.exec
288299
params:
@@ -832,45 +843,48 @@ tasks:
832843
- name: clang-tidy
833844
commands:
834845
- func: "setup"
835-
- func: "install_c_driver"
846+
- func: "fetch_c_driver_source"
836847
- func: "compile"
837848
- func: "clang-tidy"
838849

839850
- name: compile_and_test_with_shared_libs
840851
commands:
841852
- func: "setup"
842853
- func: "start_mongod"
843-
- func: "install_c_driver"
854+
- func: "fetch_c_driver_source"
844855
- func: "compile"
845856
vars:
846857
RUN_DISTCHECK: 1
847858
- func: "clone_drivers-evergreen-tools"
848859
- func: "run_kms_servers"
860+
- func: "install_c_driver"
849861
- func: "test"
850862

851863
- name: compile_and_test_with_shared_libs_extra_alignment
852864
commands:
853865
- func: "setup"
854866
- func: "start_mongod"
855-
- func: "install_c_driver"
867+
- func: "fetch_c_driver_source"
856868
vars:
857869
BSON_EXTRA_ALIGNMENT: 1
858870
- func: "compile"
859871
- func: "clone_drivers-evergreen-tools"
860872
- func: "run_kms_servers"
873+
- func: "install_c_driver"
861874
- func: "test"
862875

863876
- name: compile_and_test_with_shared_libs_cxx20
864877
commands:
865878
- func: "setup"
866879
- func: "start_mongod"
867-
- func: "install_c_driver"
880+
- func: "fetch_c_driver_source"
868881
- func: "compile"
869882
vars:
870883
RUN_DISTCHECK: 1
871884
REQUIRED_CXX_STANDARD: 20
872885
- func: "clone_drivers-evergreen-tools"
873886
- func: "run_kms_servers"
887+
- func: "install_c_driver"
874888
- func: "test"
875889
vars:
876890
REQUIRED_CXX_STANDARD: 20
@@ -880,14 +894,15 @@ tasks:
880894
commands:
881895
- func: "setup"
882896
- func: "start_mongod"
883-
- func: "install_c_driver"
897+
- func: "fetch_c_driver_source"
884898
vars:
885899
BSON_EXTRA_ALIGNMENT: 1
886900
- func: "compile"
887901
vars:
888902
REQUIRED_CXX_STANDARD: 20
889903
- func: "clone_drivers-evergreen-tools"
890904
- func: "run_kms_servers"
905+
- func: "install_c_driver"
891906
- func: "test"
892907
vars:
893908
REQUIRED_CXX_STANDARD: 20
@@ -897,13 +912,13 @@ tasks:
897912
commands:
898913
- func: "setup"
899914
- func: "start_mongod"
900-
- func: "install_c_driver"
915+
- func: "fetch_c_driver_source"
901916
- func: "compile"
902917

903918
- name: compile_without_tests
904919
commands:
905920
- func: "setup"
906-
- func: "install_c_driver"
921+
- func: "fetch_c_driver_source"
907922
- func: "compile"
908923
vars:
909924
ENABLE_TESTS: OFF
@@ -914,7 +929,7 @@ tasks:
914929
- func: "start_mongod"
915930
vars:
916931
AUTH: auth
917-
- func: "install_c_driver"
932+
- func: "fetch_c_driver_source"
918933
- func: "compile"
919934
- func: "test auth"
920935
- func: "test atlas connectivity"
@@ -923,13 +938,14 @@ tasks:
923938
commands:
924939
- func: "setup"
925940
- func: "start_mongod"
926-
- func: "install_c_driver"
941+
- func: "fetch_c_driver_source"
927942
- func: "compile"
928943
vars:
929944
USE_STATIC_LIBS: 1
930945
RUN_DISTCHECK: 1
931946
- func: "clone_drivers-evergreen-tools"
932947
- func: "run_kms_servers"
948+
- func: "install_c_driver"
933949
- func: "test"
934950
vars:
935951
USE_STATIC_LIBS: 1
@@ -938,19 +954,39 @@ tasks:
938954
commands:
939955
- func: "setup"
940956
- func: "start_mongod"
941-
- func: "install_c_driver"
957+
- func: "fetch_c_driver_source"
942958
vars:
943959
BSON_EXTRA_ALIGNMENT: 1
944960
- func: "compile"
945961
vars:
946962
USE_STATIC_LIBS: 1
947963
- func: "clone_drivers-evergreen-tools"
948964
- func: "run_kms_servers"
965+
- func: "install_c_driver"
949966
- func: "test"
950967
vars:
951968
USE_STATIC_LIBS: 1
952969

953970
- name: compile_and_test_with_shared_libs_replica_set
971+
commands:
972+
- func: "setup"
973+
- func: "start_mongod"
974+
vars:
975+
TOPOLOGY: "replica_set"
976+
- func: "fetch_c_driver_source"
977+
- func: "compile"
978+
vars:
979+
RUN_DISTCHECK: 1
980+
- func: "clone_drivers-evergreen-tools"
981+
- func: "run_kms_servers"
982+
- func: "install_c_driver"
983+
- func: "test"
984+
985+
# Auto downloading the C driver in the C++ build does not currently include
986+
# support for libmongocrypt, therefore it is not configured with
987+
# -DENABLE_CLIENT_SIDE_ENCRYPTION=ON. For now, CSFLE tests will need to have
988+
# a manually configured C driver, hence the need to seperate this task.
989+
- name: compile_and_test_with_shared_libs_replica_set_with_libmongocrypt
954990
commands:
955991
- func: "setup"
956992
- func: "start_mongod"
@@ -967,7 +1003,7 @@ tasks:
9671003
- name: uninstall_check
9681004
commands:
9691005
- func: "setup"
970-
- func: "install_c_driver"
1006+
- func: "fetch_c_driver_source"
9711007
- func: "compile"
9721008
- command: expansions.update
9731009
params:
@@ -987,7 +1023,7 @@ tasks:
9871023
- name: uninstall_check_windows
9881024
commands:
9891025
- func: "setup"
990-
- func: "install_c_driver"
1026+
- func: "fetch_c_driver_source"
9911027
- func: "compile"
9921028
- command: expansions.update
9931029
params:
@@ -1023,7 +1059,7 @@ tasks:
10231059
export CMAKE="$(find_cmake_latest)"
10241060
cd build
10251061
$CMAKE ..
1026-
$CMAKE --build . -- -j 8
1062+
$CMAKE --build . -- -j $(nproc)
10271063
./hello_mongocxx
10281064
10291065
- name: debian-package-build
@@ -1098,7 +1134,7 @@ tasks:
10981134
- name: test_mongohouse
10991135
commands:
11001136
- func: "setup"
1101-
- func: "install_c_driver"
1137+
- func: "fetch_c_driver_source"
11021138
- func: "compile"
11031139
- func: "build_mongohouse"
11041140
- func: "run_mongohouse"
@@ -1113,7 +1149,7 @@ tasks:
11131149
# Authentication with versioned API should already be tested
11141150
# in the C driver.
11151151
AUTH: noauth
1116-
- func: "install_c_driver"
1152+
- func: "fetch_c_driver_source"
11171153
- func: "compile"
11181154
- func: "clone_drivers-evergreen-tools"
11191155
- func: "run_kms_servers"
@@ -1128,7 +1164,7 @@ tasks:
11281164
vars:
11291165
ORCHESTRATION_FILE: versioned-api-testing.json
11301166
AUTH: noauth
1131-
- func: "install_c_driver"
1167+
- func: "fetch_c_driver_source"
11321168
- func: "compile"
11331169
- func: "clone_drivers-evergreen-tools"
11341170
- func: "run_kms_servers"
@@ -1220,7 +1256,7 @@ buildvariants:
12201256
matrix_spec: {os: "ubuntu-1804", mongodb_version: "*"}
12211257
display_name: "${os} replica set (MongoDB ${mongodb_version})"
12221258
tasks:
1223-
- name: compile_and_test_with_shared_libs_replica_set
1259+
- name: compile_and_test_with_shared_libs_replica_set_with_libmongocrypt
12241260

12251261
- matrix_name: "auth"
12261262
matrix_spec: {os: "*", mongodb_version: "latest"}
@@ -1265,7 +1301,7 @@ buildvariants:
12651301
- name: compile_and_test_with_shared_libs_extra_alignment_cxx20
12661302
- name: compile_and_test_with_static_libs
12671303
- name: compile_and_test_with_static_libs_extra_alignment
1268-
- name: compile_and_test_with_shared_libs_replica_set
1304+
- name: compile_and_test_with_shared_libs_replica_set_with_libmongocrypt
12691305
- name: build_example_with_add_subdirectory
12701306
distros:
12711307
- rhel90-large
@@ -1288,7 +1324,7 @@ buildvariants:
12881324
- name: compile_and_test_with_shared_libs_extra_alignment_cxx20
12891325
- name: compile_and_test_with_static_libs
12901326
- name: compile_and_test_with_static_libs_extra_alignment
1291-
- name: compile_and_test_with_shared_libs_replica_set
1327+
- name: compile_and_test_with_shared_libs_replica_set_with_libmongocrypt
12921328
- name: build_example_with_add_subdirectory
12931329
distros:
12941330
- rhel90-arm64-large
@@ -1310,7 +1346,7 @@ buildvariants:
13101346
- name: compile_and_test_with_shared_libs_extra_alignment_cxx20
13111347
- name: compile_and_test_with_static_libs
13121348
- name: compile_and_test_with_static_libs_extra_alignment
1313-
- name: compile_and_test_with_shared_libs_replica_set
1349+
- name: compile_and_test_with_shared_libs_replica_set_with_libmongocrypt
13141350
- name: build_example_with_add_subdirectory
13151351
distros:
13161352
- debian11-large
@@ -1354,7 +1390,7 @@ buildvariants:
13541390
- name: compile_and_test_with_shared_libs_extra_alignment
13551391
- name: compile_and_test_with_static_libs
13561392
- name: compile_and_test_with_static_libs_extra_alignment
1357-
- name: compile_and_test_with_shared_libs_replica_set
1393+
- name: compile_and_test_with_shared_libs_replica_set_with_libmongocrypt
13581394
- name: build_example_with_add_subdirectory
13591395
distros:
13601396
- debian10-large
@@ -1381,6 +1417,18 @@ buildvariants:
13811417
- debian10-large
13821418
- name: uninstall_check
13831419

1420+
# Add matrix for specification test requirement of mongocryptd:
1421+
# "Drivers MUST run all tests with mongocryptd on at least one platform for all tested server versions (4.2+)."
1422+
- matrix_name: "mongocryptd"
1423+
matrix_spec:
1424+
os: "ubuntu-1804"
1425+
mongodb_version: ["4.2", "4.4", "5.0", "latest"]
1426+
display_name: "${os} (MongoDB ${mongodb_version}) with mongocryptd"
1427+
tasks:
1428+
- name: compile_and_test_with_shared_libs_replica_set_with_libmongocrypt
1429+
expansions:
1430+
use_mongocryptd: true
1431+
13841432
- name: ubuntu2004-release-latest
13851433
display_name: "Ubuntu 20.04 Release (MongoDB Latest)"
13861434
expansions:
@@ -1396,7 +1444,7 @@ buildvariants:
13961444
- name: compile_and_test_with_shared_libs_extra_alignment
13971445
- name: compile_and_test_with_static_libs
13981446
- name: compile_and_test_with_static_libs_extra_alignment
1399-
- name: compile_and_test_with_shared_libs_replica_set
1447+
- name: compile_and_test_with_shared_libs_replica_set_with_libmongocrypt
14001448
- name: build_example_with_add_subdirectory
14011449
distros:
14021450
- ubuntu2004-large
@@ -1439,7 +1487,7 @@ buildvariants:
14391487
- name: compile_and_test_with_shared_libs_extra_alignment
14401488
- name: compile_and_test_with_static_libs
14411489
- name: compile_and_test_with_static_libs_extra_alignment
1442-
- name: compile_and_test_with_shared_libs_replica_set
1490+
- name: compile_and_test_with_shared_libs_replica_set_with_libmongocrypt
14431491
- name: build_example_with_add_subdirectory
14441492
distros:
14451493
- ubuntu1804-build

0 commit comments

Comments
 (0)