Compare commits

...

16 Commits

Author SHA1 Message Date
Adam Lamar c8b1b62756
Merge b51b52e34d into f58795bd1e 2025-04-17 22:28:12 +02:00
Adam Lamar b51b52e34d Refactor duplication, use qt6 by default on jammy 2025-04-17 22:28:10 +02:00
Adam Lamar 0c818af7d6 Support ubuntu jammy, noble, and oracular with their appropriate qt versions 2025-04-17 22:28:10 +02:00
Kelson f58795bd1e
Merge pull request #818 from kiwix/qt_installed_only_if_necessary
QT is installed only in a windows native_mixed job
2025-04-17 20:53:00 +02:00
Veloman Yunkan fcc6798187 QT is installed only in a windows native_mixed job
kiwix-desktop is built under Windows only in native_mixed config and QT
is not required for anything else. Therefore it doesn't make sense to
run QT installation in Windows native_dyn and native_static CI/CD jobs.
That will reduce the risk of those jobs failing because of problems with
QT mirrors.
2025-04-17 19:18:10 +02:00
Veloman Yunkan 9c5e1966a0
Merge pull request #817 from kiwix/workaround_for_download.qt.io_outage
Workaround for download.qt.io outage
2025-04-17 20:32:02 +04:00
Veloman Yunkan f13cd4264a Updated .github/configs/aqt.ini
- Made https://qt.mirror.constant.com/ the default QT download URL.

- Added https://qt.mirror.constant.com/ and https://ftp.fau.de/qtproject/
  to the list of trusted mirrors (used for obtaining package hashes)

