Build the kiwix-desktop app image in Travis.
This commit is contained in:
parent
894ab4ba06
commit
269e2b39a6
|
@ -31,7 +31,7 @@ cache:
|
|||
install: travis/install_extra_deps.sh
|
||||
script:
|
||||
- if [ $TRAVIS_OS_NAME == "osx" ] || [ $PLATFORM != "native_dyn" ]; then travis/compile_all.py; fi
|
||||
- if [ $TRAVIS_OS_NAME == "linux" ] && [ $PLATFORM == "native_dyn" ]; then docker build -t kiwix/build . && docker run -e PLATFORM -e NIGHTLY_DATE -e TRAVIS_EVENT_TYPE -e TRAVIS_BUILD_DIR kiwix/build; fi
|
||||
- if [ $TRAVIS_OS_NAME == "linux" ] && [ $PLATFORM == "native_dyn" ]; then docker build -t kiwix/build . && docker run -e PLATFORM -e NIGHTLY_DATE -e TRAVIS_EVENT_TYPE -e TRAVIS_BUILD_DIR --device /dev/fuse --cap-add SYS_ADMIN kiwix/build; fi
|
||||
after_failure: travis/upload_all_log.sh
|
||||
deploy:
|
||||
- provider: script
|
||||
|
|
|
@ -45,6 +45,10 @@ RUN \
|
|||
qtbase5-dev \
|
||||
qtwebengine5-dev \
|
||||
qt5-default \
|
||||
# To create the appimage of kiwix-desktop
|
||||
libfuse2 \
|
||||
fuse \
|
||||
patchelf \
|
||||
# Some helper tools
|
||||
vim \
|
||||
less \
|
||||
|
|
|
@ -85,6 +85,28 @@ def run_kiwix_build(target, platform, build_deps_only=False, make_release=False,
|
|||
subprocess.check_call(command, cwd=str(HOME))
|
||||
|
||||
|
||||
def create_app_image():
|
||||
command = ['kiwix-build/scripts/create_kiwix-desktop_appImage.sh',
|
||||
str(BASE_DIR/'INSTALL'), str(HOME/'AppDir')]
|
||||
print_message("Build AppImage of kiwix-desktop")
|
||||
subprocess.check_call(command, cwd=str(HOME))
|
||||
if make_release:
|
||||
postfix = main_project_versions['kiwix-desktop']
|
||||
archive_dir = RELEASE_KIWIX_ARCHIVES_DIR/'kiwix-desktop'
|
||||
else:
|
||||
postfix = _date
|
||||
archive_dir = NIGHTLY_KIWIX_ARCHIVES_DIR
|
||||
|
||||
try:
|
||||
archive_dir.mkdir(parents=True)
|
||||
except FileExistsError:
|
||||
pass
|
||||
|
||||
app_name = "kiwix-desktop_x86_64_{}".format(postfix)
|
||||
print_message("Copy AppImage to {}".format(archive_dir/app_name))
|
||||
shutil.copy(str(HOME/'Kiwix-x86_64.AppImage'), str(archive_dir/app_name))
|
||||
|
||||
|
||||
def make_archive(project, platform):
|
||||
file_to_archives = BINARIES[project]
|
||||
base_bin_dir = BASE_DIR/'INSTALL'/'bin'
|
||||
|
@ -255,6 +277,8 @@ for target in TARGETS:
|
|||
run_kiwix_build(target,
|
||||
platform=PLATFORM,
|
||||
make_release=make_release)
|
||||
if target == 'kiwix-desktop':
|
||||
create_app_image()
|
||||
if make_release and PLATFORM == 'native_dyn':
|
||||
run_kiwix_build(target,
|
||||
platform=PLATFORM,
|
||||
|
|
Loading…
Reference in New Issue