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.
Note: As exception to my regular PRs, don't look at individual commits in isolation, they are bad.
This is a draft proposal for reworking of the CI engine build for feedback before I polish it.
Build environment
There are 2 separate build images, one for Windows, one for Linux. The docker images are built as part of separate workflow and stored in the github package repository (will look like this), not in cache like previous version. The images are relatively small ~300-400MiB and building them takes 2-3 minutes (no mxe).
Each of the image contains a complete required build environment with all dependencies installed (including mingwlibs etc) and configured for proper resolution from engine CMake configuration.
The build step is then a platform agnostic invocation of CMake with generic release build configuration.
To sum up, there is a separation:
Optimization
The various scripts, based on existing ones, were tuned to maximize parallelism and leverage some faster methods:
Workers
The GitHub actions that compile the engine are configured to use custom https://namespace.so/ runners: This is yet to be configured to work in engine repo. The workers use high performance new EPYC processors so full build using 8 cores takes only ~13 minutes. In case there are plenty ccache hits, the build, packaging, upload takes ~2 minutes.
namespace uses a cache architecture where cache volumes are just mounted in the machine, which allows for instant restore, but, it means that cache/fresh cache is not available for next runs that are scheduled on a different compute node, even when namespace tries to perform cache aware scheduling. I'm not sure if this will be the most efficient cache for engine builds yet given high cost of cache hit/stale cache (need to rebuild way more), so I'm still evaluating it in my fork: https://github.com/p2004a/spring/actions