Pin stable Castle toolchain compatibility
Sync changed files to Google Drive / sync (push) Successful in 3m16s

This commit is contained in:
admin_d committed 2026-09-15 21:46:19 +05:00
1 parent b8a9fd9d74
commit 2d5e5b94ae
4 files changed
+17 -17

No files matched your search

+4 -4
View File
@@ -13,7 +13,7 @@ from generate import android_service_roots, materialize_application_project
from artifacts import inspect_elf, inspect_apk
from resource_staging import stage_runtime_resources
IMAGE_TAG='kambi/castle-engine-cloud-builds-tools:cge-unstable'
IMAGE_TAG='kambi/castle-engine-cloud-builds-tools:cge-stable'
BUILD_EVIDENCE_DIR=ROOT/'build-evidence'
def cge_command(cpu:str,action:str)->list[str]:
if cpu not in CPUS:raise ProbeError('Unsupported Android CPU')
@@ -104,7 +104,7 @@ def _error(log:Path)->str:
return (first_errors(text) or [text[-1500:] or 'Build command failed'])[0]
def _native_library_path(cpu:str)->str:
return f'lib/{CPUS[cpu][0]}/libkam_mobile.so'
return f'lib/{CPUS[cpu][0]}/libkam_mobile_android.so'
def _select_native_library(project:Path, name:str, cpu:str)->Path:
candidates=sorted(project.rglob(f'lib{name}_android_{cpu}.so'),key=lambda path:str(path))
@@ -127,7 +127,7 @@ def stage_android_services(project:Path, logs:Path)->None:
castle_path=os.environ.get('CASTLE_ENGINE_PATH')
if not castle_path:
raise ProbeError('Cannot stage project-owned Android services: CASTLE_ENGINE_PATH is not set')
service_root=Path(castle_path)/'tools/build-tool/data/android/services'
service_root=Path(castle_path)/'tools/build-tool/data/android/integrated-services'
if not service_root.is_dir():
raise ProbeError('Cannot stage project-owned Android services: Castle service root is missing: '+str(service_root))
try:
@@ -177,7 +177,7 @@ def build_local(a:argparse.Namespace,build_id:str)->int:
if not candidates:raise ProbeError('Packaging exited 0 but no APK')
if len({sha256(path) for path in candidates})!=1:raise ProbeError('Multiple different APK outputs')
apk=candidates[0]; apk_info=inspect_apk(apk,a.cpu,library.name,sha256(library),library.read_bytes())
if apk_info['main_library_path']!=_native_library_path(a.cpu):raise ProbeError('APK native library path does not match selected ABI and libkam_mobile.so')
if apk_info['main_library_path']!=_native_library_path(a.cpu):raise ProbeError('APK native library path does not match selected ABI and libkam_mobile_android.so')
signer=signature_tool()
if signer:
signed=run_command([signer,'verify','--verbose',str(apk)],project,logs/'signature.log',a.timeout)