* Rewrite WASM support

* Add WASM tests to CI, update CI to test more the latest versions, add auto EMSDK version detection function

* Fix some mistakes, typos, moved emsdk version function into BuildJob

* Fix issue related to extensions interfering with wasm on 6.8+

* Fix tests

* Remove dep on Version in CI

* Remove safety before patch

* handle cases where extensions don't exist.

for example with windows desktop 6.8.1 win64_msvc2022_arm64_cross_compiled
both qtwebengine and qtpdf don't exist.

Signed-off-by: Alexandre 'Kidev' Poumaroux <1204936+Kidev@users.noreply.github.com>

* for --long-modules assume extension doesn't exist on download error.

Signed-off-by: Alexandre 'Kidev' Poumaroux <1204936+Kidev@users.noreply.github.com>

* for --modules assume extension doesn't exist for download failures.

Signed-off-by: Alexandre 'Kidev' Poumaroux <1204936+Kidev@users.noreply.github.com>

* reformat with black

Signed-off-by: Alexandre 'Kidev' Poumaroux <1204936+Kidev@users.noreply.github.com>

* fix flake8 regression that doesn't occur locally.

Signed-off-by: Alexandre 'Kidev' Poumaroux <1204936+Kidev@users.noreply.github.com>

* Fix autodesktop by also updating the OS when searching for a valid desktop version to download

* Fix extension issue, reduce the possible retry for getting extensions to prevent server spam

* Fix CI asking for msvc2019 on 6.8+ but its no longer supported

* Make CI use C++20 and MSVC2022

* Fix linux build

* Update runners to windows-2022

Signed-off-by: Alexandre 'Kidev' Poumaroux <1204936+Kidev@users.noreply.github.com>

* Fix patching

Signed-off-by: Alexandre 'Kidev' Poumaroux <1204936+Kidev@users.noreply.github.com>

* Add back the semantic version changes to prevent crashes, add tests for it

* Update checks

* Cast 'https://mirrors.ustc.edu.cn' to the shadow realm

* Again

* Update settings.ini

* Update settings.ini

* Update settings.ini

* Remove one_rep on silent

* Update settings.ini

* Restore master settings, remove hash check

* ci: Use specific mirror

Attempt to work around download errors in Azure due to Qt's official download site often redirecting to mirrors to which the network connection is unstable

Signed-off-by: Alexandre 'Kidev' Poumaroux <1204936+Kidev@users.noreply.github.com>

* Re enable hash checking

* Treat read timeout error during download as connection error

Signed-off-by: Alexandre 'Kidev' Poumaroux <1204936+Kidev@users.noreply.github.com>

* Add test for modules in WASM with autodesktop

* Fix format

* Fix test

* Make '--autodesktop' trigger its own install process, and test it

* Fix older autodesktop tests

* Add mock update files for 680 wasm, add test for wasm 680 autodesktop

* Passes the additional tests

* Fix format

* Improve coverage, fix format

* Fix tests and improve logging or install

* Fix format

* Fix regression in other tests

* Use flavor

* Fix line len

* Fix codeql

* Fix list-qt for WASM arch on 6.5.x and 6.6.x, restore to original download URL

* Fix test error

* Revert ci settings URL as it is never used by clients, only in CI

* Add comment for clarity in ci/settings.ini

---------

Signed-off-by: Alexandre 'Kidev' Poumaroux <1204936+Kidev@users.noreply.github.com>
Co-authored-by: tsteven4 <13596209+tsteven4@users.noreply.github.com>
Co-authored-by: J.D. Purcell <jdpurcell@gmail.com>
This commit is contained in:
Alexandre Poumaroux
2025-01-06 07:35:40 +01:00
committed by GitHub
parent 673b1695db
commit a09b5cee28
23 changed files with 9544 additions and 172 deletions

View File

