@@ -283,6 +283,18 @@ functions:
283
283
add_expansions_to_env : true
284
284
script : mongo-cxx-driver/.evergreen/install_c_driver.sh
285
285
286
+ # fetch_c_driver_source may be used to fetch the C driver source without installing the C driver.
287
+ # This can be used when only CI scripts are needed.
288
+ " fetch_c_driver_source " :
289
+ - command : shell.exec
290
+ params :
291
+ shell : bash
292
+ working_dir : " ."
293
+ script : |
294
+ set -o errexit
295
+ set -o pipefail
296
+ git clone --depth 1 https://github.com/mongodb/mongo-c-driver mongoc
297
+
286
298
" lint " :
287
299
- command : shell.exec
288
300
params :
@@ -832,45 +844,49 @@ tasks:
832
844
- name : clang-tidy
833
845
commands :
834
846
- func : " setup"
835
- - func : " install_c_driver "
847
+ - func : " fetch_c_driver_source "
836
848
- func : " compile"
837
849
- func : " clang-tidy"
838
850
839
851
- name : compile_and_test_with_shared_libs
840
852
commands :
841
853
- func : " setup"
842
854
- func : " start_mongod"
843
- - func : " install_c_driver "
855
+ - func : " fetch_c_driver_source "
844
856
- func : " compile"
845
857
vars :
846
858
RUN_DISTCHECK : 1
847
859
- func : " clone_drivers-evergreen-tools"
848
860
- func : " run_kms_servers"
861
+ # Call "install_c_driver" before "test" to build static C driver libraries. Example projects require static C driver libraries.
862
+ - func : " install_c_driver"
849
863
- func : " test"
850
864
851
865
- name : compile_and_test_with_shared_libs_extra_alignment
852
866
commands :
853
867
- func : " setup"
854
868
- func : " start_mongod"
855
- - func : " install_c_driver "
869
+ - func : " fetch_c_driver_source "
856
870
vars :
857
871
BSON_EXTRA_ALIGNMENT : 1
858
872
- func : " compile"
859
873
- func : " clone_drivers-evergreen-tools"
860
874
- func : " run_kms_servers"
875
+ - func : " install_c_driver"
861
876
- func : " test"
862
877
863
878
- name : compile_and_test_with_shared_libs_cxx20
864
879
commands :
865
880
- func : " setup"
866
881
- func : " start_mongod"
867
- - func : " install_c_driver "
882
+ - func : " fetch_c_driver_source "
868
883
- func : " compile"
869
884
vars :
870
885
RUN_DISTCHECK : 1
871
886
REQUIRED_CXX_STANDARD : 20
872
887
- func : " clone_drivers-evergreen-tools"
873
888
- func : " run_kms_servers"
889
+ - func : " install_c_driver"
874
890
- func : " test"
875
891
vars :
876
892
REQUIRED_CXX_STANDARD : 20
@@ -880,14 +896,15 @@ tasks:
880
896
commands :
881
897
- func : " setup"
882
898
- func : " start_mongod"
883
- - func : " install_c_driver "
899
+ - func : " fetch_c_driver_source "
884
900
vars :
885
901
BSON_EXTRA_ALIGNMENT : 1
886
902
- func : " compile"
887
903
vars :
888
904
REQUIRED_CXX_STANDARD : 20
889
905
- func : " clone_drivers-evergreen-tools"
890
906
- func : " run_kms_servers"
907
+ - func : " install_c_driver"
891
908
- func : " test"
892
909
vars :
893
910
REQUIRED_CXX_STANDARD : 20
@@ -897,13 +914,13 @@ tasks:
897
914
commands :
898
915
- func : " setup"
899
916
- func : " start_mongod"
900
- - func : " install_c_driver "
917
+ - func : " fetch_c_driver_source "
901
918
- func : " compile"
902
919
903
920
- name : compile_without_tests
904
921
commands :
905
922
- func : " setup"
906
- - func : " install_c_driver "
923
+ - func : " fetch_c_driver_source "
907
924
- func : " compile"
908
925
vars :
909
926
ENABLE_TESTS : OFF
@@ -914,7 +931,7 @@ tasks:
914
931
- func : " start_mongod"
915
932
vars :
916
933
AUTH : auth
917
- - func : " install_c_driver "
934
+ - func : " fetch_c_driver_source "
918
935
- func : " compile"
919
936
- func : " test auth"
920
937
- func : " test atlas connectivity"
@@ -923,13 +940,14 @@ tasks:
923
940
commands :
924
941
- func : " setup"
925
942
- func : " start_mongod"
926
- - func : " install_c_driver "
943
+ - func : " fetch_c_driver_source "
927
944
- func : " compile"
928
945
vars :
929
946
USE_STATIC_LIBS : 1
930
947
RUN_DISTCHECK : 1
931
948
- func : " clone_drivers-evergreen-tools"
932
949
- func : " run_kms_servers"
950
+ - func : " install_c_driver"
933
951
- func : " test"
934
952
vars :
935
953
USE_STATIC_LIBS : 1
@@ -938,19 +956,39 @@ tasks:
938
956
commands :
939
957
- func : " setup"
940
958
- func : " start_mongod"
941
- - func : " install_c_driver "
959
+ - func : " fetch_c_driver_source "
942
960
vars :
943
961
BSON_EXTRA_ALIGNMENT : 1
944
962
- func : " compile"
945
963
vars :
946
964
USE_STATIC_LIBS : 1
947
965
- func : " clone_drivers-evergreen-tools"
948
966
- func : " run_kms_servers"
967
+ - func : " install_c_driver"
949
968
- func : " test"
950
969
vars :
951
970
USE_STATIC_LIBS : 1
952
971
953
972
- name : compile_and_test_with_shared_libs_replica_set
973
+ commands :
974
+ - func : " setup"
975
+ - func : " start_mongod"
976
+ vars :
977
+ TOPOLOGY : " replica_set"
978
+ - func : " fetch_c_driver_source"
979
+ - func : " compile"
980
+ vars :
981
+ RUN_DISTCHECK : 1
982
+ - func : " clone_drivers-evergreen-tools"
983
+ - func : " run_kms_servers"
984
+ - func : " install_c_driver"
985
+ - func : " test"
986
+
987
+ # Auto downloading the C driver in the C++ build does not currently include
988
+ # support for libmongocrypt, therefore it is not configured with
989
+ # -DENABLE_CLIENT_SIDE_ENCRYPTION=ON. For now, CSFLE tests will need to have
990
+ # a manually configured C driver, hence the need to seperate this task.
991
+ - name : compile_and_test_with_shared_libs_replica_set_with_libmongocrypt
954
992
commands :
955
993
- func : " setup"
956
994
- func : " start_mongod"
@@ -967,7 +1005,7 @@ tasks:
967
1005
- name : uninstall_check
968
1006
commands :
969
1007
- func : " setup"
970
- - func : " install_c_driver "
1008
+ - func : " fetch_c_driver_source "
971
1009
- func : " compile"
972
1010
- command : expansions.update
973
1011
params :
@@ -987,7 +1025,7 @@ tasks:
987
1025
- name : uninstall_check_windows
988
1026
commands :
989
1027
- func : " setup"
990
- - func : " install_c_driver "
1028
+ - func : " fetch_c_driver_source "
991
1029
- func : " compile"
992
1030
- command : expansions.update
993
1031
params :
@@ -1023,7 +1061,7 @@ tasks:
1023
1061
export CMAKE="$(find_cmake_latest)"
1024
1062
cd build
1025
1063
$CMAKE ..
1026
- $CMAKE --build . -- -j 8
1064
+ $CMAKE --build . -- -j $(nproc)
1027
1065
./hello_mongocxx
1028
1066
1029
1067
- name : debian-package-build
@@ -1098,7 +1136,7 @@ tasks:
1098
1136
- name : test_mongohouse
1099
1137
commands :
1100
1138
- func : " setup"
1101
- - func : " install_c_driver "
1139
+ - func : " fetch_c_driver_source "
1102
1140
- func : " compile"
1103
1141
- func : " build_mongohouse"
1104
1142
- func : " run_mongohouse"
@@ -1113,7 +1151,7 @@ tasks:
1113
1151
# Authentication with versioned API should already be tested
1114
1152
# in the C driver.
1115
1153
AUTH : noauth
1116
- - func : " install_c_driver "
1154
+ - func : " fetch_c_driver_source "
1117
1155
- func : " compile"
1118
1156
- func : " clone_drivers-evergreen-tools"
1119
1157
- func : " run_kms_servers"
@@ -1128,7 +1166,7 @@ tasks:
1128
1166
vars :
1129
1167
ORCHESTRATION_FILE : versioned-api-testing.json
1130
1168
AUTH : noauth
1131
- - func : " install_c_driver "
1169
+ - func : " fetch_c_driver_source "
1132
1170
- func : " compile"
1133
1171
- func : " clone_drivers-evergreen-tools"
1134
1172
- func : " run_kms_servers"
@@ -1220,7 +1258,7 @@ buildvariants:
1220
1258
matrix_spec : {os: "ubuntu-1804", mongodb_version: "*"}
1221
1259
display_name : " ${os} replica set (MongoDB ${mongodb_version})"
1222
1260
tasks :
1223
- - name : compile_and_test_with_shared_libs_replica_set
1261
+ - name : compile_and_test_with_shared_libs_replica_set_with_libmongocrypt
1224
1262
1225
1263
- matrix_name : " auth"
1226
1264
matrix_spec : {os: "*", mongodb_version: "latest"}
@@ -1265,7 +1303,7 @@ buildvariants:
1265
1303
- name : compile_and_test_with_shared_libs_extra_alignment_cxx20
1266
1304
- name : compile_and_test_with_static_libs
1267
1305
- name : compile_and_test_with_static_libs_extra_alignment
1268
- - name : compile_and_test_with_shared_libs_replica_set
1306
+ - name : compile_and_test_with_shared_libs_replica_set_with_libmongocrypt
1269
1307
- name : build_example_with_add_subdirectory
1270
1308
distros :
1271
1309
- rhel90-large
@@ -1288,7 +1326,7 @@ buildvariants:
1288
1326
- name : compile_and_test_with_shared_libs_extra_alignment_cxx20
1289
1327
- name : compile_and_test_with_static_libs
1290
1328
- name : compile_and_test_with_static_libs_extra_alignment
1291
- - name : compile_and_test_with_shared_libs_replica_set
1329
+ - name : compile_and_test_with_shared_libs_replica_set_with_libmongocrypt
1292
1330
- name : build_example_with_add_subdirectory
1293
1331
distros :
1294
1332
- rhel90-arm64-large
@@ -1310,7 +1348,7 @@ buildvariants:
1310
1348
- name : compile_and_test_with_shared_libs_extra_alignment_cxx20
1311
1349
- name : compile_and_test_with_static_libs
1312
1350
- name : compile_and_test_with_static_libs_extra_alignment
1313
- - name : compile_and_test_with_shared_libs_replica_set
1351
+ - name : compile_and_test_with_shared_libs_replica_set_with_libmongocrypt
1314
1352
- name : build_example_with_add_subdirectory
1315
1353
distros :
1316
1354
- debian11-large
@@ -1354,7 +1392,7 @@ buildvariants:
1354
1392
- name : compile_and_test_with_shared_libs_extra_alignment
1355
1393
- name : compile_and_test_with_static_libs
1356
1394
- name : compile_and_test_with_static_libs_extra_alignment
1357
- - name : compile_and_test_with_shared_libs_replica_set
1395
+ - name : compile_and_test_with_shared_libs_replica_set_with_libmongocrypt
1358
1396
- name : build_example_with_add_subdirectory
1359
1397
distros :
1360
1398
- debian10-large
@@ -1381,6 +1419,18 @@ buildvariants:
1381
1419
- debian10-large
1382
1420
- name : uninstall_check
1383
1421
1422
+ # Add matrix for specification test requirement of mongocryptd:
1423
+ # "Drivers MUST run all tests with mongocryptd on at least one platform for all tested server versions (4.2+)."
1424
+ - matrix_name : " mongocryptd"
1425
+ matrix_spec :
1426
+ os : " ubuntu-1804"
1427
+ mongodb_version : ["4.2", "4.4", "5.0", "latest"]
1428
+ display_name : " ${os} (MongoDB ${mongodb_version}) with mongocryptd"
1429
+ tasks :
1430
+ - name : compile_and_test_with_shared_libs_replica_set_with_libmongocrypt
1431
+ expansions :
1432
+ use_mongocryptd : true
1433
+
1384
1434
- name : ubuntu2004-release-latest
1385
1435
display_name : " Ubuntu 20.04 Release (MongoDB Latest)"
1386
1436
expansions :
@@ -1396,7 +1446,7 @@ buildvariants:
1396
1446
- name : compile_and_test_with_shared_libs_extra_alignment
1397
1447
- name : compile_and_test_with_static_libs
1398
1448
- name : compile_and_test_with_static_libs_extra_alignment
1399
- - name : compile_and_test_with_shared_libs_replica_set
1449
+ - name : compile_and_test_with_shared_libs_replica_set_with_libmongocrypt
1400
1450
- name : build_example_with_add_subdirectory
1401
1451
distros :
1402
1452
- ubuntu2004-large
@@ -1439,7 +1489,7 @@ buildvariants:
1439
1489
- name : compile_and_test_with_shared_libs_extra_alignment
1440
1490
- name : compile_and_test_with_static_libs
1441
1491
- name : compile_and_test_with_static_libs_extra_alignment
1442
- - name : compile_and_test_with_shared_libs_replica_set
1492
+ - name : compile_and_test_with_shared_libs_replica_set_with_libmongocrypt
1443
1493
- name : build_example_with_add_subdirectory
1444
1494
distros :
1445
1495
- ubuntu1804-build
0 commit comments