Build and release each libkiwix android builds independently.
While it is ok to build all libkiwix android builds in one step, the "release system" upload only one archive per platform. So we need 4 platforms to do 4 uploads. As we don't build on "android" platform now, we can clean up our scripts.
This commit is contained in:
parent
7086009a0a
commit
9c220866ac
|
@ -27,7 +27,7 @@ if os.environ.get('GITHUB_EVENT_NAME') == 'schedule':
|
||||||
else:
|
else:
|
||||||
RELEASE = True
|
RELEASE = True
|
||||||
|
|
||||||
if PLATFORM_TARGET == "android":
|
if PLATFORM_TARGET.startswith("android_"):
|
||||||
TARGETS = ("libkiwix",)
|
TARGETS = ("libkiwix",)
|
||||||
elif PLATFORM_TARGET.startswith("iOS"):
|
elif PLATFORM_TARGET.startswith("iOS"):
|
||||||
TARGETS = ("libzim", "libkiwix")
|
TARGETS = ("libzim", "libkiwix")
|
||||||
|
@ -54,12 +54,6 @@ if RELEASE:
|
||||||
return release_versions.get(project) is not None
|
return release_versions.get(project) is not None
|
||||||
TARGETS = tuple(filter(release_filter, TARGETS))
|
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:
|
for target in TARGETS:
|
||||||
run_kiwix_build(target, platform=PLATFORM_TARGET, make_release=RELEASE)
|
run_kiwix_build(target, platform=PLATFORM_TARGET, make_release=RELEASE)
|
||||||
if target == "kiwix-desktop":
|
if target == "kiwix-desktop":
|
||||||
|
|
|
@ -145,11 +145,6 @@ def run_kiwix_build(
|
||||||
command.append("--hide-progress")
|
command.append("--hide-progress")
|
||||||
command.append("--fast-clone")
|
command.append("--fast-clone")
|
||||||
command.append("--assume-packages-installed")
|
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:
|
if build_deps_only:
|
||||||
command.append("--build-deps-only")
|
command.append("--build-deps-only")
|
||||||
|
@ -245,11 +240,9 @@ def make_deps_archive(target=None, name=None, full=False):
|
||||||
files_to_archive += HOME.glob("BUILD_*/LOGS")
|
files_to_archive += HOME.glob("BUILD_*/LOGS")
|
||||||
if PLATFORM_TARGET == "native_mixed":
|
if PLATFORM_TARGET == "native_mixed":
|
||||||
files_to_archive += [HOME / "BUILD_native_static" / "INSTALL"]
|
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")
|
files_to_archive.append(HOME / "BUILD_neutral" / "INSTALL")
|
||||||
if PLATFORM_TARGET == "android":
|
base_dir = HOME / "BUILD_{}".format(PLATFORM_TARGET)
|
||||||
for arch in ("arm", "arm64", "x86", "x86_64"):
|
|
||||||
base_dir = HOME / "BUILD_android_{}".format(arch)
|
|
||||||
files_to_archive.append(base_dir / "INSTALL")
|
files_to_archive.append(base_dir / "INSTALL")
|
||||||
if (base_dir / "meson_cross_file.txt").exists():
|
if (base_dir / "meson_cross_file.txt").exists():
|
||||||
files_to_archive.append(base_dir / "meson_cross_file.txt")
|
files_to_archive.append(base_dir / "meson_cross_file.txt")
|
||||||
|
|
|
@ -48,25 +48,10 @@ try:
|
||||||
f.extractall(str(HOME))
|
f.extractall(str(HOME))
|
||||||
os.remove(str(local_filename))
|
os.remove(str(local_filename))
|
||||||
except URLError:
|
except URLError:
|
||||||
print_message("Cannot get archive. Build dependencies")
|
if PLATFORM_TARGET == "flatpak":
|
||||||
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":
|
|
||||||
print_message("Cannot get archive. Move on")
|
print_message("Cannot get archive. Move on")
|
||||||
else:
|
else:
|
||||||
|
print_message("Cannot get archive. Build dependencies")
|
||||||
run_kiwix_build("alldependencies", platform=PLATFORM_TARGET)
|
run_kiwix_build("alldependencies", platform=PLATFORM_TARGET)
|
||||||
archive_file = make_deps_archive(name=base_dep_archive_name, full=True)
|
archive_file = make_deps_archive(name=base_dep_archive_name, full=True)
|
||||||
upload(archive_file, "ci@tmp.kiwix.org:30022", "/data/tmp/ci")
|
upload(archive_file, "ci@tmp.kiwix.org:30022", "/data/tmp/ci")
|
||||||
|
|
|
@ -43,7 +43,10 @@ jobs:
|
||||||
- armhf_static
|
- armhf_static
|
||||||
- win32_static
|
- win32_static
|
||||||
- i586_static
|
- i586_static
|
||||||
- android
|
- android_arm
|
||||||
|
- android_arm64
|
||||||
|
- android_x86
|
||||||
|
- android_x86_64
|
||||||
include:
|
include:
|
||||||
- target: native_static
|
- target: native_static
|
||||||
image_variant: bionic
|
image_variant: bionic
|
||||||
|
@ -66,7 +69,16 @@ jobs:
|
||||||
- target: i586_static
|
- target: i586_static
|
||||||
image_variant: bionic
|
image_variant: bionic
|
||||||
lib_postfix: '/x86_64-linux-gnu'
|
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
|
image_variant: bionic
|
||||||
lib_postfix: '/x86_64-linux-gnu'
|
lib_postfix: '/x86_64-linux-gnu'
|
||||||
env:
|
env:
|
||||||
|
|
Loading…
Reference in New Issue