Bounty: 100
I am using Gitlab CI to automate my unity builds. For this I use two machines. (one Mac and one windows machine. Important: build should only run on the first machine that is available. )
unity-build:
script: "/Applications/Unity/Hub/Editor/2019.3.14f1/Unity.app/Contents/MacOS/Unity
-projectPath pathXY
-executeMethod BuildScript.PerformBuild
-quit"
stage: build
tags:
- unity-mac-runner, unity windows runner
The problematic line is this: script: "/Applications/Unity/Hub/Editor/2019.3.14f1/Unity.app/Contents/MacOS/Unity, because on my windows runner path to unity is "S:Unity2019.3.14f1EditorUnity.exe"
Tried to fix this with these changes:
windows job:
stage: setpaths
variables:
UNITY_PATH: "S:/Unity/2019.3.14f1/Editor/Unity.exe"
script: "set windows variables..."
tags:
- unity windows runner
#osx job:
# stage: setpaths
# variables:
# UNITY_PATH: "S:/Unity/2019.3.14f1/Editor/Unity.exe"
# script: "set mac variables..."
# tags:
# - unity-mac-runner
Questions
- How can I do this? What should I use?
- I tried to set path of unity installation depending on build runner, but I couldn’t get this to work.
An example would be nice. Thx a lot 😉