Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Windows target support to CI pipeline #722

Open
tustanivsky opened this issue Jan 2, 2025 · 1 comment
Open

Add Windows target support to CI pipeline #722

tustanivsky opened this issue Jan 2, 2025 · 1 comment

Comments

@tustanivsky
Copy link
Collaborator

Windows is a primary target platform for the Sentry Unreal Engine SDK and as part of the ongoing efforts to improve the existing CI pipeline (tracked in #575) we need to ensure that it’s fully supported. This will also help maintain reliability and streamline development workflows for Windows-specific features and bug fixes.

There’s no straightforward way to setup Unreal Engine on the standard GitHub runner as the Epic Games Launcher cannot be used for this purpose within the CI environment. Therefore, we need to either create Docker images with Unreal Engine pre-installed or identify a way to access pre-built engine binaries for manual installation.

Outlined below are several approaches to consider (each with its own benefits and limitations) that could help achieve this.

Docker for Unreal Engine

Official docker images

Epic Games provides official Docker images for UE that can be categorized into two types: runtime and development (see Overview of Containers in Unreal Engine).

Runtime Images:

The Windows runtime images include only the dependencies needed to run packaged Unreal Engine projects. While these images are useful for tasks like running smoke tests they are not suitable for building the plugin because they lack the required engine’s development tools and libraries.

Development Images:

Development images contain the full toolset required for building and testing Unreal Engine plugins and projects. However, these images are currently available only for Linux. We are already utilizing Linux-based development images in our CI pipeline but the lack of Windows equivalent presents a significant challenge for supporting this target platform and there's no clear timeline when it might be released.

ue4-docker project

An alternative solution is the ue4-docker project which provides Dockerfiles for building both Linux and Windows images. The accompanying documentation (ue4-docker Docs) comprehensively outlines the process of building these images and common pitfalls.

Key considerations for integrating ue4-docker into Sentry’s plugin CI pipeline:

  • To comply with the Unreal Engine EULA any Docker images produced using ue4-docker must remain private. This is important to keep in mind when distributing these images via Sentry's GitHub Package Registry or any other platform.
  • Standard GitHub runners may lack sufficient disk space to handle the creation of large Docker images. Larger runners with additional storage will likely be required to accommodate the build process.

Using Pre-Built Unreal Engine

Offline Installer

Epic Games provides an Unreal Engine offline installer accessible by request through their Developer Portal. This installer has a command-line interface making it suitable for CI environments and offering flexibility in selecting which engine modules to install. Additionally, it could enable support for Mac as the offline installer is available for that platform as well.

Pull Pre-Built Engine from Cloud Storage

We can build Unreal Engine from source locally and upload the pre-built binaries to cloud storage. These binaries can then be downloaded during CI workflows. A similar approach is used in Cesium for Unreal which demonstrates its feasibility. Like the offline installer this approach could also enable Mac support.

Other options

Building the Unreal Engine directly in CI is also possible but it is not a practical approach due to the substantial disk space requirements and extended build times. Integrating this step into the existing pipeline would add significant complexity and is unlikely to be a reasonable solution.

@tustanivsky
Copy link
Collaborator Author

tustanivsky commented Jan 8, 2025

In order to proceed with building UE Windows docker images in CI some additional repo configuration will be required:

  • Docker images along with the temporary files generated during their build process occupy a significant amount of disk space. Therefore, a larger runner is necessary - one with 300 GB of storage should be sufficient (GitHub Actions larger runners specifications).
  • During the Docker image build process ue4-docker tool needs to pull Unreal Engine sources from GitHub. To authenticate with the corresponding repository and pull these sources we need a valid username and Personal Access Token (PAT) that has read:repo and write:packages scopes to invoke the following command:
ue4-docker build --basetag ltsc2019 --visual-studio 2019 --target minimal --exclude debug --exclude templates --username=${{ secrets.SOME_USERNAME }} --password=${{ secrets.SOME_TOKEN }} 4.27.0

UPD: Large Windows runner was added with the name windows-latest-4-cores.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants