Update Earthfile to use uvx cmake #2083
Open
+137
−165
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR replaces
find-cmake-latest.sh
withuvx cmake
for Earthly tasks. To supportuvx cmake
, this PR also updates the Earthfile to migrate away from old/EOL/unsupported operating systems. A followup PR will migrate the rest of the EVG configuration to useuv
to obtain preferred build tools as done in mongodb/mongo-cxx-driver#1428.First, concerning the current Earthfile, the following operating system versions are removed due to being EOL:
Note
Although we do not have our own platform support policy document, both Evergreen and Server do not include "Extended Security Maintenance" mode in their range of support. Therefore, I do not think we should include them either.
These EOL versions are replaced with a full set of up-to-date and supported versions for their respective OS: up to Alpine Linux 3.22, Ubuntu 24.04, and CentOS Stream 10 (more on this below).
Second, to avoid the need to copy mongo-c-driver scripts into the Earthly environment, to better test OS compatibility, and to take advantage of Earthly containerization, the OS package managers are used to acquire
uv
instead of auv-installer.sh
script (which will be needed by EVG tasks). This led to some complications with usingsnap
/systemd
in containers, wheresnap
is typically the OS-recommended alternative to obtain a missing or newer package than what is available via the system package manager. However,pipx
is available as the second uv-recommended method to installuv
(aftercurl | sh
) on all relevant distros as a system package (whenuv
itself is not available via the system package manager), and so it is used instead when needed.Third, Red Hat apparently ended support for CentOS in 2024 in favor of CentOS Stream (confusingly not the same thing as CentOS, but more or less its equivalent successor). Red Hat strongly recommends against continuing to use CentOS as it is "now exposed to significant risks". As part of this migration, official OCI images for CentOS Stream are now provided via quay.io rather than DockerHub. Therefore, the CentOS Stream images are specified using fully-qualified image names to
quay.io
instead of using$default_search_registry
(at this time, the DevProd-provided Amazon ECR instance does not seem to support pull-through caching ofquay.io
images, only DockerHub images).This PR also includes a drive-by addition of a
-Wpoison-system-directories
suppression with Apple Clang for thepublic-header-warnings
target:This warning is strange. I do not know why the changes in this PR (or the upcoming PR to apply
uv
to EVG scripts, I forget which) seem to trigger this warning. According to this comment, it may be related to the implicit use of the--sysroot
flag on recent versions of macOS...? (There is no explicit--sysroot
flag in the compilation command above.) We are definitely not attempting any cross-compilation in our macOS EVG tasks (that I am aware of), so I've opted to treat this as a false-positive and disabled it.