Merge pull request #797 from Faless/fix/4.x_android_ci

pull/796/head
Rémi Verschelde 2022-07-28 09:34:18 +02:00 committed by GitHub
commit 80a5c4f322
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View File

@ -47,7 +47,7 @@ jobs:
platform: android platform: android
artifact-name: godot-cpp-android-arm64-release artifact-name: godot-cpp-android-arm64-release
artifact-path: bin/libgodot-cpp.android.release.arm64.a artifact-path: bin/libgodot-cpp.android.release.arm64.a
flags: arch=arm64 flags: ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME arch=arm64
- name: 🍏 iOS (arm64) - name: 🍏 iOS (arm64)
os: macos-11 os: macos-11

View File

@ -18,19 +18,15 @@ def options(opts):
def exists(env): def exists(env):
if not "ANDROID_NDK_ROOT" in os.environ: return "ANDROID_NDK_ROOT" in os.environ or "ANDROID_NDK_ROOT" in ARGUMENTS
return False
return True
def generate(env): def generate(env):
if not "ANDROID_NDK_ROOT" in os.environ: if "ANDROID_NDK_ROOT" not in env:
raise ValueError( raise ValueError(
"To build for Android, ANDROID_NDK_ROOT must be defined. Please set ANDROID_NDK_ROOT to the root folder of your Android NDK installation." "To build for Android, ANDROID_NDK_ROOT must be defined. Please set ANDROID_NDK_ROOT to the root folder of your Android NDK installation."
) )
env["ANDROID_NDK_ROOT"] = os.environ["ANDROID_NDK_ROOT"]
if env["arch"] not in ("arm64", "x86_64", "arm32", "x86_32"): if env["arch"] not in ("arm64", "x86_64", "arm32", "x86_32"):
print("Only arm64, x86_64, arm32, and x86_32 are supported on Android. Exiting.") print("Only arm64, x86_64, arm32, and x86_32 are supported on Android. Exiting.")
Exit() Exit()