forked from qt-creator/qt-creator
GitHub Actions: Update Qt to 6.8.1
Qt Creator 15 has been officially compiled against Qt 6.8.1. Also the MinGW compiler used has been bumped to MinGW GCC 13.1.0 Change-Id: I9795df138b50960300b0e39d01928122b661f25f Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
122
.github/workflows/build_cmake.yml
vendored
122
.github/workflows/build_cmake.yml
vendored
@@ -7,7 +7,7 @@ on:
|
||||
- 'doc/**'
|
||||
|
||||
env:
|
||||
QT_VERSION: 6.7.2
|
||||
QT_VERSION: 6.8.1
|
||||
MACOS_DEPLOYMENT_TARGET: 11.0
|
||||
CLANG_VERSION: 19.1.6
|
||||
ELFUTILS_VERSION: 0.175
|
||||
@@ -37,8 +37,8 @@ jobs:
|
||||
- {
|
||||
name: "Windows Latest MinGW", artifact: "windows-x64-mingw",
|
||||
os: windows-latest,
|
||||
toolchain: "https://github.com/cristianadam/mingw-builds/releases/download/v11.2.0-rev1/x86_64-11.2.0-release-posix-seh-rt_v9-rev1.7z",
|
||||
toolchain_path: "mingw64/bin",
|
||||
toolchain: "https://download.qt.io/online/qtsdkrepository/windows_x86/desktop/tools_mingw1310/qt.tools.win64_mingw1310/13.1.0-202407240918mingw1310.7z",
|
||||
toolchain_path: "Tools/mingw1310_64/bin",
|
||||
cc: "gcc", cxx: "g++",
|
||||
is_msvc: false
|
||||
}
|
||||
@@ -202,97 +202,77 @@ jobs:
|
||||
if ("${{ runner.os }}" STREQUAL "Windows")
|
||||
set(url_os "windows_x86")
|
||||
if ("x${{ matrix.config.environment_script }}" STREQUAL "x")
|
||||
set(qt_package_arch_suffix "win64_mingw")
|
||||
set(qt_dir_prefix "${qt_version}/mingw_64")
|
||||
set(qt_package_suffix "-Windows-Windows_10_22H2-Mingw-Windows-Windows_10_22H2-X86_64")
|
||||
set(compiler_id "win64_mingw")
|
||||
elseif ("${{ matrix.config.environment_script }}" MATCHES "vcvars64.bat")
|
||||
set(qt_package_arch_suffix "win64_msvc2019_64")
|
||||
set(qt_dir_prefix "${qt_version}/msvc2019_64")
|
||||
set(qt_package_suffix "-Windows-Windows_10_22H2-MSVC2019-Windows-Windows_10_22H2-X86_64")
|
||||
set(compiler_id "win64_msvc2022_64")
|
||||
endif()
|
||||
elseif ("${{ runner.os }}" STREQUAL "Linux")
|
||||
set(url_os "linux_x64")
|
||||
set(qt_package_arch_suffix "linux_gcc_64")
|
||||
set(qt_dir_prefix "${qt_version}/gcc_64")
|
||||
set(qt_package_suffix "-Linux-RHEL_8_8-GCC-Linux-RHEL_8_8-X86_64")
|
||||
set(compiler_id "linux_gcc_64")
|
||||
elseif ("${{ runner.os }}" STREQUAL "macOS")
|
||||
set(url_os "mac_x64")
|
||||
set(qt_package_arch_suffix "clang_64")
|
||||
set(qt_dir_prefix "${qt_version}/macos")
|
||||
set(qt_package_suffix "-MacOS-MacOS_13-Clang-MacOS-MacOS_13-X86_64-ARM64")
|
||||
set(compiler_id "clang_64")
|
||||
endif()
|
||||
|
||||
set(qt_base_url "https://\${qt_mirror}/online/qtsdkrepository/${url_os}/desktop/qt6_${qt_version_dotless}")
|
||||
foreach(qt_mirror $ENV{QT_MIRRORS})
|
||||
cmake_language(EVAL CODE "
|
||||
message(\"Downloading: ${qt_base_url}/Updates.xml\")
|
||||
file(DOWNLOAD \"${qt_base_url}/Updates.xml\" ./Updates.xml)
|
||||
")
|
||||
file(SIZE ./Updates.xml fileSize)
|
||||
if (fileSize GREATER 0)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
set(qt_base_url "https://download.qt.io/online/qtsdkrepository/${url_os}/desktop/qt6_${qt_version_dotless}/qt6_${qt_version_dotless}")
|
||||
file(DOWNLOAD "${qt_base_url}/Updates.xml" ./Updates.xml SHOW_PROGRESS)
|
||||
|
||||
file(READ ./Updates.xml updates_xml)
|
||||
string(REGEX MATCH "<Name>qt.qt6.*<Version>([0-9+-.]+)</Version>" updates_xml_output "${updates_xml}")
|
||||
set(qt_package_version ${CMAKE_MATCH_1})
|
||||
|
||||
file(MAKE_DIRECTORY qt6)
|
||||
# get the package sections, only for given compiler, without the "debug info" ones
|
||||
string(REGEX REPLACE "<PackageUpdate>" ";<PackageUpdate>" sections "${updates_xml}")
|
||||
list(FILTER sections EXCLUDE REGEX "<Name>.*debug.*</Name>")
|
||||
list(FILTER sections INCLUDE REGEX "<Name>.*${compiler_id}.*</Name>")
|
||||
|
||||
# Save the path for other steps
|
||||
file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/qt6/${qt_dir_prefix}" qt_dir)
|
||||
file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/qt/" qt_dir)
|
||||
file(APPEND "$ENV{GITHUB_OUTPUT}" "qt_dir=${qt_dir}")
|
||||
|
||||
function(downloadAndExtract url archive)
|
||||
foreach(qt_mirror $ENV{QT_MIRRORS})
|
||||
cmake_language(EVAL CODE "
|
||||
message(\"Downloading ${url}\")
|
||||
file(DOWNLOAD \"${url}\" ./${archive})
|
||||
")
|
||||
file(SIZE ./${archive} fileSize)
|
||||
function(get_sub_url outvar module)
|
||||
set(filtered ${sections})
|
||||
list(FILTER filtered INCLUDE REGEX "<DownloadableArchives>.*${module}.*</DownloadableArchives>")
|
||||
list(LENGTH filtered count)
|
||||
if (count LESS 1)
|
||||
set(${outvar} "<notfound>" PARENT_SCOPE)
|
||||
return()
|
||||
endif()
|
||||
list(GET filtered 0 section)
|
||||
string(REGEX MATCH "<Name>(.*)</Name>" match "${section}")
|
||||
set(name ${CMAKE_MATCH_1})
|
||||
string(REGEX MATCH "<Version>(.*)</Version>" match "${section}")
|
||||
set(version ${CMAKE_MATCH_1})
|
||||
string(REGEX MATCH "<DownloadableArchives>.*(${module}[^,]+).*</DownloadableArchives>" match "${section}")
|
||||
set(archive ${CMAKE_MATCH_1})
|
||||
set(${outvar} "${name}/${version}${archive}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
message("Downloading Qt to ${qt_dir}")
|
||||
function(downloadAndExtract module subdir)
|
||||
file(MAKE_DIRECTORY "${qt_dir}/${subdir}")
|
||||
set(archive "${module}.7z")
|
||||
get_sub_url(sub_url ${module})
|
||||
set(url "${qt_base_url}/${sub_url}")
|
||||
message("Downloading ${module} from ${url}")
|
||||
message("... extracting to ${qt_dir}/${subdir}")
|
||||
foreach(retry RANGE 10)
|
||||
file(DOWNLOAD "${url}" "$ENV{GITHUB_WORKSPACE}/${archive}" SHOW_PROGRESS)
|
||||
file(SIZE "$ENV{GITHUB_WORKSPACE}/${archive}" fileSize)
|
||||
if (fileSize GREATER 0)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ../${archive} WORKING_DIRECTORY qt6)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf "$ENV{GITHUB_WORKSPACE}/${archive}" WORKING_DIRECTORY "${qt_dir}/${subdir}")
|
||||
endfunction()
|
||||
|
||||
foreach(package qtbase qtdeclarative qttools qtsvg qttranslations)
|
||||
downloadAndExtract(
|
||||
"${qt_base_url}/qt.qt6.${qt_version_dotless}.${qt_package_arch_suffix}/${qt_package_version}${package}${qt_package_suffix}.7z"
|
||||
${package}.7z
|
||||
)
|
||||
foreach(package qtbase qtdeclarative qttools qtsvg qttranslations qtimageformats qtserialport qtquicktimeline qtquick3d qt5compat qtshadertools)
|
||||
downloadAndExtract(${package} "")
|
||||
endforeach()
|
||||
|
||||
foreach(package qtimageformats qtserialport)
|
||||
downloadAndExtract(
|
||||
"${qt_base_url}/qt.qt6.${qt_version_dotless}.addons.${package}.${qt_package_arch_suffix}/${qt_package_version}${package}${qt_package_suffix}.7z"
|
||||
${package}.7z
|
||||
)
|
||||
endforeach()
|
||||
|
||||
foreach(package qtquicktimeline qtquick3d qt5compat qtshadertools)
|
||||
downloadAndExtract(
|
||||
"${qt_base_url}/qt.qt6.${qt_version_dotless}.${package}.${qt_package_arch_suffix}/${qt_package_version}${package}${qt_package_suffix}.7z"
|
||||
${package}.7z
|
||||
)
|
||||
endforeach()
|
||||
|
||||
# uic, qmake depend on libicu*.so libraries
|
||||
# uic depends on libicu*.so
|
||||
if ("${{ runner.os }}" STREQUAL "Linux")
|
||||
downloadAndExtract(
|
||||
"${qt_base_url}/qt.qt6.${qt_version_dotless}.${qt_package_arch_suffix}/${qt_package_version}icu-linux-Rhel8.6-x86_64.7z"
|
||||
icu.7z
|
||||
)
|
||||
downloadAndExtract("icu" "lib")
|
||||
endif()
|
||||
|
||||
file(READ "qt6/${qt_dir_prefix}/mkspecs/qconfig.pri" qtconfig)
|
||||
string(REPLACE "Enterprise" "OpenSource" qtconfig "${qtconfig}")
|
||||
string(REPLACE "licheck.exe" "" qtconfig "${qtconfig}")
|
||||
string(REPLACE "licheck64" "" qtconfig "${qtconfig}")
|
||||
string(REPLACE "licheck_mac" "" qtconfig "${qtconfig}")
|
||||
file(WRITE "qt6/${qt_dir_prefix}/mkspecs/qconfig.pri" "${qtconfig}")
|
||||
execute_process(COMMAND ${qt_dir}/bin/qmake -query)
|
||||
|
||||
if ("${{ runner.os }}" STREQUAL "Windows")
|
||||
# deploy "system" runtimes into Qt, so they get deployed as well
|
||||
@@ -300,7 +280,7 @@ jobs:
|
||||
# deploy MinGW
|
||||
foreach(file libwinpthread-1.dll libstdc++-6.dll libgcc_s_seh-1.dll)
|
||||
file(INSTALL "$ENV{GITHUB_WORKSPACE}/${{ matrix.config.toolchain_path }}/${file}"
|
||||
DESTINATION "qt6/${qt_dir_prefix}/bin"
|
||||
DESTINATION "qt/bin"
|
||||
USE_SOURCE_PERMISSIONS)
|
||||
endforeach()
|
||||
else()
|
||||
@@ -308,7 +288,7 @@ jobs:
|
||||
foreach(file vcruntime140.dll concrt140.dll msvcp140_1.dll msvcp140_2.dll
|
||||
msvcp140_codecvt_ids.dll vcruntime140_1.dll msvcp140.dll)
|
||||
file(INSTALL "C:/Windows/System32/${file}"
|
||||
DESTINATION "qt6/${qt_dir_prefix}/bin")
|
||||
DESTINATION "qt/bin")
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user