forked from qt-creator/qt-creator
GitHub Actions: Update Qt to 6.2.0
Change-Id: I657838699d95adc48c1b5b9b8e091a53369890f7 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
49
.github/workflows/build_cmake.yml
vendored
49
.github/workflows/build_cmake.yml
vendored
@@ -3,7 +3,7 @@ name: CMake Build Matrix
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
QT_VERSION: 5.15.2
|
QT_VERSION: 6.2.0
|
||||||
CLANG_VERSION: 130
|
CLANG_VERSION: 130
|
||||||
ELFUTILS_VERSION: 0.175
|
ELFUTILS_VERSION: 0.175
|
||||||
CMAKE_VERSION: 3.21.1
|
CMAKE_VERSION: 3.21.1
|
||||||
@@ -111,24 +111,20 @@ jobs:
|
|||||||
set(qt_package_arch_suffix "win64_msvc2019_64")
|
set(qt_package_arch_suffix "win64_msvc2019_64")
|
||||||
set(qt_dir_prefix "${qt_version}/msvc2019_64")
|
set(qt_dir_prefix "${qt_version}/msvc2019_64")
|
||||||
set(qt_package_suffix "-Windows-Windows_10-MSVC2019-Windows-Windows_10-X86_64")
|
set(qt_package_suffix "-Windows-Windows_10-MSVC2019-Windows-Windows_10-X86_64")
|
||||||
elseif ("${{ matrix.config.environment_script }}" MATCHES "vcvars32.bat")
|
|
||||||
set(qt_package_arch_suffix "win32_msvc2019")
|
|
||||||
set(qt_dir_prefix "${qt_version}/msvc2019")
|
|
||||||
set(qt_package_suffix "-Windows-Windows_10-MSVC2019-Windows-Windows_10-X86")
|
|
||||||
endif()
|
endif()
|
||||||
elseif ("${{ runner.os }}" STREQUAL "Linux")
|
elseif ("${{ runner.os }}" STREQUAL "Linux")
|
||||||
set(url_os "linux_x64")
|
set(url_os "linux_x64")
|
||||||
set(qt_package_arch_suffix "gcc_64")
|
set(qt_package_arch_suffix "gcc_64")
|
||||||
set(qt_dir_prefix "${qt_version}/gcc_64")
|
set(qt_dir_prefix "${qt_version}/gcc_64")
|
||||||
set(qt_package_suffix "-Linux-RHEL_7_6-GCC-Linux-RHEL_7_6-X86_64")
|
set(qt_package_suffix "-Linux-RHEL_8_2-GCC-Linux-RHEL_8_2-X86_64")
|
||||||
elseif ("${{ runner.os }}" STREQUAL "macOS")
|
elseif ("${{ runner.os }}" STREQUAL "macOS")
|
||||||
set(url_os "mac_x64")
|
set(url_os "mac_x64")
|
||||||
set(qt_package_arch_suffix "clang_64")
|
set(qt_package_arch_suffix "clang_64")
|
||||||
set(qt_dir_prefix "${qt_version}/clang_64")
|
set(qt_dir_prefix "${qt_version}/macos")
|
||||||
set(qt_package_suffix "-MacOS-MacOS_10_13-Clang-MacOS-MacOS_10_13-X86_64")
|
set(qt_package_suffix "-MacOS-MacOS_11_00-Clang-MacOS-MacOS_11_00-X86_64-ARM64")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(qt_base_url "https://\${qt_mirror}/online/qtsdkrepository/${url_os}/desktop/qt5_${qt_version_dotless}")
|
set(qt_base_url "https://\${qt_mirror}/online/qtsdkrepository/${url_os}/desktop/qt6_${qt_version_dotless}")
|
||||||
foreach(qt_mirror $ENV{QT_MIRRORS})
|
foreach(qt_mirror $ENV{QT_MIRRORS})
|
||||||
cmake_language(EVAL CODE "
|
cmake_language(EVAL CODE "
|
||||||
message(\"Downloading: ${qt_base_url}/Updates.xml\")
|
message(\"Downloading: ${qt_base_url}/Updates.xml\")
|
||||||
@@ -141,13 +137,13 @@ jobs:
|
|||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
file(READ ./Updates.xml updates_xml)
|
file(READ ./Updates.xml updates_xml)
|
||||||
string(REGEX MATCH "<Name>qt.qt5.*<Version>([0-9+-.]+)</Version>" updates_xml_output "${updates_xml}")
|
string(REGEX MATCH "<Name>qt.qt6.*<Version>([0-9+-.]+)</Version>" updates_xml_output "${updates_xml}")
|
||||||
set(qt_package_version ${CMAKE_MATCH_1})
|
set(qt_package_version ${CMAKE_MATCH_1})
|
||||||
|
|
||||||
file(MAKE_DIRECTORY qt5)
|
file(MAKE_DIRECTORY qt6)
|
||||||
|
|
||||||
# Save the path for other steps
|
# Save the path for other steps
|
||||||
file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/qt5/${qt_dir_prefix}" qt_dir)
|
file(TO_CMAKE_PATH "$ENV{GITHUB_WORKSPACE}/qt6/${qt_dir_prefix}" qt_dir)
|
||||||
message("::set-output name=qt_dir::${qt_dir}")
|
message("::set-output name=qt_dir::${qt_dir}")
|
||||||
|
|
||||||
function(downloadAndExtract url archive)
|
function(downloadAndExtract url archive)
|
||||||
@@ -161,19 +157,26 @@ jobs:
|
|||||||
break()
|
break()
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ../${archive} WORKING_DIRECTORY qt5)
|
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ../${archive} WORKING_DIRECTORY qt6)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
foreach(package qtbase qtdeclarative qttools qtsvg qtserialport qtquickcontrols qtquickcontrols2 qtgraphicaleffects qtlocation qtimageformats qttranslations)
|
foreach(package qtbase qtdeclarative qttools qtsvg qttranslations)
|
||||||
downloadAndExtract(
|
downloadAndExtract(
|
||||||
"${qt_base_url}/qt.qt5.${qt_version_dotless}.${qt_package_arch_suffix}/${qt_package_version}${package}${qt_package_suffix}.7z"
|
"${qt_base_url}/qt.qt6.${qt_version_dotless}.${qt_package_arch_suffix}/${qt_package_version}${package}${qt_package_suffix}.7z"
|
||||||
${package}.7z
|
${package}.7z
|
||||||
)
|
)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
foreach(package qtquicktimeline qtquick3d qtscript)
|
foreach(package qtimageformats qtserialport)
|
||||||
downloadAndExtract(
|
downloadAndExtract(
|
||||||
"${qt_base_url}/qt.qt5.${qt_version_dotless}.${package}.${qt_package_arch_suffix}/${qt_package_version}${package}${qt_package_suffix}.7z"
|
"${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
|
${package}.7z
|
||||||
)
|
)
|
||||||
endforeach()
|
endforeach()
|
||||||
@@ -181,17 +184,17 @@ jobs:
|
|||||||
# uic depends on libicu56.so
|
# uic depends on libicu56.so
|
||||||
if ("${{ runner.os }}" STREQUAL "Linux")
|
if ("${{ runner.os }}" STREQUAL "Linux")
|
||||||
downloadAndExtract(
|
downloadAndExtract(
|
||||||
"${qt_base_url}/qt.qt5.${qt_version_dotless}.${qt_package_arch_suffix}/${qt_package_version}icu-linux-Rhel7.2-x64.7z"
|
"${qt_base_url}/qt.qt6.${qt_version_dotless}.${qt_package_arch_suffix}/${qt_package_version}icu-linux-Rhel7.2-x64.7z"
|
||||||
icu.7z
|
icu.7z
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(READ "qt5/${qt_dir_prefix}/mkspecs/qconfig.pri" qtconfig)
|
file(READ "qt6/${qt_dir_prefix}/mkspecs/qconfig.pri" qtconfig)
|
||||||
string(REPLACE "Enterprise" "OpenSource" qtconfig "${qtconfig}")
|
string(REPLACE "Enterprise" "OpenSource" qtconfig "${qtconfig}")
|
||||||
string(REPLACE "licheck.exe" "" qtconfig "${qtconfig}")
|
string(REPLACE "licheck.exe" "" qtconfig "${qtconfig}")
|
||||||
string(REPLACE "licheck64" "" qtconfig "${qtconfig}")
|
string(REPLACE "licheck64" "" qtconfig "${qtconfig}")
|
||||||
string(REPLACE "licheck_mac" "" qtconfig "${qtconfig}")
|
string(REPLACE "licheck_mac" "" qtconfig "${qtconfig}")
|
||||||
file(WRITE "qt5/${qt_dir_prefix}/mkspecs/qconfig.pri" "${qtconfig}")
|
file(WRITE "qt6/${qt_dir_prefix}/mkspecs/qconfig.pri" "${qtconfig}")
|
||||||
|
|
||||||
if ("${{ runner.os }}" STREQUAL "Windows")
|
if ("${{ runner.os }}" STREQUAL "Windows")
|
||||||
# deploy "system" runtimes into Qt, so they get deployed as well
|
# deploy "system" runtimes into Qt, so they get deployed as well
|
||||||
@@ -199,7 +202,7 @@ jobs:
|
|||||||
# deploy MinGW
|
# deploy MinGW
|
||||||
foreach(file libwinpthread-1.dll libstdc++-6.dll libgcc_s_seh-1.dll)
|
foreach(file libwinpthread-1.dll libstdc++-6.dll libgcc_s_seh-1.dll)
|
||||||
file(INSTALL "C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/${file}"
|
file(INSTALL "C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin/${file}"
|
||||||
DESTINATION "qt5/${qt_dir_prefix}/bin"
|
DESTINATION "qt6/${qt_dir_prefix}/bin"
|
||||||
USE_SOURCE_PERMISSIONS)
|
USE_SOURCE_PERMISSIONS)
|
||||||
endforeach()
|
endforeach()
|
||||||
else()
|
else()
|
||||||
@@ -207,7 +210,7 @@ jobs:
|
|||||||
foreach(file vcruntime140.dll concrt140.dll msvcp140_1.dll msvcp140_2.dll
|
foreach(file vcruntime140.dll concrt140.dll msvcp140_1.dll msvcp140_2.dll
|
||||||
msvcp140_codecvt_ids.dll vcruntime140_1.dll msvcp140.dll)
|
msvcp140_codecvt_ids.dll vcruntime140_1.dll msvcp140.dll)
|
||||||
file(INSTALL "C:/Windows/System32/${file}"
|
file(INSTALL "C:/Windows/System32/${file}"
|
||||||
DESTINATION "qt5/${qt_dir_prefix}/bin")
|
DESTINATION "qt6/${qt_dir_prefix}/bin")
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
@@ -377,7 +380,7 @@ jobs:
|
|||||||
COMMAND sudo apt update
|
COMMAND sudo apt update
|
||||||
)
|
)
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND sudo apt install libgl1-mesa-dev
|
COMMAND sudo apt install libgl1-mesa-dev libvulkan-dev libxcb-xinput-dev libxcb-xinerama0-dev libxkbcommon-dev libxkbcommon-x11-dev
|
||||||
RESULT_VARIABLE result
|
RESULT_VARIABLE result
|
||||||
)
|
)
|
||||||
if (NOT result EQUAL 0)
|
if (NOT result EQUAL 0)
|
||||||
|
Reference in New Issue
Block a user