- Deleted the kde_patches section (we don't build QT from source)
2025-04-17 17:43:10 +02:00
Veloman Yunkan efd995acbf Copied aqtinstall default config into our repo
Copied settings.ini of aqtinstall==3.1.21 python package (the version of
aqtinstall used by the jurplel/install-qt-action@v4 action as of today)
as .github/configs/aqt.ini and made the QT installation step use that
config. The cloned config file is going to be modified in the next commit.
2025-04-17 17:20:02 +02:00
Kelson 43c4add1fc
Merge pull request #815 from kiwix/build-libzim-9.3.0
Build libzim 9.3.0
2025-04-17 11:28:33 +02:00
Emmanuel Engelhart e4a8ac215c
Build libzim 9.3.0 2025-04-17 11:27:51 +02:00
Kelson 4d65a50db4
Merge pull request #814 from kiwix/zim-testing-suite_update
Update zim-testing-suite to 0.8.0
2025-04-17 10:50:49 +02:00
Veloman Yunkan 4071762b9a Update zim-testing-suite to 0.8.0 2025-04-17 10:03:07 +02:00
Kelson 77592b12ff
Merge pull request #813 from kiwix/commented-out-ninja-install-macos
Comment-out ninja install for macOS
2025-04-16 12:43:22 +02:00
Emmanuel Engelhart e67295a3d0 Comment-out ninja install for macOS 2025-04-16 12:09:16 +02:00
Kelson 8780b994a3
Merge pull request #811 from kiwix/no-double-native-archives
Dont publish built dependencies on jammy to prevent double archives
2025-04-16 10:04:49 +02:00
rgaudin f888c87459
Issue #770: Dont publish built dependencies on jammy to prevent double archives
Currently, both jammy and focal publish the native_dyn versions of dependencies
for libzim and libkiwix.
This creates concurrent upload issues.
This removes this step for jammy so it gets uploaded only once.
2025-04-16 09:26:02 +02:00
18 changed files with 126 additions and 41 deletions

46
.github/configs/aqt.ini vendored Normal file
View File

@ -0,0 +1,46 @@
[DEFAULTS]
[aqt]
concurrency: 4
baseurl: https://qt.mirror.constant.com/
7zcmd: 7z
print_stacktrace_on_error: False
always_keep_archives: False
archive_download_location: .
min_module_size: 41
[requests]
connection_timeout: 3.5
response_timeout: 30
max_retries_on_connection_error: 5
retry_backoff: 0.1
max_retries_on_checksum_error: 5
max_retries_to_retrieve_hash: 5
hash_algorithm: sha256
INSECURE_NOT_FOR_PRODUCTION_ignore_hash: False
[mirrors]
trusted_mirrors:
https://download.qt.io
https://qt.mirror.constant.com/
https://ftp.fau.de/qtproject/
blacklist:
http://mirrors.ocf.berkeley.edu
http://mirrors.tuna.tsinghua.edu.cn
http://mirrors.geekpie.club
fallbacks:
https://qtproject.mirror.liquidtelecom.com/
https://mirrors.aliyun.com/qt/
https://mirrors.ustc.edu.cn/qtproject/
https://ftp.jaist.ac.jp/pub/qtproject/
https://ftp.yz.yamagata-u.ac.jp/pub/qtproject/
https://qt-mirror.dannhauer.de/
https://ftp.fau.de/qtproject/
https://mirror.netcologne.de/qtproject/
https://mirrors.dotsrc.org/qtproject/
https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/
https://master.qt.io/
https://mirrors.ukfast.co.uk/sites/qt.io/
https://ftp2.nluug.nl/languages/qt/
https://ftp1.nluug.nl/languages/qt/
https://qt.mirror.constant.com/

View File

@ -42,7 +42,7 @@ BUILD_DEF = """
| focal | native_static | d | d | dBPSD | dBPSD | | linux-x86_64 | linux-x86_64-static |
| focal | native_mixed | BPS | BPS | | | | linux-x86_64 | |
| focal | native_dyn | d | d | dB | dB | | | linux-x86_64-dyn |
| jammy | native_dyn | d | d | | | dBPS | | linux-x86_64-dyn |
| jammy | native_dyn | | | | | dBPS | | linux-x86_64-dyn |
# libzim CI is building alpine_dyn but not us
| focal | android_arm | dBP | dBP | | | | android-arm | android-arm |
| focal | android_arm64 | dBP | dBP | | | | android-arm64 | android-arm64 |

View File

@ -37,11 +37,14 @@ jobs:
pip3 install meson pytest requests distro paramiko
pip3 install --no-deps $GITHUB_WORKSPACE
- name: Install QT
if: ${{ matrix.config == 'native_mixed' }}
uses: jurplel/install-qt-action@v4
with:
version: 5.15.2
modules: "qtwebengine"
setup-python: false
env:
AQT_CONFIG: ${{ github.workspace }}/.github/configs/aqt.ini
- name: Setup MSVC compiler
uses: bus1/cabuild/action/msdevshell@v1
with:
@ -251,7 +254,7 @@ jobs:
python-version: '3.10'
- name: Install packages
run:
brew install ninja automake
brew install automake # ninja
- name: Install python modules
run: |
pip3 install meson pytest requests distro

View File

@ -35,11 +35,14 @@ jobs:
pip3 install meson pytest requests distro paramiko
pip3 install --no-deps $GITHUB_WORKSPACE
- name: Install QT
if: ${{ matrix.config == 'native_mixed' }}
uses: jurplel/install-qt-action@v4
with:
version: 6.4.3
modules: "qtwebengine qtwebchannel qtpositioning"
setup-python: false
env:
AQT_CONFIG: ${{ github.workspace }}/.github/configs/aqt.ini
- name: Setup MSVC compiler
uses: bus1/cabuild/action/msdevshell@v1
with:
@ -239,7 +242,7 @@ jobs:
python-version: '3.10'
- name: Install packages
run:
brew install ninja automake
brew install automake # ninja
- name: Install python modules
run: |
pip3 install meson pytest requests distro paramiko

View File

@ -42,10 +42,10 @@ class NeutralEnv:
def detect_platform(self):
_platform = platform.system()
self.distname = _platform
self.codename = ""
if _platform == "Linux":
self.distname = distro.id()
if self.distname == "ubuntu":
self.distname = "debian"
self.codename = distro.codename()
def download(self, what, where=None):
where = where or self.archive_dir

View File

@ -124,30 +124,33 @@ class Builder:
def _get_packages(self):
packages_list = []
for config in ConfigInfo.all_running_configs.values():
mapper_name = "{host}_{config}".format(
host=neutralEnv("distname"), config=config
)
package_name_mapper = PACKAGE_NAME_MAPPERS.get(mapper_name, {})
packages_list += package_name_mapper.get("COMMON", [])
for runningConfig in ConfigInfo.all_running_configs.values():
for mapper_name in self._get_mapper_names_for_config(runningConfig):
package_name_mapper = PACKAGE_NAME_MAPPERS.get(mapper_name, {})
packages_list += package_name_mapper.get("COMMON", [])
to_drop = []
for builderDef in self._targets:
configName, builderName = builderDef
mapper_name = "{host}_{config}".format(
host=neutralEnv("distname"), config=configName
)
package_name_mapper = PACKAGE_NAME_MAPPERS.get(mapper_name, {})
packages = package_name_mapper.get(builderName)
if packages:
to_drop.append(builderDef)
if packages is not True:
# True means "assume the dependency is install but do not try to install anything for it"
packages_list += packages
builderConfig, builderName = builderDef
for mapper_name in self._get_mapper_names_for_config(builderConfig):
package_name_mapper = PACKAGE_NAME_MAPPERS.get(mapper_name, {})
packages = package_name_mapper.get(builderName)
if packages:
to_drop.append(builderDef)
if packages is not True:
# True means "assume the dependency is install but do not try to install anything for it"
packages_list += packages
for dep in to_drop:
del self._targets[dep]
return packages_list
def _get_mapper_names_for_config(self, config):
host = neutralEnv("distname")
codename = neutralEnv("codename")
return ( f"{host}_{config}", f"{host}_{codename}_{config}" )
def install_packages(self):
packages_to_have = self._get_packages()
packages_to_have = remove_duplicates(packages_to_have)
@ -160,7 +163,7 @@ class Builder:
if distname in ("fedora", "redhat", "centos"):
package_installer = "sudo dnf install {}"
package_checker = "rpm -q --quiet {}"
elif distname in ("debian", "Ubuntu"):
elif distname in ("debian", "ubuntu"):
package_installer = "sudo apt-get install {}"
package_checker = 'LANG=C dpkg -s {} 2>&1 | grep Status | grep "ok installed" 1>/dev/null 2>&1'
elif distname == "Darwin":

View File

@ -7,7 +7,7 @@ class AndroidConfigInfo(ConfigInfo):
build = "android"
static = True
toolchain_names = ["android-ndk"]
compatible_hosts = ["fedora", "debian"]
compatible_hosts = ["fedora", "debian", "ubuntu"]
def __str__(self):
return "android"

View File

@ -6,7 +6,7 @@ from kiwixbuild._global import get_target_step
# Base config for arm
class ArmConfigInfo(ConfigInfo):
compatible_hosts = ["fedora", "debian", "almalinux"]
compatible_hosts = ["fedora", "debian", "ubuntu", "almalinux"]
def get_cross_config(self):
return {

View File

@ -8,7 +8,7 @@ class FlatpakConfigInfo(ConfigInfo):
build = "flatpak"
static = ""
toolchain_names = ["org.kde", "io.qt.qtwebengine"]
compatible_hosts = ["debian", "fedora"]
compatible_hosts = ["debian", "ubuntu", "fedora"]
def __str__(self):
return "flatpak"

View File

@ -7,7 +7,7 @@ from kiwixbuild.utils import which, pj
class I586ConfigInfo(ConfigInfo):
build = "i586"
arch_full = "i586-linux-gnu"
compatible_hosts = ["fedora", "debian"]
compatible_hosts = ["fedora", "debian", "ubuntu"]
def get_cross_config(self):
return {

View File

@ -5,7 +5,7 @@ from kiwixbuild._global import get_target_step
class MuslConfigInfo(ConfigInfo):
compatible_hosts = ["fedora", "debian"]
compatible_hosts = ["fedora", "debian", "ubuntu"]
def get_cross_config(self):
return {

View File

@ -29,16 +29,16 @@ class NativeConfigInfo(ConfigInfo):
class NativeDyn(NativeConfigInfo):
name = "native_dyn"
static = False
compatible_hosts = ["fedora", "debian", "Darwin", "almalinux", "Windows"]
compatible_hosts = ["fedora", "debian", "ubuntu", "Darwin", "almalinux", "Windows"]
class NativeStatic(NativeConfigInfo):
name = "native_static"
static = True
compatible_hosts = ["fedora", "debian", "Darwin", "almalinux", "Windows"]
compatible_hosts = ["fedora", "debian", "ubuntu", "Darwin", "almalinux", "Windows"]
class NativeMixed(MixedMixin("native_static"), NativeConfigInfo):
name = "native_mixed"
static = False
compatible_hosts = ["fedora", "debian", "Darwin", "almalinux", "Windows"]
compatible_hosts = ["fedora", "debian", "ubuntu", "Darwin", "almalinux", "Windows"]

View File

@ -5,7 +5,7 @@ class NeutralConfigInfo(ConfigInfo):
name = "neutral"
arch_name = "neutral"
static = ""
compatible_hosts = ["fedora", "debian", "Darwin"]
compatible_hosts = ["fedora", "debian", "ubuntu", "Darwin"]
def __str__(self):
return "neutral"

View File

@ -12,7 +12,7 @@ class WasmConfigInfo(ConfigInfo):
libdir = "lib"
# arch_full = 'wasm64-linux'
toolchain_names = ["emsdk"]
compatible_hosts = ["fedora", "debian"]
compatible_hosts = ["fedora", "debian", "ubuntu"]
exe_wrapper_def = ""
def get_cross_config(self):

View File

@ -18,7 +18,7 @@ class Win64ConfigInfo(ConfigInfo):
"-lkernel32",
]
build = "win64"
compatible_hosts = ["fedora", "debian"]
compatible_hosts = ["fedora", "debian", "ubuntu"]
arch_full = "x86_64-w64-mingw32"
def get_cross_config(self):

View File

@ -9,9 +9,9 @@ class ZimTestingSuite(Dependency):
class Source(ReleaseDownload):
archive = Remotefile(
"zim-testing-suite-0.7.0.tar.gz",
"b2da1d96973c9dfd8857f96850b40755a52813189ee961881bbddcd1e28aace4",
"https://github.com/openzim/zim-testing-suite/releases/download/0.7.0/zim-testing-suite-0.7.0.tar.gz",
"zim-testing-suite-0.8.0.tar.gz",
"28f51449a3f9aea02652ca21f32c5598fd610d6cec3810fa552bd0c0f7a2d5fc",
"https://github.com/openzim/zim-testing-suite/releases/download/0.8.0/zim-testing-suite-0.8.0.tar.gz",
)
Builder = NoopBuilder

View File

@ -91,6 +91,36 @@ PACKAGE_NAME_MAPPERS = {
"debian_android": {
"COMMON": _debian_common,
},
"ubuntu_jammy_native_dyn": {
"COMMON": _debian_common,
"zlib": ["zlib1g-dev"],
"uuid": ["uuid-dev"],
"libmicrohttpd": ["libmicrohttpd-dev", "ccache"],
"qt": ["qt6-base-dev", "qt6-base-dev-tools", "libqt6webenginecore6-bin", "libqt6svg6", "qtchooser"],
"qtwebengine": ["qt6-webengine-dev"],
"aria2": ["aria2"],
},
"ubuntu_noble_native_dyn": {
"COMMON": _debian_common,
"zlib": ["zlib1g-dev"],
"uuid": ["uuid-dev"],
"libmicrohttpd": ["libmicrohttpd-dev", "ccache"],
"qt": ["qt6-base-dev", "qt6-base-dev-tools", "libqt6webenginecore6-bin", "libqt6svg6", "qtchooser"],
"qtwebengine": ["qt6-webengine-dev"],
"aria2": ["aria2"],
},
"ubuntu_oracular_native_dyn": {
"COMMON": _debian_common,
"zlib": ["zlib1g-dev"],
"uuid": ["uuid-dev"],
"libmicrohttpd": ["libmicrohttpd-dev", "ccache"],
"qt": ["qt6-base-dev", "qt6-base-dev-tools", "libqt6webenginecore6-bin", "libqt6svg6", "qtchooser"],
"qtwebengine": ["qt6-webengine-dev"],
"aria2": ["aria2"],
},
"ubuntu_native_static": {
"COMMON": _debian_common + ["libbz2-dev", "libmagic-dev"],
},
"Darwin_native_dyn": {
"COMMON": ["autoconf", "automake", "libtool", "cmake", "pkg-config"],
"file": ["libmagic"],

View File

@ -1,7 +1,7 @@
# This file reference all the versions of the depedencies we use in kiwix-build.
main_project_versions = {
"libzim": "9.2.3",
"libzim": "9.3.0",
"libkiwix": "14.0.0",
"kiwix-tools": "3.7.0",
"zim-tools": "3.5.0",
@ -23,11 +23,11 @@ main_project_versions = {
# - Else, increment the value. If no value was present, see `(was ...)`.
release_versions = {
"libzim": None, # Depends of base deps (was 2)
"libzim": 0, # Depends of base deps (was 2)
"libkiwix": None, # Depends of libzim (was 1)
"kiwix-tools": None, # Depends of libkiwix and libzim (was 2)
"zim-tools": None, # Depends of libzim (was 0)
"kiwix-desktop": 0, # Depends of libkiwix and libzim (was 0)
"kiwix-desktop": None, # Depends of libkiwix and libzim (was 0)
}
@ -52,6 +52,6 @@ base_deps_versions = {
"android-ndk": "r21e",
"org.kde": "6.7",
"io.qt.qtwebengine": "6.7",
"zim-testing-suite": "0.7.0",
"zim-testing-suite": "0.8.0",
"emsdk": "3.1.41",
}