Yeah… agreed.
Note that I’m not making use of Burst Compiler currently, but,
With Docker containers being so heavily focused on Linux, it feels like a massive disconnect between making automated builds on Docker containers vs. Unity currently.
Unity Cloud Build sounds awesome, but sometimes we may wish to use general software engineering tech, to diversify our knowledge, unify our tech stack (when using more than just Unity), etc.
I was able to run a successful build in a Docker container…
- Built FROM unityci/editor:ubuntu-2021.1.20f1-windows-mono-0.15.0
- (Thus, running a Linux container)
- Running on my Windows 10 Home laptop
- Using Docker Desktop for Windows
- Building a bare-bones, almost-empty Unity 2021.1.20f1 project
- Targeting Windows Mono build target
- Using the following command in a “build.sh” bash script:
"$UNITY_FILE_PATH" -quit -batchmode -nographics -logfile "buildlog-$buildType.txt" -serial "$UNITY_SERIAL_NUMBER" -username "$UNITY_USERNAME" -password "$UNITY_PASSWORD" -projectPath . -executeMethod PXG.Editor.CommandLine.Builds.BuildPlayer -buildType "$buildType"
Where $UNITY_FILE_PATH=/opt/unity/Editor/Unity,
and I passed in the other 3 environment variables ($UNITY_USERNAME, $UNITY_PASSWORD, $UNITY_SERIAL_NUMBER) through my Windows Host OS,
$buildType is either CLIENT or SERVER for my game’s 2 builds,
and PXG.Editor.CommandLine.Builds.BuildPlayer is the C# name of my private static void method that gets called into from command line.
However, in my real Unity 2021.1.20f1 project (not just a barely-empty project), the same Windows Mono build fails only in my Docker container, in the middle of shader compilation, with the following from the editor log file:
Caught fatal signal - signo:11 code:1 errno:0 addr:0x968
Obtained 31 stack frames.
#0 0x007f6d31cc7980 in funlockfile
#1 0x007f6d34967fc4 in XAddExtension
#2 0x007f6d347399d1 in _XcursorGetDisplayInfo
#3 0x007f6d34739f29 in XcursorSupportsARGB
#4 0x007f6d34738724 in XcursorImageLoadCursor
#5 0x0055caa8f5c3b8 in Cursors::GenerateCursor(Texture2D*, Vector2f, CursorMode)
#6 0x0055caa8f5c066 in Cursors::InitializeCursors(Texture2D*, Vector2f)
#7 0x0055caa8eebcae in PlayerSettings::InitDefaultCursors()
#8 0x0055caa8eec43b in PlayerSettings::AwakeFromLoad(AwakeFromLoadMode)
#9 0x0055caa801a41b in ManagerBackup::ResetUserEditableManagers()
#10 0x0055caa916503d in DoBuildPlayer(BuildPlayerSetup const&, std::vector<EditorSceneBackup, stl_allocator<EditorSceneBackup, (MemLabelIdentifier)123, 16> >&, core::basic_string<char, core::StringStorageDefault<char> >, dynamic_array<core::basic_string<char, core::StringStorageDefault<char> >, 0ul>, bool, BuildReporting::BuildReport&, BuildReporting::BuiltAssetBundleInfo*, core::basic_string<char, core::StringStorageDefault<char> > const&)
#11 0x0055caa9169b50 in BuildPlayer(BuildPlayerSetup const&, BuildReporting::BuildReport&)
#12 0x0055caa8941344 in BuildPipeline_CUSTOM_BuildPlayerInternalNoCheck(ScriptingBackendNativeArrayPtrOpaque*, ScriptingBackendNativeStringPtrOpaque*, ScriptingBackendNativeStringPtrOpaque*, BuildTargetPlatformGroup, BuildTargetPlatform, BuildPlayerOptions, ScriptingBackendNativeArrayPtrOpaque*, unsigned char)
#13 0x00000040d4a36b in (wrapper managed-to-native) UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck (string[],string,string,UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,UnityEditor.BuildOptions,string[],bool)
#14 0x00000040d49d80 in UnityEditor.BuildPipeline:BuildPlayerInternal (string[],string,string,UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,UnityEditor.BuildOptions,string[])
#15 0x00000040d49878 in UnityEditor.BuildPipeline:BuildPlayer (string[],string,string,UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,UnityEditor.BuildOptions,string[])
#16 0x00000040d49720 in UnityEditor.BuildPipeline:BuildPlayer (UnityEditor.BuildPlayerOptions)
#17 0x00000040d477dc in PXG.Editor.Builds.GameModeBuildHandler:BuildGame (UnityEditor.BuildPlayerOptions)
#18 0x00000040d448ef in PXG.Editor.CommandLine.Builds:BuildPlayer ()
#19 0x00000040d44b93 in (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
#20 0x007f6c235abbf7 in mono_print_method_from_ip
#21 0x007f6c2371ba34 in mono_perfcounter_foreach
#22 0x007f6c2371c8e1 in mono_runtime_invoke
#23 0x0055caa7822c23 in scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)
#24 0x0055caa781eb97 in ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)
#25 0x0055caa80f8732 in Application::ParseARGVCommands()
#26 0x0055caa80f7706 in Application::FinishLoadingProject()
#27 0x0055caa857b935 in InitializeUnity(void*)
#28 0x0055caa857b334 in main
#29 0x007f6d318e5bf7 in __libc_start_main
#30 0x0055caa6b28029 in _start
I kind of have no idea where to go from here haha…