Build the projects in the CI.
We used to build only the base dependencies in the CI (and build the projects in nightly&Release workflow). Now always build the projects.
This commit is contained in:
parent
4f458e5954
commit
01e8f92348
|
@ -0,0 +1,47 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
|
||||
from common import (
|
||||
run_kiwix_build,
|
||||
make_archive,
|
||||
create_desktop_image,
|
||||
fix_macos_rpath,
|
||||
OS_NAME,
|
||||
PLATFORM_TARGET,
|
||||
DESKTOP,
|
||||
notarize_macos_build,
|
||||
)
|
||||
|
||||
if PLATFORM_TARGET.startswith("android_"):
|
||||
TARGETS = ("libkiwix",)
|
||||
elif PLATFORM_TARGET.startswith("iOS"):
|
||||
TARGETS = ("libzim", "libkiwix")
|
||||
elif PLATFORM_TARGET.startswith("native_"):
|
||||
if OS_NAME == "osx":
|
||||
if PLATFORM_TARGET == "native_mixed":
|
||||
TARGETS = ("libzim", )
|
||||
else:
|
||||
TARGETS = ("libzim", "zim-tools", "libkiwix")
|
||||
else:
|
||||
if DESKTOP:
|
||||
TARGETS = ("kiwix-desktop",)
|
||||
elif PLATFORM_TARGET == "native_mixed":
|
||||
TARGETS = ("libzim",)
|
||||
else:
|
||||
TARGETS = ("zim-tools", "libkiwix", "kiwix-tools")
|
||||
elif PLATFORM_TARGET in ("win32_static", "armhf_static", "i586_static"):
|
||||
TARGETS = ("kiwix-tools",)
|
||||
elif PLATFORM_TARGET == "flatpak":
|
||||
TARGETS = ("kiwix-desktop",)
|
||||
else:
|
||||
TARGETS = ("libzim", "zim-tools", "libkiwix", "kiwix-tools")
|
||||
|
||||
for target in TARGETS:
|
||||
run_kiwix_build(target, platform=PLATFORM_TARGET)
|
||||
if target == "kiwix-desktop":
|
||||
create_desktop_image(make_release=False)
|
||||
else:
|
||||
if PLATFORM_TARGET == "native_mixed" and OS_NAME == "osx":
|
||||
fix_macos_rpath(target)
|
||||
notarize_macos_build(target)
|
||||
make_archive(target, make_release=False)
|
|
@ -67,6 +67,7 @@ jobs:
|
|||
needs: Docker
|
||||
container:
|
||||
image: "kiwix/kiwix-build_ci:${{matrix.image_variant}}-31"
|
||||
options: "--device /dev/fuse --privileged"
|
||||
steps:
|
||||
- name: Checkout code
|
||||
shell: bash
|
||||
|
@ -97,6 +98,13 @@ jobs:
|
|||
kiwix-build/.github/scripts/compile_all_deps.py
|
||||
env:
|
||||
PLATFORM_TARGET: ${{matrix.target}}
|
||||
- name: Build projects
|
||||
shell: bash
|
||||
run: |
|
||||
cd $HOME
|
||||
kiwix-build/.github/scripts/build_projects.py
|
||||
env:
|
||||
PLATFORM_TARGET: ${{matrix.target}}
|
||||
- name: Upload failure logs
|
||||
if: failure()
|
||||
run: $HOME/kiwix-build/.github/scripts/upload_failure_logs.sh
|
||||
|
@ -153,6 +161,13 @@ jobs:
|
|||
$GITHUB_WORKSPACE/.github/scripts/compile_all_deps.py
|
||||
env:
|
||||
PLATFORM_TARGET: ${{matrix.target}}
|
||||
- name: Build projects
|
||||
shell: bash
|
||||
run: |
|
||||
cd $HOME
|
||||
$GITHUB_WORKSPACE/.github/scripts/build_projects.py
|
||||
env:
|
||||
PLATFORM_TARGET: ${{matrix.target}}
|
||||
- name: Upload failure logs
|
||||
if: failure()
|
||||
run: $GITHUB_WORKSPACE/.github/scripts/upload_failure_logs.sh
|
||||
|
|
Loading…
Reference in New Issue