#Mirror/Unity in docker ci/cd environment

19 messages · Page 1 of 1 (latest)

elfin dagger
#

Hello, does anyone have any experience in running mirror/unity builds inside a docker container? I'm using this image as base for building:
unityci/editor:ubuntu-2022.2.9f1-windows-mono-3.0.1, but it doesn't seem to find references in the weaver compilation of mirror. Are there some tools that mirror depends on that comes prebuilt with unity's package manager, and isn't inside the docker image? My project is mounted into the docker run command.

Build command on ubuntu host within the ubuntu docker image mentioned above:
unity-editor -nographics -logFile - -projectPath /project -buildWindows64Player '/project/Build/Windows/MyGame.exe' -quit

Some undefines (of many):
Assets/Mirror/Editor/Weaver/Processors/NetworkBehaviourProcessor.cs(50,181): error CS0246: The type or namespace name 'TypeDefinition' could not be found (are you missing a using directive or an assembly reference?)
Assets/Mirror/Editor/Weaver/Processors/NetworkBehaviourProcessor.cs(40,20): error CS0246: The type or namespace name 'MethodDefinition' could not be found (are you missing a using directive or an assembly reference?)
Assets/Mirror/Editor/Weaver/Processors/NetworkBehaviourProcessor.cs(46,20): error CS0246: The type or namespace name 'MethodDefinition' could not be found (are you missing a using directive or an assembly reference?)
Assets/Mirror/Editor/Weaver/Processors/ReaderWriterProcessor.cs(12,36): error CS0246: The type or namespace name 'AssemblyDefinition'
Assets/Mirror/Editor/Weaver/Processors/MethodProcessor.cs(1,12): error CS0234: The type or namespace name 'CecilX'

elfin dagger
#

Yes, their runner and their github actions workflow produces the same error as my self hosted runner pulling the docker image.

elfin dagger
#

I can build the project using terminal with a clean "git clone" on my local windows machine, but this machine has installed unity through hub with GUI etc... The self hosted runner is an ubuntu machine running the docker. Are there any dependencies missing that are included in the mirror installation through GUI that should be included in the workflow?

crimson saddle
elfin dagger
# crimson saddle

I see, however, this is not included into the game repository obviously. So I'd assume these have to be pulled/checked in manually as part of the environment setup, since locally on the windows machine the asset was just installed through unity. Shouldn't dependencies automatically be pulled? I.e Packages/Manifest.json (at which I don't see mirror. Mirror was installed with this https://assetstore.unity.com/packages/tools/network/mirror-129321)

crimson saddle
#

Weaver / Cecil isn't a package...the DLL is part of the AS package.

elfin dagger
#

Right, but these DLL's should be generated as part of the build process?

crimson saddle
#

they're not generated at all

#

They're included with Mirror

elfin dagger
#

Ok, either way they are not recognized during the build. But Mirror is part of the project, not the unity installation, right? So it should be checked out and pulled correctly

crimson saddle
#

unless you put plugins in gitignore and they're not in your repo?

elfin dagger
#

There's something else going on then, because I have Mono.Cecil/* in the repo. No Plugins in .gitignore. This is also verified to be on the self hosted runner. There's something with the linking?

crimson saddle
elfin dagger
#

Yes, unfortunately.

crimson saddle
#

I have to ask, sorry...wouldn't be the first time someone borked their gitignore and didn't realize certain files were only on their local machine

#

like DLL's for example

#

if all the files are there, then I'd have to defer to GameCI / UnityCI support for why they're not being recognized for builds.