Fix travis CI
This commit is contained in:
parent
daefadecc9
commit
4dea44d305
|
@ -54,6 +54,7 @@ env:
|
|||
- PLATFORM="armhf_static"
|
||||
- PLATFORM="i586_dyn"
|
||||
- PLATFORM="i586_static"
|
||||
- PLATFORM="android"
|
||||
- PLATFORM="android_arm"
|
||||
- PLATFORM="android_arm64"
|
||||
- PLATFORM="android_x86"
|
||||
|
@ -66,6 +67,7 @@ matrix:
|
|||
- env: PLATFORM="android_mips64"
|
||||
- env: PLATFORM="android_x86"
|
||||
- env: PLATFORM="android_x86_64"
|
||||
- env: PLATFORM="android"
|
||||
include:
|
||||
- env: PLATFORM="android_mips"
|
||||
if: type!=cron AND type!=pull_request
|
||||
|
|
|
@ -12,11 +12,13 @@ class AllBaseDependencies(Dependency):
|
|||
class Builder(NoopBuilder):
|
||||
@classmethod
|
||||
def get_dependencies(cls, platformInfo, allDeps):
|
||||
base_deps = ['zlib', 'lzma', 'xapian-core', 'gumbo', 'pugixml', 'libmicrohttpd', 'libaria2', 'icu4c']
|
||||
if platformInfo.build != 'win32':
|
||||
base_deps += ["libmagic"]
|
||||
base_deps = ['zlib', 'lzma', 'xapian-core', 'pugixml', 'libaria2', 'icu4c']
|
||||
# zimwriterfs
|
||||
if platformInfo.build not in ('android', 'win32'):
|
||||
base_deps += ['libmagic', 'gumbo']
|
||||
# kiwix-tools
|
||||
if (platformInfo.build != 'android' and
|
||||
neutralEnv('distname') != 'Darwin'):
|
||||
base_deps += ['ctpp2c', 'ctpp2']
|
||||
base_deps += ['libmicrohttpd', 'ctpp2c', 'ctpp2']
|
||||
|
||||
return base_deps
|
||||
|
|
|
@ -10,7 +10,7 @@ main_project_versions = {
|
|||
|
||||
# This is the "version" of the whole base_deps_versions dict.
|
||||
# Change this when you change base_deps_versions.
|
||||
base_deps_meta_version = '4'
|
||||
base_deps_meta_version = '5'
|
||||
|
||||
|
||||
base_deps_versions = {
|
||||
|
|
|
@ -66,8 +66,14 @@ def run_kiwix_build(target, platform, build_deps_only=False, make_release=False,
|
|||
command = ['kiwix-build']
|
||||
command.append(target)
|
||||
command.append('--hide-progress')
|
||||
command.append('--force-install-packages')
|
||||
command.extend(['--target-platform', platform])
|
||||
if target == 'kiwix-android' and platform.startswith('android_'):
|
||||
command.extend(['--target-platform', 'android', '--android-arch', platform[8:]])
|
||||
elif 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])
|
||||
if build_deps_only:
|
||||
command.append('--build-deps-only')
|
||||
if make_release:
|
||||
|
@ -121,12 +127,11 @@ def make_archive(project, platform):
|
|||
|
||||
|
||||
def make_deps_archive(target, full=False):
|
||||
(BASE_DIR/'.install_packages_ok').unlink()
|
||||
|
||||
archive_name = "deps_{}_{}_{}.tar.gz".format(
|
||||
TRAVIS_OS_NAME, PLATFORM, target)
|
||||
files_to_archive = [BASE_DIR/'INSTALL']
|
||||
files_to_archive += BASE_DIR.glob('**/android-ndk*')
|
||||
files_to_archive += HOME.glob('BUILD_*/android-ndk*')
|
||||
files_to_archive += HOME.glob('BUILD_*/android-sdk*')
|
||||
if (BASE_DIR/'meson_cross_file.txt').exists():
|
||||
files_to_archive.append(BASE_DIR/'meson_cross_file.txt')
|
||||
|
||||
|
@ -138,17 +143,19 @@ def make_deps_archive(target, full=False):
|
|||
if full:
|
||||
files_to_archive += ARCHIVE_DIR.glob(".*_ok")
|
||||
files_to_archive += BASE_DIR.glob('*/.*_ok')
|
||||
files_to_archive += (HOME/"BUILD_native_dyn").glob('*/.*_ok')
|
||||
files_to_archive += (HOME/"BUILD_native_static").glob('*/.*_ok')
|
||||
files_to_archive += HOME.glob('BUILD_android*/.*_ok')
|
||||
files_to_archive += SOURCE_DIR.glob('*/.*_ok')
|
||||
files_to_archive += [SOURCE_DIR/'pugixml-{}'.format(
|
||||
base_deps_versions['pugixml'])]
|
||||
files_to_archive += [BASE_DIR/'pugixml-{}'.format(
|
||||
base_deps_versions['pugixml'])]
|
||||
if (TOOLCHAINS_DIR).exists():
|
||||
files_to_archive.append(TOOLCHAINS_DIR)
|
||||
files_to_archive += HOME.glob('BUILD_*/pugixml-{}'.format(
|
||||
base_deps_versions['pugixml']))
|
||||
files_to_archive += HOME.glob('**/TOOLCHAINS')
|
||||
relative_path = HOME
|
||||
|
||||
with tarfile.open(str(relative_path/archive_name), 'w:gz') as tar:
|
||||
for name in files_to_archive:
|
||||
for name in set(files_to_archive):
|
||||
tar.add(str(name), arcname=str(name.relative_to(relative_path)))
|
||||
return relative_path/archive_name
|
||||
|
||||
|
@ -281,10 +288,10 @@ elif PLATFORM == 'armhf_static':
|
|||
make_archive('kiwix-tools', 'linux-armhf')
|
||||
elif PLATFORM == 'i586_static':
|
||||
make_archive('kiwix-tools', 'linux-i586')
|
||||
elif PLATFORM.startswith('android_') and 'kiwix-android' in TARGETS:
|
||||
elif PLATFORM.startswith('android') and 'kiwix-android' in TARGETS:
|
||||
APK_NAME = "kiwix-{}".format(PLATFORM)
|
||||
source_debug_dir = BASE_DIR/'kiwix-android'/'app'/'build'/'outputs'/'apk'/'kiwix'/'debug'
|
||||
source_release_dir = BASE_DIR/'kiwix-android'/'app'/'build'/'outputs'/'apk'/'kiwix'/'release'
|
||||
source_debug_dir = HOME/'BUILD_android'/'kiwix-android'/'app'/'build'/'outputs'/'apk'/'kiwix'/'debug'
|
||||
source_release_dir = HOME/'BUILD_android'/'kiwix-android'/'app'/'build'/'outputs'/'apk'/'kiwix'/'release'
|
||||
shutil.copy(str(source_debug_dir/'app-kiwix-debug.apk'),
|
||||
str(NIGHTLY_KIWIX_ARCHIVES_DIR/"{}-debug.apk".format(APK_NAME)))
|
||||
shutil.copy(str(source_release_dir/'app-kiwix-release-unsigned.apk'),
|
||||
|
|
Loading…
Reference in New Issue