Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions .evergreen/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ echo "Begin compile process"
_cxxflags=""

: "${CONFIGURE_ONLY:=}"
: "${LIBMONGOCRYPT_BUILD_TYPE:=RelWithDebInfo}"

if [ "$OS_NAME" = "windows" ]; then
# Enable exception handling for MSVC
Expand All @@ -38,8 +39,6 @@ if [ "$MACOS_UNIVERSAL" = "ON" ]; then
ADDITIONAL_CMAKE_FLAGS="$ADDITIONAL_CMAKE_FLAGS -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64'"
fi

: "${CMAKE:=cmake}"

for suffix in "dll" "dylib" "so"; do
cand="$(abspath "$LIBMONGOCRYPT_DIR/../mongocrypt_v1.$suffix")"
if test -f "$cand"; then
Expand All @@ -56,7 +55,7 @@ common_cmake_args=(
-DCMAKE_C_FLAGS="$LIBMONGOCRYPT_EXTRA_CFLAGS"
-DCMAKE_CXX_FLAGS="$LIBMONGOCRYPT_EXTRA_CFLAGS $_cxxflags"
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_BUILD_TYPE="$LIBMONGOCRYPT_BUILD_TYPE"
-H"$LIBMONGOCRYPT_DIR"
-B"$build_dir"
)
Expand All @@ -81,10 +80,10 @@ if [ "$CONFIGURE_ONLY" ]; then
exit 0;
fi
echo "Installing libmongocrypt"
run_cmake --build "$build_dir" --target install --config RelWithDebInfo
run_cmake --build "$build_dir" --target test-mongocrypt --config RelWithDebInfo
run_cmake --build "$build_dir" --target test_kms_request --config RelWithDebInfo
run_chdir "$build_dir" run_ctest -C RelWithDebInfo
run_cmake --build "$build_dir" --target install --config "$LIBMONGOCRYPT_BUILD_TYPE"
run_cmake --build "$build_dir" --target test-mongocrypt --config "$LIBMONGOCRYPT_BUILD_TYPE"
run_cmake --build "$build_dir" --target test_kms_request --config "$LIBMONGOCRYPT_BUILD_TYPE"
run_chdir "$build_dir" run_ctest -C "$LIBMONGOCRYPT_BUILD_TYPE"

# MONGOCRYPT-372, ensure macOS universal builds contain both x86_64 and arm64 architectures.
if [ "$MACOS_UNIVERSAL" = "ON" ]; then
Expand Down Expand Up @@ -114,9 +113,9 @@ run_cmake \
-DCMAKE_INSTALL_PREFIX="$MONGOCRYPT_INSTALL_PREFIX/nocrypto" \
"${common_cmake_args[@]}"

run_cmake --build "$build_dir" --target install --config RelWithDebInfo
run_cmake --build "$build_dir" --target test-mongocrypt --config RelWithDebInfo
run_chdir "$build_dir" run_ctest -C RelWithDebInfo
run_cmake --build "$build_dir" --target install --config "$LIBMONGOCRYPT_BUILD_TYPE"
run_cmake --build "$build_dir" --target test-mongocrypt --config "$LIBMONGOCRYPT_BUILD_TYPE"
run_chdir "$build_dir" run_ctest -C "$LIBMONGOCRYPT_BUILD_TYPE"

# Build and install libmongocrypt without statically linking libbson
run_cmake \
Expand All @@ -125,5 +124,5 @@ run_cmake \
-DCMAKE_INSTALL_PREFIX="$MONGOCRYPT_INSTALL_PREFIX/sharedbson" \
"${common_cmake_args[@]}"

run_cmake --build "$build_dir" --target install --config RelWithDebInfo
run_chdir "$build_dir" run_ctest -C RelWithDebInfo
run_cmake --build "$build_dir" --target install --config "$LIBMONGOCRYPT_BUILD_TYPE"
run_chdir "$build_dir" run_ctest -C "$LIBMONGOCRYPT_BUILD_TYPE"