Unity3D在Ubuntu上构建

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的日志行:

在GitLab CI中,我们可以使用macOS虚拟机作为构建环境,以便在云端构建iOS和macOS应用程序。这需要在.gitlab-ci.yml文件中指定“image: macos”。

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

1
你能分享一下你的 gitlab-ci.yml 文件吗? - Jorge Aguilera Gonzalez
1个回答

3
正如Unity3D在这里所指出的Unity3d Linux Releases,这个错误是无害的,可以忽略。但在我的情况下,问题在于我试图使用GitLab CI进行持续集成构建,而且是使用免费账户。这种不需要GUI的CI构建需要账户激活,而这一功能目前不包括在Unity3D的免费版本中。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接