-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] feat(unity): add auto discoverability, testing, and publishing for unity3d projects #236
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t know enough about unity to know whether or not all the options on the build and test phases make sense; so I leave it to you... just wondering if these are so common that they should always be specified for everyone using condo for unity.
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<Target Name="UnityPublish" Condition=" $(UnityPublish) "> | ||
<Exec Command=""$(UnityPath)" -quit -batchmode -nographics -projectPath "@(UnityProjectPath)" -buildTarget $(BUILD_TARGET) -customBuildTarget $(BUILD_TARGET) -customBuildPath "$(PublishArtifactsRoot)$(BUILD_TARGET.ToLower())" -customBuildOptions AcceptExternalModificationsToPlayer -executeMethod Build.PerformBuild -logFile -noUpm" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the nographics switch common? Should it be an option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for custom build target?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for additional flags, like options... should these be defaulted but still overridable ala DOTNET_TEST_OPTIONS, etc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-quit -batchmode -nographics
are all defined in the unity docs for running a CI build. If they are not set then unity will not close the process when complete, and open a GUI interface
Still playing around with customBuildTarget. to run unity headless you need to have an entry point file.
adding the additional flags is a good idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will leave this PR as WIP until I get a few unity builds running on CI and test actual outputs. |
no progress, closing for now |
Condo can now discover, test, and publish Unity3d projects.
Some caveats:
unity.condo
file must be at the root of your project. Still figuring out a good way to auto-discover the root level of a unity3d projectUNITY_PATH
must be set, this is because unity does not get set on the path and they use relative pathing on the executable...BUILD_TARGET
will default to WebGL build if not specified. WebGL builds can also get built into a docker container on publish!Publish
When publishing had to add the -noUpm flag to disable package manager. Not sure how this effects final builds.Also there is a hard requirement for a custom build script in your project, -executeMethod Build.PerformBuild, Will have to find a way to remove this requirement or publish the code somewhere.
Will have to add support for licensing and user/pass/key
Output with
AllowPublish
set to true:condo -- /t:publish
closes #243