Skip to content

Commit 01341de

Browse files
Use new CMake in more build tasks
Several build tasks still relied on older find-cmake logic. With the new CMake changes, a more recent CMake version is required. These tasks and scripts have been updated to use the same logic to find the same CMake version as is used in the main build tasks.
1 parent c98ba95 commit 01341de

File tree

6 files changed

+22
-12
lines changed

6 files changed

+22
-12
lines changed

.evergreen/config_generator/components/make_release_archive.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class ReleaseArchive(Function):
2323
script='''\
2424
set -o errexit
2525
bash tools/poetry.sh install --with=docs
26+
export distro_id=${distro_id} # Needed by find-cmake-latest.sh
2627
bash tools/poetry.sh run \
2728
bash .evergreen/scripts/check-release-archive.sh
2829
'''

.evergreen/generated_configs/functions.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ functions:
284284
- |
285285
set -o errexit
286286
bash tools/poetry.sh install --with=docs
287+
export distro_id=${distro_id} # Needed by find-cmake-latest.sh
287288
bash tools/poetry.sh run bash .evergreen/scripts/check-release-archive.sh
288289
run-mock-kms-servers:
289290
- command: subprocess.exec

.evergreen/generated_configs/legacy-config.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1719,10 +1719,13 @@ tasks:
17191719
script: |-
17201720
set -o errexit
17211721
# Compile test-awsauth. Disable unnecessary dependencies since test-awsauth is copied to a remote Ubuntu 18.04 ECS cluster for testing, which may not have all dependent libraries.
1722-
. .evergreen/scripts/find-cmake.sh
1722+
set -euo pipefail
1723+
distro_id="${distro_id}" # Needed by find-cmake-latest.sh
1724+
. .evergreen/scripts/find-cmake-latest.sh
1725+
cmake=$(find_cmake_latest)
17231726
export CC='${CC}'
1724-
$CMAKE -DENABLE_SASL=OFF -DENABLE_SNAPPY=OFF -DENABLE_ZSTD=OFF -DENABLE_CLIENT_SIDE_ENCRYPTION=OFF .
1725-
$CMAKE --build . --target test-awsauth
1727+
"$cmake" -DENABLE_SASL=OFF -DENABLE_SNAPPY=OFF -DENABLE_ZSTD=OFF -DENABLE_CLIENT_SIDE_ENCRYPTION=OFF .
1728+
"$cmake" --build . --target test-awsauth
17261729
- func: upload-build
17271730
- name: test-aws-openssl-regular-latest
17281731
depends_on:

.evergreen/legacy_config_generator/evergreen_config_lib/tasks.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -899,11 +899,14 @@ def do_is_valid_combination(self) -> bool:
899899
shell_mongoc(
900900
"""
901901
# Compile test-awsauth. Disable unnecessary dependencies since test-awsauth is copied to a remote Ubuntu 18.04 ECS cluster for testing, which may not have all dependent libraries.
902-
. .evergreen/scripts/find-cmake.sh
902+
set -euo pipefail
903+
distro_id="${distro_id}" # Needed by find-cmake-latest.sh
904+
. .evergreen/scripts/find-cmake-latest.sh
905+
cmake=$(find_cmake_latest)
903906
export CC='${CC}'
904-
$CMAKE -DENABLE_SASL=OFF -DENABLE_SNAPPY=OFF -DENABLE_ZSTD=OFF -DENABLE_CLIENT_SIDE_ENCRYPTION=OFF .
905-
$CMAKE --build . --target test-awsauth
906-
"""
907+
"$cmake" -DENABLE_SASL=OFF -DENABLE_SNAPPY=OFF -DENABLE_ZSTD=OFF -DENABLE_CLIENT_SIDE_ENCRYPTION=OFF .
908+
"$cmake" --build . --target test-awsauth
909+
""",
907910
),
908911
func("upload-build"),
909912
],

.evergreen/scripts/check-release-archive.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ grep "á" NEWS > /dev/null || (echo "NEWS file appears to have lost its UTF-8 en
88
type sphinx-build
99
sphinx-build --version
1010

11-
DIR=$(dirname $0)
12-
. $DIR/find-cmake.sh
11+
DIR=$(dirname "$0")
12+
. "$DIR/find-cmake-latest.sh"
13+
CMAKE=$(find_cmake_latest)
1314

1415
python build/calc_release_version.py >VERSION_CURRENT
1516
python build/calc_release_version.py -p >VERSION_RELEASED

.evergreen/scripts/compile-openssl-static.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,11 @@ if [[ "${OSTYPE}" == darwin* && "${HOSTTYPE}" == "arm64" ]]; then
9090
configure_flags_append "-DCMAKE_OSX_ARCHITECTURES=arm64"
9191
fi
9292

93-
# Ensure find-cmake.sh is sourced *before* add-build-dirs-to-paths.sh
93+
# Ensure find-cmake-latest.sh is sourced *before* add-build-dirs-to-paths.sh
9494
# to avoid interfering with potential CMake build configuration.
95-
# shellcheck source=.evergreen/scripts/find-cmake.sh
96-
. "${script_dir}/find-cmake.sh" # ${CMAKE}
95+
# shellcheck source=.evergreen/scripts/find-cmake-latest.sh
96+
. "${script_dir}/find-cmake-latest.sh" # ${CMAKE}
97+
CMAKE=$(find_cmake_latest)
9798

9899
# shellcheck source=.evergreen/scripts/add-build-dirs-to-paths.sh
99100
. "${script_dir}/add-build-dirs-to-paths.sh"

0 commit comments

Comments
 (0)