Git Product home page Git Product logo

teamcity-unity-plugin's Introduction

TeamCity Unity plugin

official JetBrains project License [build status

The plugin supports building Unity projects on TeamCity.

Features

  • Unity versions detection on build agents
  • Unity build runner with smart completions
  • Automatic discovery of Unity build steps
  • Structured build log with problems highlighting
  • Unity Editor tests reporting
  • Unity build settings feature
  • Unity as Agent tool
  • Running Unity build step inside a container

Unity build settings feature

This TeamCity build feature allows to automatically activate and return Unity Editor license before build start and after build completion.

Also it allows to configure Unity cache server address in one place to use this setting within Unity build steps.

Download

You can download the plugin and install it as an additional TeamCity plugin.

Note: After installation, you need to restart TeamCity server by going to Administration => Diagnostics => Restart Server

Compatibility

The plugin is compatible with TeamCity 2018.1+ and was verified to work with Unity 2017+.

Configuration

The plugin automatically detects Editors installed via Unity Hub. Also it searches Editors in the PATH environment variable and in the following well-known directories:

  • macOS: /Applications/Unity* and /Applications/Unity/Hub/Editor/*
  • Linux: /opt/Unity*/~/Unity* and /opt/Unity/Hub/Editor/*/~/Unity/Hub/Editor/*
  • Windows: %Program Files%/Unity* and %Program Files%/Unity/Hub/Editor/*

Note: you need to start TeamCity build agent under the same user account which is used for Unity Hub installation.

To add Unity installation located in custom path you could use UNITY_HOME environment variable, e.g. UNITY_HOME=C:\Tools\Unity_2018.1\. Multiple paths could be specified by using default path delimiter.

To search Unity installation directories in custom path matching Unity* pattern you could use UNITY_HINT_PATH environment variable, e.g. UNITY_HINT_PATH=C:\Tools. Multiple paths could be specified by using default path delimiter.

You may also install Unity as a TeamCity agent tool. See TeamCity Agent Tool Configuration for more information.

Agent configuration parameters

All detected Unity versions will be reported as build agent configuration parameters with the unity.path.%unityVersion% prefix. They could be found on the Agents -> "%agentName%" -> Agent Parameters -> Configuration Parameters page in TeamCity server UI.

Custom error logging settings

The runner allows overriding default error logging settings by using "Line statuses file" parameter where you could specify the path to configuration file. Example file contents:

<?xml version="1.0" encoding="UTF-8"?>
<lines>
  <line level="warning" message="warning CS\d+" />
  <line level="error" message="error CS\d+" />
</lines>

TeamCity Agent Tool Configuration

This plugin supports optionally installing Unity as a TeamCity agent tool.

Creating Tool Zip Archive

To create a tool zip file for Unity, do the following:

  1. Locally install (or extract) the desired version of Unity along with any/all desired Target Support (Android, iOS, Xbox, etc.)
  2. Zip the Editor folder + plugin descriptor into an archive named Unity-<version>.zip such as Unity-2018.4.9f1.zip It should look like this (for Windows):
    ๐Ÿ“ Unity-2018.4.9f1.zip
    |- ๐Ÿ“„ teamcity-plugin.xml
    |- ๐Ÿ“‚ Editor
    โ”‚  |- ๐Ÿ“‚ BugReporter
    โ”‚  |- ๐Ÿ“‚ Data
    โ”‚  |- ๐Ÿ“‚ locales
    โ”‚  |- ๐Ÿ“„ Unity.exe
    โ”‚  |- ...
    
    Note that the archive structure may vary depending on the distributed binaries. For example, when packing for MacOS, the top-level folder inside the archive should be Unity.app.
  3. Upload as a Unity Tool on the Administration > Tools page on TeamCity

NB!

  • Due to the current limitation of TeamCity tool distribution, preserving file permissions for Unix-like platforms is only possible with additional configuration. Namely, a plugin descriptor should list all files in the archive which are needed to be executable after unpacking on an agent.

    An example of this list for MacOS tool descriptor might be:

    <executable-files>
       <include name='Unity.app/Contents/MacOS/Unity'/>
       <include name='Unity.app/Contents/Resources/PackageManager/Server/UnityPackageManager'/>
       ...
    </executable-files>

    Feel free to upvote TW-21673 issue to make it work out of the box.

  • Agent environment must contain all the required global dependencies to make Unity work on a given OS.

Running Unity build step inside a container

This plugin is integrated with Container Wrapper extension. The integration works only with 2023.09 and above versions of TeamCity.

Common problems

Unmet requirements: Exists=>unity.path.xxx

This problem indicates that the Unity Editor installation was not found on any of build agent machines. Check that you have installed Editor on your build agents and machines were properly configured.

Build

This project uses Gradle as the build system. You can easily open it in IntelliJ IDEA or Eclipse.

Contributing

We appreciate all kinds of feedback, so please feel free to send a PR or submit an issue. For issues please consider opening related ticket in our YouTrack.

Documentation

teamcity-unity-plugin's People

Contributors

aaronzurawski avatar archyinf avatar burnasheva avatar dtretyakov avatar ilyafomenko avatar jonnyptn avatar julia-alexandrova avatar kim-vitaliy avatar lesley29 avatar mchechulnikov avatar orthorienbestia avatar orybak avatar pavel-krizskii avatar pierredeman avatar semyonnaumov avatar socksdevil avatar temka193 avatar wellfireddevelopment avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

teamcity-unity-plugin's Issues

License Activation not working

Hi there!

I'm running into an issue where the license couldn't activated in the Build Feature and therefor the build fails.

In the buildlog I see a double declaration to /Editor/Unity.exe (windows agent):

  Starting: "C:\Unity\Unity 2019.2.12\Editor\Unity.exe\Editor\Unity.exe" -quit -batchmode -nographics -serial ******* -username ****** -password ******* -logFile C:\buildAgent\temp\buildTmp\unityBuildLog-8479047412352649534-114640.txt
14:26:17
  Process exited with code -1. Unity log:

On the actualy build command itself we're seeing different (correct) behaviour:


  Starting: "C:\Unity\Unity 2019.2.12\Editor\Unity.exe" -batchmode -projectPath ./ -quit -logFile C:\buildAgent\temp\buildTmp\unityBuildLog-998815648385366156.txt

Could it be something in the plugin or did I misconfigure something.

We're running the latest snapshot from 2020 (SNAPSHOT-20200127164629)

cannot fix Unmet requirements: Exists=>unity.path.xxx

I've done following steps:
1.start TeamCity build agent under the same user account which is used for Unity Hub installation
2.add Unity installation located in custom path you could use UNITY_HOME environment variable
But still not ok.
I don't know what i should try next,or maybe just give it up and use Jenkins.
Really need help. Give me a clue please.
1
2
3

Support simultaneous versions of Unity minor versions

Our Teamcity build agent doen't use the correct version of Unity. We need to build our project with Unity2018.2.13f1, but our build agent always use Unity2018.2.16f1 because this version is used for another game, which is built on the same agent...

Could you please add ability to specify minor version or full path of Unity Editor ?
Thanks

TeamcityUnityRunner

Allow installation of Unity versions on the fly

Unity is releasing a new version about every week, and during the development phase of a game the version used can be changed frequently. Currently this means we have to install new versions manually on each of our agents, plus reboot the agent to make it aware of the new Unity version.

One suggestion is to use the Unity Hub CLI to install versions (or modules) on the fly from this runner, if the wanted version (or module) is not present upon launch. This should probably be optional, to avoid installing versions unintentionally.

Cancel build on mac os

It works well with the SNAPSHOT-20190108114412 version.
However, the build will be canceled in future versions of mac os.

Checking the log shows the following differences.

SNAPSHOT-20190108114412 Version
Starting: /Applications/Unity/Hub/Editor/2017.4.8f1/Unity.app/Contents/MacOS/Unity -batchmode ................. -cleanedLogFile / Users / .. ...... 1063202947757192734-166424.txt

Future version
Starting: /Applications/Unity/Hub/Editor/2017.4.8f1/Unity.app/Contents/MacOS/Unity -batchmode ................. -cleanedLogFile

The unity version is 2017.4.8, and if the command does not have the parameter value of -cleanedLogFile, the build will be canceled.

How do I configure the artifacts build output for WebGL

I am using a self-hosted TeamCity agent, running the Unity plugin.

I have WebGL as the build target, but I cannot for the life of me figure out how to configure the build output to go into a \builds path off the project root.

I can't browse in the TeamCity dialog 'Select files to be published as artifacts', for the artifacts to include, as I don't see the build artifacts listed anywhere in the dialog, just regular folders from my project.

I've done a complete file search on all the TeamCity directories on my PC, looking for the build output, but don't see anything.

I feel like I'm missing some configuration step somewhere, stating where the output of the WebGL build should go to, but I've tried setting the 'artifact paths' setting to */ => build
But I get an error that there were too many artifacts.

I then tried setting the 'artifact paths' setting to just getting my .html file to be exported
build/*.html
But I still don't have any artifacts once my build has been completed.

Thanks

Build log blocks

Hi,

I have noticed that in the build logs for Unity builds, the "Command line arguments" and "Initialize mono" sections of the log automatically get put into service message blocks (see images below). I know that we can create our own blocks by using blockOpened and blockClosed service messages, however I don't understand how these Unity logs are in their own blocks - is there some kind of log post processing which can put messages into groups?

Cheers,
Andy

image
image

Potential issue with Runner and multiple unity steps on one build configuration.

I wonder if with the following code..

screenshot 2019-02-23 at 15 33 59

You could run into issues with multiple unity steps in one build configuration.

I.e.

Step 1. Import
Step 2. Build
Step 3. Test

Maybe it's possible to have the step number here, such as...

"-${build.buildId}.${build.stepId}"

I'm not sure if this would be possible but it seems like it might be a small change for additional features.

I tend to run multiple unity steps in one configuration and then artifact each of their logs seperately.

Edit : Sorry, I was supposed to make this a question / suggestion

Configuration Help

I need some help properly configuring my build agent machines. I feel like I've done everything in the README but I'm still getting this error message:
Unable to locate tool unity 2018.2.10 in system. Please make sure to specify UNITY_PATH environment variable.


My Configuration

Build Agent:

  • Unity install location: /Applications/Unity
    • e.g. /Applications/Unity/2018.2.10f1, /Applications/Unity/2018.4.8f1, etc.
  • buildAgent.properties contents
    • unity.path.2018.2.10f1=/Applications/Unity/2018.2.10f1
    • unity.path.2018.4.8f1=/Applications/Unity/2018.4.8f1

Plugin Configuration:

  • Unity version: 2018.2.10
    • when I specify 2018.2.10f1 I get this error in the build: Invalid version (no patch version): 2018.2.10f1
  • I've also set a TeamCity environment variable for the UNITY_PATH: env.UNITY_PATH=/Applications/Unity/

My understanding from the README is the plugin should detect all of my Unity versions as they're under /Applications/Unity* but I'm not sure what's going wrong.

Any help would be greatly appreciated!

Unable To Parse "f" Series Versions

[2020-07-26 13:43:31,498] INFO - [S]erver.unity.LinuxUnityDetector - Invalid Unity version 2020.1.0f1 in directory /opt/Unity/Hub/Editor/2020.1.0f1: com.vdurmont.semver4j.SemverException: Invalid version (no patch version): 2020.1.0f1 (enable debug to see stacktrace)

Unity Player Runner

Something that we'd really find useful is a plugin similar to this, maybe teamcity-unity-player-plugin that would allow for the execution of a unity built player. It would need a very small feature set to be useful.

  1. Use a Command Line runner to run something that had been built from the teamcity-unity-plugin
  2. Tail the log file generated (similar to this plugin), so that we could see updates in realtime in the teamcity log

At the moment, we simply use the command line and artifact the log, but it could be nice to have teamcity functionality for this.

Multiple test category excludes causes test runner to fail

Trying to define multiple test category excludes causes the entire configuration to fail, for example if defining

!MyTestCategoryOne
!MyTestCategoryTwo

From the build log it looks as though when using multiple test categories, the -editorTestsCategories is missing and the config will attempt to run all tests instead.

Add ability to set custom Unity path

Some users have local Unity installations in custom locations, so we could add ability to customize it.

Also it'll help with Unity run in docker containers (see #6).

Detecting Unity install not located under C:

I am trying to configure Unity with TeamCity for the first time and I am trying to understand how to properly allow TeamCity to detect let's say a Unity install folder that is under D:\Unity\Editor, or any other path which is not C:

I have added the environment variable UNITY_HINT_PATH under system, and this worked for an agent which has Unity installed in C:

I am not sure if this is possible

Unable to find execute method if Project Path is undefined

When configuring the plugin I left the project path blank as when I clicked the tree to the right it showed my folder structure and was clearly in the root directory of my project. However, when running with nothing in that field, the project path parameter wasn't added, which apparently is problematic for Unity in identifying the executeMethod class provided. I was able to fix this by setting my path to "./" which then added the path parameter.

BEFORE ADDING A PATH
[19:01:34][Step 1/1] Starting: /opt/Unity/Editor/Unity -batchmode -buildTarget WebGL -nographics -executeMethod AutomatedBuild.Build -logFile -quit
[19:01:34][Step 1/1] in directory: /opt/buildagent/work/2568497a44852bef
... truncated ...
[19:01:42][Step 1/1] Aborting batchmode due to failure:
[19:01:42][Step 1/1] executeMethod class 'AutomatedBuild' could not be found.
[19:01:42][Step 1/1] Argument was -executeMethod AutomatedBuild.Build

AFTER ADDING A PATH
[19:03:19][Step 1/1] Starting: /opt/Unity/Editor/Unity -batchmode -projectPath /opt/buildagent/work/2568497a44852bef/. -buildTarget WebGL -nographics -executeMethod AutomatedBuild.Build -logFile -quit
... build succeeded

Build step only runs Edit mode or Play mode

The <Default> option in Test Platform runs only the EditMode tests.

It would be nice to have an option that runs both, Edit and Play mode tests, instead of needing one Build Step for each kind of tests.

Could this be achievable?

With enabled custom log file only part of the actual log is shown in teamcity

We are using the Teamcity Unity Runner with the custom log file option.

The log file is written fine, but the output in teamcity just stops after the package imports and stays there until the build is finished.

View in Teamcity:
grafik

Log file
grafik

As you can see, the log file gos on (I'm building right now, the log file has a length of 20k lines).
But the log view in teamcity is unchanged.

Any recommendations?

Buildrunner works only with fully written Unity Version?

Hey there,

I was under the impression that when the Buildrunner runs I can even only provide the minor Unity version, e.g.:
2018.2
2019.4
2020.3

So I don't have to specify the exact Unity version. I thought the runner will just pickup a random installed version of Unity, for example, I set 2018.2 as the Unity version it'll look at the installed 2018.2 versions like
2018.2.1f1
2018.2.4f1
and so on and pick randomly one and build the project with that.

But apparently that's not the case?

I just tried that with my Unity 2020.3.0f1 installation.
In my buildstep I set "2020.3" as the Unity version and build the project, but immediately an error was thrown:

[17:24:10] jetbrains.buildServer.agent.ToolCannotBeFoundException: Unable to locate tool unity 2020.3 in system. Please make sure to specify UNITY_PATH environment variable

I looked at my path variables and it sure exists: "unity.path.2020.3.0"
I also tried different string variations:

  • 2020.3
  • 2020.3.
  • 2020.3.*

All of them threw the same error. Of course when I set the version specifically to 2020.3.0 it worked like a charm.

I hoped I could just threw in the minor version there without the need to specify the patch version, since that's extra work for me to go through every buildconfig every time we update the Unity version to a new patch version.

Is that a bug? Did I forget something?

-projectPath | repeat of #21?

Hi!

I think we're experiencing #21 (Couldn't set project path...) on SNAPSHOT-20190307144314 while using Unity 2018.1.9 - more specifically, 2018.1.9f2-MLTP10 (Win / Mac). We're building to the Magic Leap/Lumin, so migrating isn't really an option.

FWIW this same configuration/plugin is working great for 2018.3.x... but... what do we need to do (if anything) to have this fix altered to include our version of Unity? At a glance, the commit that fixes that issue doesn't include our version.

I've attached the output log, but I'm guessing the relevant bit is shown/snipped below:

[19:24:52] : Build preparation done
[19:24:52]E: Step 1/1: macOS (Unity)
[19:24:52] :	 [Step 1/1] Starting: /Applications/Unity/Unity.app/Contents/MacOS/Unity -batchmode -projectPath "./" -buildTarget OSXUniversal -buildOSXUniversalPlayer /Tools/TeamCity/buildAgent/work/b4a0b4102554b93f/Weave -quit -logFile
[19:24:52] :	 [Step 1/1] in directory: /Tools/TeamCity/buildAgent/work/b4a0b4102554b93f
[19:24:53] :	 [Step 1/1] Initiating legacy licensing moduleDisplayProgressbar: Unity license
[19:24:53] :	 [Step 1/1] 
[19:24:53] :	 [Step 1/1] LICENSE SYSTEM [2019318 19:24:53] Next license update check is after 2019-03-19T23:06:19
[19:24:53] :	 [Step 1/1] 
[19:24:53] :	 [Step 1/1] [Package Manager] Server::Start -- Port 55866 was selected
[19:24:53] :	 [Step 1/1] Launching external process: /Applications/Unity/Unity.app/Contents/Resources/PackageManager/Server/UnityPackageManager
[19:24:53] :	 [Step 1/1] 
[19:24:53] :	 [Step 1/1] Command line arguments
[19:24:53] :		 [Command line arguments] /Applications/Unity/Unity.app/Contents/MacOS/Unity
[19:24:53] :		 [Command line arguments] -batchmode
[19:24:53] :		 [Command line arguments] -projectPath
[19:24:53] :		 [Command line arguments] "./"
[19:24:53] :		 [Command line arguments] -buildTarget
[19:24:53] :		 [Command line arguments] OSXUniversal
[19:24:53] :		 [Command line arguments] -buildOSXUniversalPlayer
[19:24:53] :		 [Command line arguments] /Tools/TeamCity/buildAgent/work/b4a0b4102554b93f/Weave
[19:24:53] :		 [Command line arguments] -quit
[19:24:53] :		 [Command line arguments] -logFile
[19:24:53]E:	 [Step 1/1] Couldn't set project path to: 
[19:24:53]i:	 [Step 1/1] ##teamcity[buildProblem description='Couldn|'t set project path to: ']
[19:24:53] :	 [Step 1/1]  
[19:24:53] :	 [Step 1/1] (Filename: /Users/builduser/buildslave/unity/build/Runtime/Utilities/Argv.cpp Line: 348)
[19:24:53] :	 [Step 1/1] 
[19:24:53] :	 [Step 1/1] 
[19:24:53] :	 [Step 1/1] Aborting batchmode due to failure:
[19:24:53]i:	 [Step 1/1] ##teamcity[buildProblem description='Couldn|'t set project path to: ']
[19:24:53] :	 [Step 1/1] 
[19:24:53] :	 [Step 1/1] [Package Manager] Server::Kill -- Server was shutdown
[19:24:53]W:	 [Step 1/1] Process exited with code 1
[19:24:53]E:	 [Step 1/1] Process exited with code 1 (Step: macOS (Unity))
[19:24:53]E:	 [Step 1/1] Step macOS (Unity) failed

Thanks!

Weave_std_1.log.zip

Unity Tool install isn't triggered and build is blocked by path variable usage

If you install Unity as a TeamCity tool using the instructions provided by JetBrains and linked in the Readme, the build that references that new version will be blocked indefinitely as the tool is not triggered to install by the build and the unity.path.<version> Configuration Parameter causes the build to not find compatible agents as the Tool not only needs to be installed, but also needs to trigger the Unity Runner Plugin to re-search for Unity installations to populate this field.

So I see 2 related but distinct issues here:

  1. Runner doesn't inform TeamCity to install the Tool
  2. Once tool is installed, a restart of the agent is required as the Unity Runner doesn't update its path variables as a response to a tool install

My repro case:

  1. Already have a licensed Unity install on the Agent
  2. Create a new tool for a new Unity version (2018.4.6) using the documentation here: Installing Agent Tools and here: Plugins Packaging
  3. Install new Tool using TeamCity Administration page
  4. Create a new build configuration with the Unity Runner and set the version to this new tool

Expected: Build runs, triggering tool install on agent that does not yet have that tool
Actual: Build is blocked indefinitely as unity.path.2018.4.6 is not defined and the build will not run to install the tool.

Configuration parameters are not accessible in Unity process?

I defined a configuration parameter in one of my build configurations and would like to access its value from within the Unity process while building. However, the custom parameter is not defined when querying from within Unity's C# process during the build step. I can see other standard variables defined by TeamCity like BUILD_NUMBER, but not my custom ones.

Is this not supported? Any way for me to pass such data from TeamCity to Unity easily?

Thank you!

Unity Version field doesn't allow the use of Teamcity parameters

When using a parameter or environment variable for the field Unity Version, the agent evaluates it as a literal string instead of a Teamcity variable.

Setting all the unity steps in a single parameter would reduce the overhead of manually configuring them individually.

Steps to reproduce

Set a configuration parameter or a environment variable with the unity version:
image

Use the parameter in the Unity Version field:
image

Look at the Compatible agents (I set one step to use %env.UNITY_VERSION% and the other to use %UNITY_VERSION%:
image

Expected result:

Requirement should say:
Exists=>unity\.path\.2019\.4\.7* exists

Unity installation detection on custom drive

Hey there,
I spent the whole day trying to setup Teamcity with Unity with the Unity Plugin for teamcity in order to create a build pipeline - and for the love of god I couldn't set it up. Whatever parameters I'm trying to set, my build agent (my very own machine) is always incompatible. I don't even get to the build part, since the agent is incompatible with this reason:

Unmet requirements:
Exists=>unity.path.2018.3.6f1.* exists

Now apparently the main problem is that the path of the specific Unity installation cant be found.
I use Unity Hub and Unity Hub and all the Unity versions are installed on a different harddrive (on drive D:), and Unity Hub installs all my Unity Versions to this folder:
D:\Programme\Unity

So for example Unity 2018.3.6f1 is installed in:
D:\Programme\Unity\2018.3.6f1

Now when I created the Build Step and chose Unity as the Runner Type, I opened the advanced settings, set all the necessary things and set the Unity version like this: 2018.3.6f1

Saving that Build Step and hitting "Run" leads to the unmet requirement.
First thing: Is there any chance to debug? Or at least to get any logs? Because you know "Exists=>unity.path.2018.3.6f1.* exists" doesn't say anything about the problem, it seems it doesn't find the path, but why not, what exactly is wrong, how does the processed path actually look like?

Now looking at the Configuration of the readme.md we also tried to create an Environment Variable in the Parameters of the Build Configuration called UNITY_HINT_PATH to hint at the Unity Hub but that didn't work and we also tried the same with UNITY_HOME like this:
Name: env.UNITY_HOME Value: D:/Programme/Unity/2018.3.6f1

I tried it to with other Unity versions and their respective paths, but it nerver worked.

What's the exact issue? What did I do wrong?

Unity Bug when opening a project with many changes

There is currently a bug (at least I think it's a bug) in unity that has been prevailant for a number of years.

In certain circumstances (Editor Code modification, some runtime code modification), it's possible for the initial opening of Unity command line mode to fail during compilation, or to call old code. This can happen because the method you tell unity to execute is not executed at the correct time (after a full assembly reload).

We 'fixed' this previously by having support in the unity runner to ignore the exit code on run. We had to make a slight change to our steps to acomodate for this such as....

  1. Open Unity and Import any pending changes, and ignore error codes that might be generated due to compilation order of modified files.
  2. Open Unity and perform our custom action, do not ignore error codes because we want to know when the custom action legitimately failed.

Whilst this isn't a bug in your teamcity-unity-plugin this issue is here mostly as a way to open discussion with you so that we can figure out the best way to solve this in the correct way.

No Logs on Mac build

Hi, I am using the latest snapshot (2020 January), and builds on Mac are not showing logs.

No log file is being passed as an argument when calling Unity
Starting: /Applications/Unity/Hub/Editor/2019.4.9f1/Unity.app/Contents/MacOS/Unity -batchmode -projectPath ./ -buildTarget Android -executeMethod Method.DeployBuild -quit -logFile

Here is the same build running on a windows machine:
Starting: "C:\Program Files\Unity\Hub\Editor\2019.4.9f1\Editor\Unity.exe" -batchmode -projectPath ./ -buildTarget Android -quit -batchmode -executeMethod Method.DeployBuild -quit -logFile C:\BuildAgent\temp\buildTmp\unityBuildLog-8436327390070719416.txt

I tried to build the plugin with the latest changes but the build directory after building with IntelliJ Idea is missing files and doesn't have the plugin file structure, there are probably more steps to take after the build is done.

If anyone could provide a built plugin with the latest changes to check if the problem persists, that would be amazing.

Cheers.

Edit:
Builds are following through without issue, it is just making it very hard to diagnose errors.

How to enable "development" option into the build

Hi,
How I can tell the build runner that I want to build a windows player with development enabled (error loging..) and deep profiling support ?

I've tried activating those options from the command executed inside the unity editor by the build runner but without any luck.

Thank you for your help

Support tests filtering

Unity Editor could generate test reports in NUnit formatting which is supported by TeamCity XML report processor. For that we should provide the following command line arguments:

unity -runEditorTests -editorTestsResultFile path/to/results.xml

Also we could support filtering tests by suite or name:

-editorTestsCategories | Filter editor tests by categories. Separate test categories with a comma.
-editorTestsFilter | Filter editor tests by names. Separate test names with a comma.

https://docs.unity3d.com/Manual/PlaymodeTestFramework.html
https://docs.unity3d.com/530/Documentation/Manual/testing-editortestsrunner.html

Fix for -projectPath command line argument

I always get an error for the project path (Couldn't set project path to: ./)

I tried this with a minimal setup; a new unity project, with the project root folder also being the git root folder and thus leaving "Working Directory" and "Project path" empty. Searching for a solution, I found this post on Unity answers:
https://answers.unity.com/questions/622429/i-have-a-problem-the-log-is-couldnt-set-project-pa.html

One of the answers mentions "You need to format the option -projectPath=/Users/you/pathtoproject with an equals sign between -projectPath and the path rather than a space as indicated in the documentation."

Why has nobody else complained about this yet? Because it seems as if - instead of fixing the documentation - the fixed this in the software in Unity 2018. It failed for me in 5.x and 2017.1.0f3, but it worked fine in 2018.2.6f1.

Allow use of a configuration parameter for the Unity Version

Hello!

I'd want to use a teamcity Configuration Parameter to configure the Unity Version, so my team can easily swap the version used when running a build (notably using the "custom run" button).

Unfortunately, this doesn't seem to work, as my agent is shown as incompatible:
image

It doesn't seem that the configuration parameter is interpreted before the unity version is tested for the agents

Option to remove -quit command

-quit is added automatically as a parameter but that is an issue when executed method wait for editor update to finish execution.

We need an option to remove "-quit" and let the method call EditorApplication.Exit(0) manually.

Support custom Unity home paths

Being able to force the path in the build configuration, or via an environment variable which can be adjusted on a per-config basis would be useful.

We store all our Unity installs in C:\Unity* - it'd be nice if we could get the option to change the search directory from Program Files, et al - to there.

Originally posted by @AdamFrisby in #6 (comment)

Is this project mantained?

From what I have seen in the history the project has 9 commits this year (and two of them were just copyright and vendor stuff), the latest commit has been on March, and before that, the closest commit was in April 2019 (8 months of inactivity in between), 4 open PRs that aren't active, and 21 (now 22) issues still waiting for a resolution.

Also, the latest release in the Plugin site (with the download link) points to SNAPSHOT-20200127164629 released in Jan 28, 2020, which means that all the latest fixes aren't available (unless, of course, that you build the whole plugin by yourself), it was only released again because of the copyright stuff. Following this pattern, we can expect that the next update will only be available in 2021 when @orybak upgrades the copyright year.

I've been struggling with problems and been trying to find solutions, report problems or even fix them, but after seeing the current status, it demotivates me and my team from staying with Teamcity. It feels like this plugin was made because it had to be made and after that it was just let alone.

Can we expect the contributors to participate more in the repository and help the developers?

When building and running tests I get `Process exited with code 255`

Unity 2020.1.0b4 (Also tried 2019.3.08f)
Latest Teamcity
Running Windows Version 10.0.18363

The build without tests succeeds, however when I run with tests I get an error. I've tried to figure out what it is but I am at a loss. Oh and the tests are all passing.

The repository I am testing is here:
https://github.com/Sibz/Com.Sibz.NetCode

I basically have a default TeamCity install and only set this unity build settings:
Build Target: standalone
Player: Win64
Output Path: Builds

Full Log: Added in comment below

Tail of log (I snipped the times except for 1 line so it can be matched to full log):

  AcceleratorClientConnectionCallback - disconnected - :0
  Cleanup mono
  Checking for leaked weakptr:
    Found no leaked weakptrs.
[22:48:17]  [Package Manager] Server::Kill -- Server was shutdown
  Process exited with code 255
  Process exited with code 255 (Step: Unity)
  Importing data from 'C:\TeamCity\buildAgent\temp\buildTmp\unityTestResults-1851156133729896712.xml' (31.05 KB) with 'nunit' processor
  NUnit report watcher
  Waiting for 1 service processes to complete
  NUnit report watcher
    1 report found for paths:
    C:\TeamCity\buildAgent\temp\buildTmp\unityTestResults-1851156133729896712.xml
    Successfully parsed
      1 report
      C:\TeamCity\buildAgent\temp\buildTmp\unityTestResults-1851156133729896712.xml
  Step Unity failed
Publishing internal artifacts
Build finished

Incorrect Unity discovery on Linux

The current Linux discovery tries to look at $UNITY_ROOT/Editor/Data/PackageManager/Unity/PackageManager to find the version, but this path doesn't exist, and discovery fails. AFAICT, there is no reliable way to get the current Unity version, other than parsing the name of the containing folder.

Add the option to use the -cleanedLogFile flag.

The cleanedLogFile flag is not officially documented, but it allows unity to dump out a log without callstacks, which makes reading the log in TeamCity's build window much easier.

Our log files are about 6 - 30 mb depending on the build so they don't display well in TeamCity's build log window if we have a full log.

Password is not *'d out

image
Using Team City Cloud and a local agent, when a build fails the password is in plain text.

The usernamepassword is set via command line arguments:
-username [email protected] -password MyPassword -serial MySerial

Interestingly, the first half of the email is *'d out.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.