Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build libzim on bionic #597

Merged
merged 6 commits into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/scripts/build_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ def select_build_target():
DESKTOP,
OS_NAME
)
if (PLATFORM_TARGET.startswith("android_")
if OS_NAME == "bionic" and PLATFORM_TARGET.endswith("_mixed"):
return ("libzim", )
elif (PLATFORM_TARGET.startswith("android_")
or PLATFORM_TARGET.startswith("iOS")
or PLATFORM_TARGET.startswith("macOS")):
return ("libzim", "libkiwix")
Expand Down
5 changes: 3 additions & 2 deletions .github/scripts/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,16 @@
DEV_BRANCH = None

RELEASE_OS_NAME = "macos" if OS_NAME == "osx" else "linux"
EXTRA_NAME = "-bionic" if OS_NAME == "bionic" else ""

PLATFORM_TO_RELEASE = {
"native_mixed": "{os}-x86_64".format(os=RELEASE_OS_NAME),
"native_mixed": "{os}-x86_64{extra}".format(os=RELEASE_OS_NAME, extra=EXTRA_NAME),
"native_static": "{os}-x86_64".format(os=RELEASE_OS_NAME),
"win32_static": "win-i686",
"armhf_static": "{os}-armhf".format(os=RELEASE_OS_NAME),
"armhf_mixed": "{os}-armhf".format(os=RELEASE_OS_NAME),
"aarch64_static": "{os}-aarch64".format(os=RELEASE_OS_NAME),
"aarch64_mixed": "{os}-aarch64".format(os=RELEASE_OS_NAME),
"aarch64_mixed": "{os}-aarch64{extra}".format(os=RELEASE_OS_NAME, extra=EXTRA_NAME),
"i586_static": "{os}-i586".format(os=RELEASE_OS_NAME),
"macOS_arm64_static": "{os}-arm64".format(os=RELEASE_OS_NAME),
"macOS_arm64_mixed": "{os}-arm64".format(os=RELEASE_OS_NAME),
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ jobs:
image_variant: ['focal']
lib_postfix: ['/x86_64-linux-gnu']
include:
- target: native_mixed
image_variant: bionic
lib_postfix: '/x86_64-linux-gnu'
- target: aarch64_mixed
image_variant: bionic
lib_postfix: '/aarch64-linux-gnu'
- target: win32_static
image_variant: f35
lib_postfix: '64'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/container_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
variant: [f35, focal, alpine]
variant: [f35, focal, bionic, alpine]
runs-on: ubuntu-22.04

steps:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/releaseNigthly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ jobs:
- target: native_mixed
image_variant: focal
lib_postfix: '/x86_64-linux-gnu'
- target: native_mixed
image_variant: bionic
lib_postfix: '/x86_64-linux-gnu'
- target: native_desktop
image_variant: focal
lib_postfix: '/x86_64-linux-gnu'
Expand All @@ -56,6 +59,9 @@ jobs:
- target: aarch64_mixed
image_variant: focal
lib_postfix: '/x86_64-linux-gnu'
- target: aarch64_mixed
image_variant: bionic
lib_postfix: '/aarch64-linux-gnu'
- target: win32_static
image_variant: f35
lib_postfix: '64'
Expand Down
27 changes: 3 additions & 24 deletions ci_images/bionic_builder.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,21 @@ ENV LANG C.UTF-8
ENV OS_NAME bionic

RUN apt update -q \
&& dpkg --add-architecture i386 \
&& apt install -q -y --no-install-recommends software-properties-common \
&& add-apt-repository ppa:beineri/opt-qt-5.15.2-bionic \
&& apt-get update \
&& apt install -q -y --no-install-recommends \
# Base build tools
build-essential automake libtool cmake ccache pkg-config autopoint patch \
python3-pip python3-setuptools python3-wheel git subversion wget unzip \
ninja-build openssh-client curl libgl-dev \
# Python (2) is needed to install android-ndk
python \
ninja-build openssh-client curl \
# Packaged dependencies
libbz2-dev libmagic-dev uuid-dev zlib1g-dev \
libmicrohttpd-dev aria2 libgtest-dev libgl-dev \
# Devel package to compile python modules
libxml2-dev libxslt-dev python3-dev \
# Qt packages
qt515base qt515webengine qt515svg qt515imageformats qt515wayland \
# To create the appimage of kiwix-desktop
libfuse2 fuse patchelf \
# Flatpak tools
elfutils flatpak flatpak-builder \
# Cross compile i586
libc6-dev-i386 lib32stdc++6 gcc-multilib g++-multilib \
libbz2-dev uuid-dev zlib1g-dev \
libgtest-dev \
# Other tools (to remove)
# vim less grep \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* /usr/share/doc/* /var/cache/debconf/* \
&& pip3 install meson pytest gcovr requests distro

# Set qt515 environment (the equivalent of "source /opt/qt515/bin/qt515-env.sh")
# RUN echo "source /opt/qt515/bin/qt515-env.sh" >> /home/runner/.bashrc
ENV PATH=/opt/qt515/bin:$PATH \
LD_LIBRARY_PATH=/opt/qt515/lib/x86_64-linux-gnu:/opt/qt515/lib:$LD_LIBRARY_PATH \
PKG_CONFIG_PATH=/opt/qt515/lib/pkgconfig:$PKG_CONFIG_PATH

# Create user
RUN groupadd --gid 121 runner
RUN useradd --uid 1001 --gid 121 --create-home runner
Expand Down
8 changes: 4 additions & 4 deletions kiwixbuild/dependencies/armhf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
armhf_base_url = base_url + 'Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/Stretch/GCC%2010.3.0/Raspberry%20Pi%202%2C%203/'

# This is Gcc 10.3.0 and ALL rapsberry Pi arch64
aarch_base_url = base_url + 'Bonus%20Raspberry%20Pi%20GCC%2064-Bit%20Toolchains/Raspberry%20Pi%20GCC%2064-Bit%20Cross-Compiler%20Toolchains/Stretch/GCC%2010.3.0/'
aarch_base_url = base_url + 'Bonus%20Raspberry%20Pi%20GCC%2064-Bit%20Toolchains/Raspberry%20Pi%20GCC%2064-Bit%20Cross-Compiler%20Toolchains/Stretch/GCC%206.3.0/'

class armhf_toolchain(Dependency):
dont_skip = True
Expand All @@ -29,8 +29,8 @@ class aarch64_toolchain(Dependency):
name = "aarch64"

class Source(ReleaseDownload):
archive = Remotefile('cross-gcc-10.3.0-pi_64.tar.gz',
'5b3fdb7ee8c496c377ab8b11d7ffd404b4d3041f4fdcfeebcbcb734d45a5f3e9',
aarch_base_url + 'cross-gcc-10.3.0-pi_64.tar.gz')
archive = Remotefile('cross-gcc-6.3.0-pi_64.tar.gz',
'1b048bb8886ad63d21797cd9129fc37b9ea0dfaac7e3c36f888aa16fbec1d320',
aarch_base_url + 'cross-gcc-6.3.0-pi_64.tar.gz')

Builder = NoopBuilder
2 changes: 1 addition & 1 deletion kiwixbuild/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

# This is the "version" of the whole base_deps_versions dict.
# Change this when you change base_deps_versions.
base_deps_meta_version = '85'
base_deps_meta_version = '86'

base_deps_versions = {
'zlib' : '1.2.12',
Expand Down