Add 'uet cmake' command to distribute CMake-based builds over UBA #34
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 adds a
uet cmake
command which can be used to distribute CMake-based builds with the Unreal Build Accelerator and Kubernetes. This is mostly useful to rapidly build the Clang compiler.Running
uet cmake --help
will also give you the "how to use it" information described below.Prerequisites
Before you can distribute builds, you must configure your BuildConfiguration.xml file located at
%appdata%\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml
with the settings to connect to the Kubernetes cluster. The Kubernetes cluster must have Windows nodes in it. You can use RKM (https://src.redpoint.games/redpointgames/rkm) to spin up a Kubernetes cluster with Windows nodes with a single command.The 'Smb' settings specify a network share that all Windows nodes can access as the specified user. The Unreal Build Accelerator will be copied to this share and the containers will copy from this network share.
Your
kubectl
configuration must be connected to the cluster already, as per the 'Context' setting. You can get the context name by runningkubectl config get-contexts
. The 'Namespace' setting specifies what Kubernetes namespace to launch UBA agents into.Using it
To distribute builds, you must first generate your CMake project using:
You should omit
-G
; this command will automatically select the Ninja project generator which is required to distribute builds.Once you've generated your project, you can distribute the build using:
NOTE: You must use Unreal Engine 5.4 at this time. Refer to #112 which tracks Unreal Engine 5.5 support.
The presence of
--build
in the CMake arguments is what this tool uses to determine whether CMake is generating project files or running the build. You only need to specify-e
as an argument to this command when running the build; it is not necessary during generation.All arguments past the
--
are forwarded to CMake intact. CMake must be on yourPATH
or installed as part of Visual Studio 2022 Community in it's default installation location.