GhaUnityBuildReporter is a Unity package that automatically reflects build report in GitHub Job Summary when building with Unity on GitHub Actions.
This package is inspired by Unity-Technologies/BuildReportInspector.
Warning
This is in a very early stage of development. Please use with caution.
GhaUnityBuildReporter specifically reflects the following information in the Job Summary.
- Basic Info
- Build Steps
- Source Assets (Hidden by default)
- Output Files (Hidden by default)
- Included Modules
Source Assets and Output Files are hidden by default.
The display settings for each item can be configured in ProjectSettings.
Note
Items with no information to display are hidden. For example, if the Scripting Backend is Mono instead of IL2CPP, Included Modules will be hidden.
The entire build report is also output to Logs/BuildReport.json
.
The basic information about the build.
Item | Description |
---|---|
Platform | The platform that the build was created for. |
Total Time | The total time taken by the build process. |
Total Size | The total size of the build output. |
Build Result | The outcome of the build. |
Total Errors | The total number of errors and exceptions recorded during the build process. |
Total Warnings | The total number of warnings recorded during the build process. |
All build steps and the duration of each step and the messages output within the step.
Each emoji corresponds to the following LogType.
Emoji | LogType |
---|---|
❌ | Error |
🚫 | Assert |
Warning | |
ℹ️ | Log |
💥 | Exception |
❓ | Unknown |
Information on all assets used in the build.
File paths output during the build and their sizes.
The names of the native engine module included in the build and the reasons the module was included in the build.
Because all the processing is done in Unity post-processing, the setup is basically completed by simply adding GhaUnityBuildReporter to the Unity project by following the steps below;
- Open the Package Manager in the UnityEditor.
- Select the
+
button in the upper left corner. - Select Add package from git URL.
- Enter https://github.com/VeyronSakai/GhaUnityBuildReporter.git#0.3 and Select Add button.
It can also be installed by downloading .unitypackage from Releases.
Warning
The Workflow file of GitHub Actions basically does not need to be changed, but if you use Docker to build Unity, you must copy the files at $GITHUB_STEP_SUMMARY
in the Docker container to the path at $GITHUB_STEP_SUMMARY
on the host machine after building with Unity.
Perhaps there is a Workflow or Job for which you would like to disable GhaUnityBuildReporter.
In such cases, setting the environment variable GHA_UNITY_BUILD_REPORTER_OPTOUT
to 1
or true
will disable GhaUnityBuildReporter in the scope where that environment variable is valid.
Each item can be displayed or not from ProjectSettings.
However, there may be times when you want to override this setting for a particular build.
In that case, the following procedure can be used to override the setting.
First, create an .asset file from Create
> GhaUnityBuildReporterConfig
in the Project window.
Then, select the .asset file you created and turn off the items you do not want to show in the Job Summary in Inspector. (By default, all items are set to On.)
Finally, when running the Unity build, specify the path to the .asset file you created with -buildReporterConfig
as follows
- name: iOS Build
run: |
/Applications/Unity/Hub/Editor/2022.3.26f1/Unity.app/Contents/MacOS/Unity \
-quit \
-batchmode \
-nographics \
-projectPath ./Samples~ \
-buildReporterConfig Assets/Editor/GhaUnityBuildReporterConfig.asset \
-executeMethod Editor.BuildEntryPoint.BuildIOS
Bugs and new feature suggestions are welcome in issues and Pull Requests.
This software is released under the MIT License. Please see the LICENSE file for details.