找不到 Unity with Windows GitlabRunner 的构建输出



我正在为 Unity 配置 Windows GitlabRunner

。实际上,根据日志文件,构建似乎可以成功运行,但是我找不到命令中指定的文件夹输出。

这是我的.gitlab-ci.yml

before_script:

stages:
- unity-build
- mr-build
- package-appx
unity-build-job:
stage: unity-build
script:
- D:/Programmes/Editor/Unity.exe -logFile "./unitylog.txt" -buildOutput "./Build" -duskBuildTarget WSAPlayer -wsaUWPBuildType D3D -executeMethod HoloToolkit.Unity.BuildSLNUtilities.PerformBuild_CommandLine -batchmode -quit
artifacts:
when: always
paths:
- unitylog.txt
- Build/
expire_in: 1 hour

我的团结日志到此结束.txt:

...
Reloading assemblies after script compilation.
Begin MonoManager ReloadAssembly
Refreshing native plugins compatible for Editor in 336.09 ms, found 11 plugins.
Preloading 2 native plugins for Editor in 0.13 ms.
Mono: successfully reloaded assembly
Refreshing native plugins compatible for Editor in 1.06 ms, found 11 plugins.
Preloading 2 native plugins for Editor in 0.10 ms.
----- Total AssetImport time: 0.190096s, AssetImport time: 0.000000s, Asset hashing: 0.000000s [0 B, 0.000000 mb/s]
- Completed reload, in  2.095 seconds
Initializing Unity.PackageManager (PackageManager) v2017.2.1 for Unity v2017.2.1f1
Registering platform support modules:
Registered platform support modules in: 0.0496227s.
Native extension for OSXStandalone target not found
Native extension for WindowsStandalone target not found
Native extension for LinuxStandalone target not found
Native extension for WebGL target not found
Native extension for Metro target not found
Native extension for iOS target not found
Native extension for Android target not found
Batchmode quit successfully invoked - shutting down!
Refresh: detecting if any assets need to be imported or removed ... Refresh: elapses 0.119714 seconds (Nothing changed)
Updating ProjectSettings/ProjectSettings.asset - GUID: 00000000000000004000000000000000...
done. [Time: 47.385449 ms] 
Refreshing native plugins compatible for Editor in 1.15 ms, found 11 plugins.
Preloading 2 native plugins for Editor in 0.09 ms.
----- Total AssetImport time: 0.149189s, AssetImport time: 0.082687s, Asset hashing: 0.000000s [0 B, 0.000000 mb/s]
Refresh: detecting if any assets need to be imported or removed ... Refresh: elapses 0.124676 seconds (Nothing changed)
[Package Manager] Server::Kill -- Server was shutdown
Cleanup mono
Exiting batchmode successfully now!
debugger-agent: Unable to listen on 4160

这是我的 gitlab-runner 的输出

Running with gitlab-runner 10.8.0 (079aad9e)
on xxxxxx 65400cd9
Using Shell executor...
Running on DESKTOP-xxxxx...
Fetching changes...
Removing unitylog.txt
HEAD is now at 670a573 Comment build condition
From xxxxx
670a573..f124d71  add-CI     -> origin/add-CI
Checking out f124d719 as add-CI...
Skipping Git submodules setup
$ D:/Programmes/Editor/Unity.exe -logFile "./unitylog.txt" -buildOutput "./Build" -duskBuildTarget WSAPlayer -wsaUWPBuildType D3D -executeMethod HoloToolkit.Unity.BuildSLNUtilities.PerformBuild_CommandLine -batchmode -quit
Uploading artifacts...
unitylog.txt: found 1 matching files               
WARNING: Build/: no matching files                 
Uploading artifacts to coordinator... ok            id=40 responseStatus=201 Created token=APuuG8xj
Job succeeded

谢谢你的帮助。

问题是我的 Unity 构建命令行没有选项 --projectPath。我认为如果不提供项目路径,Unity 会在当前目录中打开项目(或至少输出错误(,但似乎它会打开最后一个打开的项目,因此它根本没有构建正确的项目。

最新更新