game-ci / game-ci/unity-builder
Cache the build target directory to enable Incremental building for faster build
- Dominant language
- TypeScript
- Stars
- 1.1k
- Forks
- 313
- Avg merge
- 1h 39m
- Merged PRs (30d)
- 1
Description
**Context**
Unity has this incremental building for IL2CPP that allow faster build:
> Use incremental building
>
> When using incremental building, the C++ compiler only recompiles files that have changed since the last build. To use incremental building, build your project to a previous build location (without deleting the target directory).
So in Unity 2021, after an APK finished building, it generates some additional folders in the build target directory: `(file name)_BackUpThisFolder_ButDontShipItWithYourGame` and `(file name)_BurstDebugInformation_DoNotShip`. In subsequent build, if Unity builds to the same directory that contains files from the previous build (the APK and the 2 ...DoNotShip folders), the incremental build will only recompile files that have changed, resulting in much faster build.
**Suggested solution**
Please add the features that cache build directory in addition to caching the Library folder.
**Considered alternatives**
I don't have enough knowledge about CI to make my own solution yet.
**Additional details**
https://docs.unity3d.com/2020.1/Documentation/Manual/IL2CPP-OptimizingBuildTimes.html
Contributor guide
Research direction
No file or test is named. Start by locating the existing Library-folder cache configuration and compare it with Unity's IL2CPP incremental build guidance; determine how the build target directory can persist between builds. Done means a subsequent build reuses the cached target directory and benefits from incremental compilation without shipping temporary folders.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, typescript
- Domain
- build-system, ci-cd
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100