-
-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some additional environment variables #84
Comments
Could you please elaborate on the rationale behind these changes? Please assume I don't know anything about the inner workings of Unity editor. Also note that some of these paths may not really exist on images other than those with |
No problem. Yeah, the java ones are for android target platforms. We build a unity sdk that leverages native code on android which is coded in java. To build the unity android app we need to compile (and run tests) on the native android layer, which then gets packaged into unity, and then we build/package the whole lot together. |
This might also increase general reliability for Android builds. Quick details of each var: The |
@dominicmarmionswrve Check out #88 - just merged, should set those environment variables for you. You might still need to accept the license agreement on your own, though. |
We might still wanna accept the license for the sdk manager, as we're making images for CI, and the license has been accepted on peoples computers already. I recently excluded 2018.2 builds and below from using this fix because sdkmanager was not recognized. Perhaps we should undo the change using your suggestion:
We could then apply it to both 2018.2- and 2019+ images. |
Context
We are migrating from gableroux docker images on circleci.
Suggested solution
Could you please add the following environment variables on images similar to
unityci/editor:ubuntu-2019.4.14f1-android-0.9.0
?export JAVA_HOME=/opt/unity/Editor/Data/PlaybackEngines/AndroidPlayer/OpenJDK
export ANDROID_HOME=/opt/unity/Editor/Data/PlaybackEngines/AndroidPlayer/SDK
export ANDROID_NDK_HOME=/opt/unity/Editor/Data/PlaybackEngines/AndroidPlayer/NDK
export PATH=$JAVA_HOME/bin:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$PATH
Also, could you run the following to accept latest android tool updates:
yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses || true
Considered alternatives
Also worth considering, could you either change
UNITY_PATH
environment variablefrom:
/opt/unity
to:
/opt/unity/Editor/Unity
Or alternatively create a new environment variable for this.
Additional details
We can set these ourselves in our own yml builds but it might useful for others.
Thanks!
The text was updated successfully, but these errors were encountered: