3

我一直在尝试使用 Gitlab CI 容器从 Ubuntu 映像构建 Unity3D 的几种方法,但似乎总是失败(Ubuntu 16.04.3 LTS)。

我收到以下错误,但我没有在那里找到有用的信息:

$ /opt/Unity/Editor/Unity -batchmode -nographics -silent-crashes -logFile ./unity.log -projectPath ./ -buildLinuxUniversalPlayer "./Build/linux/project" -quit
[0101/202644:ERROR:browser_main_loop.cc(161)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.

该沙盒开发被标记为已弃用,我在这里缺少什么?

除此之外,当我尝试获得 chrome-sandbox 的帮助时,我得到以下信息:

$ /opt/Unity/Editor/chrome-sandbox --help
The setuid sandbox provides API version 1, but you need 0
Please read https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment.
close: Bad file descriptor

正如我在 Unity Cloud Build 平台中看到的,他们使用 MacOS 系统进行构建,我们在 GitLab CI(云服务)中有这个替代方案吗?Unity Cloud Build 的日志行:

42:  + Building with Unity installed at /UNITY_PATH/Unity/Unity-2017_2_1f1/Unity.app/Contents/MacOS/Unity

更新:

我添加了我的 gitlab-ci.yml:

image: ubuntu
before_script:
   - apt-get update
   - apt-get install wget < wget.txt
   - wget -q -O unity.deb http://beta.unity3d.com/download/fd37f3680b5f/unity-editor_amd64-2017.2.0b11.deb
   - ls -la
   - apt-get install gdebi < gdebi.txt
   - gdebi --n unity.deb
stages:
   - build
   - log
windows:
   stage: build
   script:
      - echo "Attempting to build for Windows"
      - /opt/Unity/Editor/Unity -batchmode -nographics -silent-crashes -logFile $(pwd)/unity.log -projectPath $(pwd) -buildWindowsPlayer "$(pwd)/Build/windows/GameTest.exe" -quit
macos:
   stage: build
   script:
      - echo "Attempting to build for OS X"
      - /opt/Unity/Editor/Unity -batchmode -nographics -silent-crashes -logFile $(pwd)/unity.log -projectPath $(pwd)-buildOSXUniversalPlayer "$(pwd)/Build/osx/GameTest.app" -quit
linux:
   stage: build
   script:
      - echo "Attempting to build for Linux"
      - /opt/Unity/Editor/Unity -batchmode -nographics -silent-crashes -logFile $(pwd)/unity.log -projectPath $(pwd) -buildLinuxUniversalPlayer "$(pwd)/Build/linux/GameTest" -quit
log:
   stage: log
   script:
      - echo 'Logs from build'
      - cat ./unity.log
4

1 回答 1

3

正如 Unity3D 在此处Unity3d Linux Releases指出的那样,此错误是良性的,可以忽略,在我的情况下,错误是我试图通过免费帐户使用 GitLab CI 的持续集成构建。此 CI 构建没有 GUI 需要帐户激活,并且此功能目前不包含在 Unity3D 的免费版本中。

于 2018-04-03T13:56:18.360 回答