1

I am curently configuring a Windows GitlabRunner for Unity.

Actually the build seems to works successfully according to the log file, however I can't find the folder output specified in the command.

Here my .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

Here the end of my 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

Here the output of my 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

Thank you for your help.

1 Answer 1

1

The problem was that my Unity build command line does not have the option --projectPath. I thinked that if not giving a project path, Unity would open the project in the curent directory (or at least outputs an error), but it seems that it opens the last opened project so it was not building the right project at all.

Sign up to request clarification or add additional context in comments.

1 Comment

This solved my problem thx. (forum.unity.com/threads/…)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.