chore: Custom GitHub runner image with Unreal docker pre-installed - #1340
Conversation
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Bug Fixes 🐛
Internal Changes 🔧Deps
Other
Other
🤖 This preview updates automatically when you update the PR. |
4880a84 to
c6300ce
Compare
b1c447a to
8c5dfb4
Compare
Removed snapshot specification for the create-image job.
…roid platform files
…nreal into chore/custom-ue-image
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f4a303d. Configure here.
Jeffreyhung
left a comment
There was a problem hiding this comment.
I will recommend using environments for the image creation workflow, and add additional approval requirements to minimize the risk and limit who can execute the workflows.
As GitHub flagged, if not protected properly custom image creation can be dangerous on public repos.
|
@Jeffreyhung As you suggested, we added GitHub environment configuration for this repo to enforce main-branch protection and required reviewers for the image creation workflow. |

This PR adds custom GitHub runner image generation workflows aimed at reducing CI times. Instead of pulling large Unreal Engine Docker images at the beginning of every job, they are pre-pulled and baked into reusable runner snapshots. As a result, build/test checks can start with the required Docker images already available locally, eliminating image download time and reducing network-related variability.
Custom Image Generation
Three dedicated, single-purpose image-builder workflows are introduced, each producing its own named snapshot:
custom-image-windows.ymlunreal-image-windowsunreal-image-creating-runner-windowscustom-image-linux.ymlunreal-image-linuxunreal-image-creating-runner-linuxcustom-image-android.ymlunreal-image-androidunreal-image-creating-runner-linuxEach workflow runs on
workflow_dispatchand a weekly schedule. During execution it:Custom image generation runner specs:
The set of Unreal Engine versions included in the pre-built images is constrained by the available disk space on the image-generation runners. Priority is given to the three latest engine versions, while UE 4.27 is retained to maintain backward compatibility.
Runners that consume custom images (belong to
Large Runners for GDXgroup):windows-latest-unrealubuntu-latest-unrealandroid-latest-unrealBuild Time Optimization
As Unreal sample project packaging now becomes the primary contributor to CI execution time, the following optimizations were introduced to improve its performance:
-UBTArgs="-AllCores").Benchmarks
Per-platform build time comparison before and after integrating custom GitHub runner images and implementing the CI optimizations described above.
Windows
Linux
Android
Estimated Cost
Based on the average build times above, the per-platform test matrix consumes approximately 290 minutes of runner time and costs an estimated $8.16/run ($2.35 Linux + $3.37 Windows + $2.44 Android) on 8-core runners (rates: $0.022/min Linux & Android, $0.042/min Windows - confirm against Actions runner pricing).
In order to further reduce CI execution time and compute costs, the following optimizations were applied:
cancel-in-progressfor pull request workflows, ensuring that in-flight jobs are automatically canceled when newer commits are pushed to the same PR. Workflows running onmainand release branches continue to run to completion regardless of subsequent commits.mainandreleasebranch workflows.With these changes in place, the pull-request test matrix (the most common execution path) drops to approximately 190 minutes of runner time, an estimated $5.44/run ($1.26 Linux + $2.68 Windows + $1.50 Android).
Other Considerations
sentry-unrealis a public repository with access to the image generation runners. If this ever become a security concern these workflows can be moved to a private one.#skip-changelog