@@ -16,6 +16,17 @@ MIRRORS = [
class BuildJob:
EMSDK_FOR_QT = {
"6.2": "2.0.14",
"6.3": "3.0.0",
"6.4": "3.1.14",
"6.5": "3.1.25",
"6.6": "3.1.37",
"6.7": "3.1.50",
"6.8": "3.1.56",
}
def __init__(
self,
command,
@@ -35,7 +46,7 @@ class BuildJob:
is_autodesktop: bool = False,
tool_options: Optional[Dict[str, str]] = None,
check_output_cmd: Optional[str] = None,
emsdk_version: str = "sdk-fastcomp-1.38.27-64bit@3.1.29",
emsdk_version: str = "sdk-fastcomp-1.38.27-64bit@3.1.29", # did not change for safety, created func self.emsdk_version()
autodesk_arch_folder: Optional[str] = None,
):
self.command = command
@@ -102,6 +113,24 @@ class BuildJob:
else:
return "tools_mingw"
def emsdk_version(self) -> str:
return BuildJob.emsdk_version_for_qt(self.qt_version)
@staticmethod
def emsdk_version_for_qt(version_of_qt: str) -> str:
qt_major_minor = ".".join(version_of_qt.split(".")[:2])
if qt_major_minor in BuildJob.EMSDK_FOR_QT:
return BuildJob.EMSDK_FOR_QT[qt_major_minor]
# Find the latest version using string comparison
latest_version = "0.0"
for version in BuildJob.EMSDK_FOR_QT.keys():
if version > latest_version:
latest_version = version
return BuildJob.EMSDK_FOR_QT[latest_version]
class PlatformBuildJobs:
def __init__(self, platform, build_jobs):
@@ -111,7 +140,7 @@ class PlatformBuildJobs:
python_versions = ["3.12"]
qt_versions = ["6.5.3"]
qt_versions = ["6.8.1"]
linux_build_jobs = []
linux_arm64_build_jobs = []
@@ -128,7 +157,7 @@ all_platform_build_jobs = [
# Linux Desktop
for qt_version in qt_versions:
linux_build_jobs.append(
BuildJob("install-qt", qt_version, "linux", "desktop", "gcc_64", "gcc_64")
BuildJob("install-qt", qt_version, "linux", "desktop", "linux_gcc_64", "gcc_64")
)
linux_arm64_build_jobs.append(BuildJob("install-qt", "6.7.0", "linux_arm64", "desktop", "linux_gcc_arm64", "gcc_arm64"))
@@ -148,7 +177,7 @@ mac_build_jobs.append(BuildJob(
# Windows Desktop
for qt_version in qt_versions:
windows_build_jobs.append(BuildJob("install-qt", qt_version, "windows", "desktop", "win64_msvc2019_64", "msvc2019_64"))
windows_build_jobs.append(BuildJob("install-qt", qt_version, "windows", "desktop", "win64_msvc2022_64", "msvc2022_64"))
windows_build_jobs.extend(
[
BuildJob(
@@ -239,6 +268,22 @@ windows_build_jobs.append(
mingw_variant="win64_mingw900")
)
# WASM post 6.7.x
linux_build_jobs.append(
BuildJob("install-qt", "6.7.3", "all_os", "wasm", "wasm_multithread", "wasm_multithread",
is_autodesktop=True, emsdk_version=f"sdk-{BuildJob.emsdk_version_for_qt("6.7.3")}-64bit", autodesk_arch_folder="gcc_64")
)
for job_queue, host, desk_arch, target, qt_version in (
(linux_build_jobs, "all_os", "linux_gcc_64", "wasm", qt_versions[0]),
(mac_build_jobs, "all_os", "clang_64", "wasm", qt_versions[0]),
(windows_build_jobs, "all_os", "mingw_64", "wasm", qt_versions[0]),
):
for wasm_arch in ("wasm_singlethread", "wasm_multithread"):
job_queue.append(
BuildJob("install-qt", qt_version, host, target, wasm_arch, wasm_arch,
is_autodesktop=True, emsdk_version=f"sdk-{BuildJob.emsdk_version_for_qt(qt_version)}-64bit", autodesk_arch_folder=desk_arch)
)
# mobile SDK
mac_build_jobs.extend(
[