title: Unity3D build from Ubuntu
body: <p>I have been trying several ways of making an Unity3D build from an Ubuntu image by using a Gitlab CI container but seems to fail all the times (Ubuntu 16.04.3 LTS).</p>
  
  <p>I am getting the following error but I have not found useful information over there:</p>
  
  <pre><code>$ /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.
  </code></pre>
  
  <p>That sandbox development is marked as deprecated, what am I missing here?.</p>
  
  <p>Apart from that when I try to get the help of chrome-sandbox I get the following:</p>
  
  <pre><code>$ /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
  </code></pre>
  
  <p>As I can see in the Unity Cloud Build platform they are using a MacOS system in order to build, do we have this alternative in GitLab CI (cloud service) ? Log line from Unity Cloud Build:</p>
  
  <pre><code>42:  + Building with Unity installed at /UNITY_PATH/Unity/Unity-2017_2_1f1/Unity.app/Contents/MacOS/Unity
  </code></pre>
  
  <p>Update:</p>
  
  <p>I've added my gitlab-ci.yml:</p>
  
  <pre><code>image: ubuntu
  before_script:
     - apt-get update
     - apt-get install wget &lt; 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 &lt; 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
  </code></pre>