Unity warning causes false failure and fails the build erroneously

I am using the Unity build step for TeamCity. It works great, but I have an issue where a warning line fails the whole build, when it really shouldn't. Looking at the logs, the unity build succeeds, but the rest of the build steps fail because of this warning. The offending line is:
Shader warning in 'RisEstimation': Compilation failed: Platform doesn't support Ray Tracing Shader compilation.
I assume the “Compilation failed” is read by teamcity and assumed to be a failure. How can I avoid this?

0
1 comment

Hi,

Thanks for reaching out to us.

This is likely caused by TeamCity interpreting the text Compilation failed inside the Unity warning message as a build error, even though the Unity build itself succeeds.

You can avoid this by configuring the Unity build step to override the status of this specific log line using a Line Statuses file. For example:

<?xml version="1.0" encoding="UTF-8"?>
<lines>
  <line level="warning" message="Shader warning in 'RisEstimation': Compilation failed: Platform doesn't support Ray Tracing Shader compilation\." />
</lines>

Then specify this file in the Unity build step under the Line statuses file option.

Also, please check your build failure conditions in TeamCity. If there is a condition such as “Fail build on specific text in build log” matching Compilation failed, you may need to narrow or remove that rule.

If the issue still persists after these changes, please provide:

  • The full build log
  • Your TeamCity server version

You can upload the files to: https://uploads.jetbrains.com/

After uploading, please send us the Upload ID so we can investigate further.

 

0

Please sign in to leave a comment.