我正在为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
这是我的unitylog.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
感谢您的帮助。
答案 0 :(得分:0)
问题是我的Unity构建命令行没有选项--projectPath。我认为,如果不提供项目路径,Unity会在当前目录中打开该项目(或至少输出一个错误),但是似乎它打开了最后一个打开的项目,因此根本没有构建正确的项目。 / p>