Unity3D 从 Ubuntu 构建

Unity3D build from Ubuntu

我一直在尝试使用 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

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