diff --git a/.github/scripts/build_release_nightly.py b/.github/scripts/build_release_nightly.py index 97d679c..4fe4f32 100755 --- a/.github/scripts/build_release_nightly.py +++ b/.github/scripts/build_release_nightly.py @@ -27,7 +27,7 @@ if os.environ.get('GITHUB_EVENT_NAME') == 'schedule': else: RELEASE = True -if PLATFORM_TARGET == "android": +if PLATFORM_TARGET.startswith("android_"): TARGETS = ("libkiwix",) elif PLATFORM_TARGET.startswith("iOS"): TARGETS = ("libzim", "libkiwix") @@ -54,12 +54,6 @@ if RELEASE: return release_versions.get(project) is not None TARGETS = tuple(filter(release_filter, TARGETS)) -if RELEASE and PLATFORM_TARGET == "android": - # libkiwix need to know the extrapostfix version to correctly generate the pom.xml file. - extra_postfix = release_versions.get('libkiwix') - if extra_postfix: - os.environ['KIWIXLIB_BUILDVERSION'] = str(extra_postfix) - for target in TARGETS: run_kiwix_build(target, platform=PLATFORM_TARGET, make_release=RELEASE) if target == "kiwix-desktop": diff --git a/.github/scripts/common.py b/.github/scripts/common.py index c38c162..2a2e529 100644 --- a/.github/scripts/common.py +++ b/.github/scripts/common.py @@ -145,12 +145,7 @@ def run_kiwix_build( command.append("--hide-progress") command.append("--fast-clone") command.append("--assume-packages-installed") - if platform == "android": - command.extend(["--target-platform", "android"]) - for arch in ("arm", "arm64", "x86", "x86_64"): - command.extend(["--android-arch", arch]) - else: - command.extend(["--target-platform", platform]) + command.extend(["--target-platform", platform]) if build_deps_only: command.append("--build-deps-only") if target_only: @@ -245,14 +240,12 @@ def make_deps_archive(target=None, name=None, full=False): files_to_archive += HOME.glob("BUILD_*/LOGS") if PLATFORM_TARGET == "native_mixed": files_to_archive += [HOME / "BUILD_native_static" / "INSTALL"] - if PLATFORM_TARGET.startswith("android"): + if PLATFORM_TARGET.startswith("android_"): files_to_archive.append(HOME / "BUILD_neutral" / "INSTALL") - if PLATFORM_TARGET == "android": - for arch in ("arm", "arm64", "x86", "x86_64"): - base_dir = HOME / "BUILD_android_{}".format(arch) - files_to_archive.append(base_dir / "INSTALL") - if (base_dir / "meson_cross_file.txt").exists(): - files_to_archive.append(base_dir / "meson_cross_file.txt") + base_dir = HOME / "BUILD_{}".format(PLATFORM_TARGET) + files_to_archive.append(base_dir / "INSTALL") + if (base_dir / "meson_cross_file.txt").exists(): + files_to_archive.append(base_dir / "meson_cross_file.txt") files_to_archive += HOME.glob("BUILD_*/android-ndk*") if (BASE_DIR / "meson_cross_file.txt").exists(): files_to_archive.append(BASE_DIR / "meson_cross_file.txt") diff --git a/.github/scripts/ensure_base_deps.py b/.github/scripts/ensure_base_deps.py index af9c7fa..ffa012e 100755 --- a/.github/scripts/ensure_base_deps.py +++ b/.github/scripts/ensure_base_deps.py @@ -48,25 +48,10 @@ try: f.extractall(str(HOME)) os.remove(str(local_filename)) except URLError: - print_message("Cannot get archive. Build dependencies") - if PLATFORM_TARGET == "android": - for arch in ("arm", "arm64", "x86", "x86_64"): - archive_name = ARCHIVE_NAME_TEMPLATE.format( - os=OS_NAME, - platform="android_{}".format(arch), - version=base_deps_meta_version, - ) - print_message("Getting archive {}", archive_name) - try: - local_filename = download_base_archive(archive_name) - with tarfile.open(local_filename) as f: - f.extractall(str(HOME)) - os.remove(str(local_filename)) - except URLError: - pass - elif PLATFORM_TARGET == "flatpak": + if PLATFORM_TARGET == "flatpak": print_message("Cannot get archive. Move on") else: + print_message("Cannot get archive. Build dependencies") run_kiwix_build("alldependencies", platform=PLATFORM_TARGET) archive_file = make_deps_archive(name=base_dep_archive_name, full=True) upload(archive_file, "ci@tmp.kiwix.org:30022", "/data/tmp/ci") diff --git a/.github/workflows/releaseNigthly.yml b/.github/workflows/releaseNigthly.yml index 7e67718..f49cde2 100644 --- a/.github/workflows/releaseNigthly.yml +++ b/.github/workflows/releaseNigthly.yml @@ -43,7 +43,10 @@ jobs: - armhf_static - win32_static - i586_static - - android + - android_arm + - android_arm64 + - android_x86 + - android_x86_64 include: - target: native_static image_variant: bionic @@ -66,7 +69,16 @@ jobs: - target: i586_static image_variant: bionic lib_postfix: '/x86_64-linux-gnu' - - target: android + - target: android_arm + image_variant: bionic + lib_postfix: '/x86_64-linux-gnu' + - target: android_arm64 + image_variant: bionic + lib_postfix: '/x86_64-linux-gnu' + - target: android_x86 + image_variant: bionic + lib_postfix: '/x86_64-linux-gnu' + - target: android_x86_64 image_variant: bionic lib_postfix: '/x86_64-linux-gnu' env: