-
-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
104 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
""" | ||
import collections | ||
import json | ||
import secrets as random | ||
import re | ||
from itertools import product | ||
from typing import Dict, Optional | ||
|
@@ -46,7 +45,8 @@ def __init__( | |
is_autodesktop: bool = False, | ||
tool_options: Optional[Dict[str, str]] = None, | ||
check_output_cmd: Optional[str] = None, | ||
emsdk_version: str = "[email protected]", # did not change for safety, created func self.emsdk_version() | ||
emsdk_version: str = "[email protected]", | ||
# did not change for safety, created func self.emsdk_version() | ||
autodesk_arch_folder: Optional[str] = None, | ||
): | ||
self.command = command | ||
|
@@ -167,13 +167,13 @@ def __init__(self, platform, build_jobs): | |
BuildJob("install-qt", qt_version, "mac", "desktop", "clang_64", "macos") | ||
) | ||
mac_build_jobs.append(BuildJob( | ||
"install-qt", | ||
"6.2.0", | ||
"mac", | ||
"desktop", | ||
"clang_64", | ||
"macos", | ||
module="qtcharts qtnetworkauth", )) | ||
"install-qt", | ||
"6.2.0", | ||
"mac", | ||
"desktop", | ||
"clang_64", | ||
"macos", | ||
module="qtcharts qtnetworkauth", )) | ||
|
||
# Windows Desktop | ||
for qt_version in qt_versions: | ||
|
@@ -211,7 +211,7 @@ def __init__(self, platform, build_jobs): | |
# Extra modules test | ||
linux_build_jobs.extend( | ||
[ | ||
BuildJob( | ||
BuildJob( | ||
# Archives stored as .7z | ||
"install-src", "6.1.0", "linux", "desktop", "gcc_64", "gcc_64", subarchives="qtlottie", | ||
# Fail the job if this path does not exist: | ||
|
@@ -235,10 +235,12 @@ def __init__(self, platform, build_jobs): | |
"install-example", "6.1.3", "linux", "desktop", "gcc_64", "gcc_64", | ||
subarchives="qtdoc", module="qtcharts", | ||
# Fail the job if these paths do not exist: | ||
check_output_cmd="ls -lh ./Examples/Qt-6.1.3/charts/ ./Examples/Qt-6.1.3/demos/ ./Examples/Qt-6.1.3/tutorials/", | ||
check_output_cmd="ls -lh ./Examples/Qt-6.1.3/charts/ ./Examples/Qt-6.1.3/demos/ " | ||
"./Examples/Qt-6.1.3/tutorials/", | ||
), | ||
# test for list commands | ||
BuildJob('list-qt', '6.1.0', 'linux', 'desktop', 'gcc_64', '', spec=">6.0,<6.1.1", list_options={'HAS_WASM': "False"}), | ||
BuildJob('list-qt', '6.1.0', 'linux', 'desktop', 'gcc_64', '', spec=">6.0,<6.1.1", | ||
list_options={'HAS_WASM': "False"}), | ||
BuildJob('list-qt', '6.1.0', 'linux', 'android', 'android_armv7', '', spec=">6.0,<6.1.1", list_options={}), | ||
] | ||
) | ||
|
@@ -271,7 +273,8 @@ def __init__(self, platform, build_jobs): | |
# 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") | ||
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]), | ||
|
@@ -281,7 +284,8 @@ def __init__(self, platform, build_jobs): | |
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) | ||
is_autodesktop=True, emsdk_version=f"sdk-{BuildJob.emsdk_version_for_qt(qt_version)}-64bit", | ||
autodesk_arch_folder=desk_arch) | ||
) | ||
|
||
# mobile SDK | ||
|
@@ -296,6 +300,7 @@ def __init__(self, platform, build_jobs): | |
[ | ||
BuildJob("install-qt", "6.1.3", "linux", "android", "android_armv7", "android_armv7", is_autodesktop=True), | ||
BuildJob("install-qt", "6.4.3", "linux", "android", "android_arm64_v8a", "android_arm64_v8a", is_autodesktop=True), | ||
BuildJob("install-qt-commercial", "6.8.1", "", "desktop", "linux_gcc_64", module="qtquick3d", is_autodesktop=False) | ||
] | ||
) | ||
|
||
|
@@ -305,6 +310,7 @@ def __init__(self, platform, build_jobs): | |
[ | ||
BuildJob("install-qt", "6.3.2", "windows", "android", "android_armv7", "android_armv7", is_autodesktop=True), | ||
BuildJob("install-qt", "6.4.3", "windows", "android", "android_x86_64", "android_x86_64", is_autodesktop=True), | ||
BuildJob("install-qt-commercial", "6.8.1", "", "desktop", "win64_msvc2022_64", module="qtquick3d", is_autodesktop=False) | ||
] | ||
) | ||
|
||
|
@@ -375,8 +381,8 @@ def __init__(self, platform, build_jobs): | |
("OUTPUT_DIR", build_job.output_dir if build_job.output_dir else ""), | ||
("QT_BINDIR", build_job.qt_bindir()), | ||
("WIN_QT_BINDIR", build_job.win_qt_bindir()), | ||
("EMSDK_VERSION", (build_job.emsdk_version+"@main").split('@')[0]), | ||
("EMSDK_TAG", (build_job.emsdk_version+"@main").split('@')[1]), | ||
("EMSDK_VERSION", (build_job.emsdk_version + "@main").split('@')[0]), | ||
("EMSDK_TAG", (build_job.emsdk_version + "@main").split('@')[1]), | ||
("WIN_AUTODESK_QT_BINDIR", build_job.win_autodesk_qt_bindir()), | ||
("TOOL1_ARGS", build_job.tool_options.get("TOOL1_ARGS", "")), | ||
("LIST_TOOL1_CMD", build_job.tool_options.get("LIST_TOOL1_CMD", "")), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,10 @@ steps: | |
sleep $number | ||
mkdir Qt | ||
cd Qt | ||
if [[ "$(SUBCOMMAND)" == "install-qt-commercial" ]]; then | ||
SUBCOMMAND="install-qt" | ||
opt+=" --user [email protected] --password I_swear_this_is_not_a_Secr3t" | ||
fi | ||
if [[ "$(SUBCOMMAND)" == "install-qt" ]]; then | ||
opt="" | ||
if [[ "$(QT_BASE_MIRROR)" != "" ]]; then | ||
|
@@ -103,7 +107,7 @@ steps: | |
else # fail if 'wasm_32' is in the list | ||
! aqt list-qt $(HOST) $(TARGET) --arch $(QT_VERSION) | grep -w -q "wasm_32" | ||
fi | ||
# Extra check for Qt 6.5.0 WASM: | ||
for host in mac linux windows; do | ||
export WASM_ARCHES=$(aqt list-qt $host desktop --arch 6.5.0) | ||
|
@@ -194,9 +198,9 @@ steps: | |
qmake $(Build.BinariesDirectory)/tests/accelbubble | ||
make | ||
condition: | | ||
and(eq(variables['TARGET'], 'ios'), | ||
ne(variables['SUBCOMMAND'], 'list'), | ||
ne(variables['SUBCOMMAND'], 'install-tool')) | ||
and(eq(variables['TARGET'], 'ios'), | ||
ne(variables['SUBCOMMAND'], 'list'), | ||
ne(variables['SUBCOMMAND'], 'install-tool')) | ||
displayName: Build accelbubble example application to test for ios | ||
##---------------------------------------------------- | ||
|
@@ -207,8 +211,8 @@ steps: | |
path: $(MODULES_FOLDER) | ||
cacheHitVar: PSModules_IsCached | ||
condition: | | ||
and(eq(variables['Agent.OS'], 'Windows_NT'), | ||
eq(variables['SUBCOMMAND'], 'install-qt')) | ||
and(eq(variables['Agent.OS'], 'Windows_NT'), | ||
eq(variables['SUBCOMMAND'], 'install-qt')) | ||
displayName: Cache Powershell Modules | ||
# On cache miss: Download Powershell Modules to $MODULES_FOLDER | ||
- powershell: | | ||
|
@@ -218,9 +222,9 @@ steps: | |
md -p $(MODULES_FOLDER) # mkdir | ||
Save-Module -Name Pscx -AllowPrerelease -Path $(MODULES_FOLDER) | ||
condition: | | ||
and(eq(variables['Agent.OS'], 'Windows_NT'), | ||
eq(variables['SUBCOMMAND'], 'install-qt'), | ||
ne(variables.PSModules_IsCached, 'true')) | ||
and(eq(variables['Agent.OS'], 'Windows_NT'), | ||
eq(variables['SUBCOMMAND'], 'install-qt'), | ||
ne(variables.PSModules_IsCached, 'true')) | ||
displayName: Download Powershell Modules for Windows on cache miss | ||
##---------------------------------------------------- | ||
|
@@ -243,8 +247,8 @@ steps: | |
cd $(WIN_QT_BINDIR) | ||
unzip $(Build.SourcesDirectory)\ci\jom_1_1_3.zip | ||
condition: | | ||
and(eq(variables['Agent.OS'], 'Windows_NT'), | ||
eq(variables['SUBCOMMAND'], 'install-qt')) | ||
and(eq(variables['Agent.OS'], 'Windows_NT'), | ||
eq(variables['SUBCOMMAND'], 'install-qt')) | ||
displayName: Detect toolchain for Windows and update PATH | ||
# When no modules | ||
|
@@ -256,16 +260,16 @@ steps: | |
qmake $(Build.BinariesDirectory)/tests/helloworld | ||
make | ||
condition: | | ||
and( | ||
eq( variables['TARGET'], 'desktop' ), | ||
not( startsWith( variables['ARCH'], 'wasm_' ) ), | ||
or( | ||
eq(variables['Agent.OS'], 'Linux'), | ||
eq(variables['Agent.OS'], 'Darwin') | ||
), | ||
eq(variables['MODULE'], ''), | ||
eq(variables['SUBCOMMAND'], 'install-qt') | ||
) | ||
and( | ||
eq( variables['TARGET'], 'desktop' ), | ||
not( startsWith( variables['ARCH'], 'wasm_' ) ), | ||
or( | ||
eq(variables['Agent.OS'], 'Linux'), | ||
eq(variables['Agent.OS'], 'Darwin') | ||
), | ||
eq(variables['MODULE'], ''), | ||
eq(variables['SUBCOMMAND'], 'install-qt') | ||
) | ||
displayName: Build test with qmake for Linux and macOS w/o extra module | ||
# Update the MSVC build step to use the new compiler flags | ||
- powershell: | | ||
|
@@ -312,68 +316,68 @@ steps: | |
AQT_CONFIG: $(Build.SourcesDirectory)/ci/settings.ini | ||
LOG_CFG: $(Build.SourcesDirectory)/ci/logging.ini | ||
# When --archives non-empty | ||
# When --archives non-empty | ||
- script: | | ||
set -ex | ||
rm -rf $(Build.BinariesDirectory)/tests | ||
mkdir $(Build.BinariesDirectory)/tests | ||
(cd $(Build.BinariesDirectory)/tests && 7zr x $(Build.SourcesDirectory)/ci/helloworld_qttools.7z) | ||
export PATH=$(QT_BINDIR):$PATH | ||
qmake -d $(Build.BinariesDirectory)/tests/helloworld_qttools | ||
make | ||
set -ex | ||
rm -rf $(Build.BinariesDirectory)/tests | ||
mkdir $(Build.BinariesDirectory)/tests | ||
(cd $(Build.BinariesDirectory)/tests && 7zr x $(Build.SourcesDirectory)/ci/helloworld_qttools.7z) | ||
export PATH=$(QT_BINDIR):$PATH | ||
qmake -d $(Build.BinariesDirectory)/tests/helloworld_qttools | ||
make | ||
condition: | | ||
and( | ||
eq( variables['TARGET'], 'desktop' ), | ||
not( startsWith( variables['ARCH'], 'wasm_' ) ), | ||
or( | ||
eq(variables['Agent.OS'], 'Linux'), | ||
eq(variables['Agent.OS'], 'Darwin') | ||
), | ||
contains(variables['SUBARCHIVES'], 'qttools'), | ||
eq(variables['SUBCOMMAND'], 'install-qt') | ||
) | ||
and( | ||
eq( variables['TARGET'], 'desktop' ), | ||
not( startsWith( variables['ARCH'], 'wasm_' ) ), | ||
or( | ||
eq(variables['Agent.OS'], 'Linux'), | ||
eq(variables['Agent.OS'], 'Darwin') | ||
), | ||
contains(variables['SUBARCHIVES'], 'qttools'), | ||
eq(variables['SUBCOMMAND'], 'install-qt') | ||
) | ||
displayName: build test with qmake for Linux and macOS with specific Qt modules (QT += uitools) | ||
- powershell: | | ||
if ( $env:TOOLCHAIN -eq 'MSVC' ) { | ||
# Load modules from cache | ||
$Env:PSModulePath = '$(MODULES_FOLDER)', $Env:PSModulePath -join [System.IO.Path]::PathSeparator | ||
Write-Host $Env:PSModulePath | ||
Import-Module "Pscx" | ||
Import-Module "VSSetup" | ||
Import-VisualStudioVars -VisualStudioVersion $(VSVER) -Architecture $(ARCHITECTURE) | ||
$env:Path += ";$(WIN_QT_BINDIR)" | ||
try { rm -r -fo $(Build.BinariesDirectory)\tests } catch { $Error.Clear() } | ||
mkdir $(Build.BinariesDirectory)\tests | ||
cd $(Build.BinariesDirectory)\tests | ||
7z x $(Build.SourcesDirectory)\ci\helloworld_qttools.7z | ||
qmake -d $(Build.BinariesDirectory)\tests\helloworld_qttools | ||
nmake | ||
} elseif ( $env:TOOLCHAIN -eq 'MINGW' ) { | ||
Set-Item -Path Env:Path -Value ("$(Build.BinariesDirectory)\Qt\Tools\$(MINGW_FOLDER)\bin;$(WIN_QT_BINDIR);" + $Env:Path) | ||
Write-Host "Path == " + $env:Path | ||
if (![bool] (Get-Command -ErrorAction Ignore -Type Application mingw32-make)) { | ||
python -m aqt install-tool $(if (($QT_BASE_MIRROR + "") -ne "") { "-b $QT_BASE_MIRROR" } else {""}) ` | ||
--outputdir $(Build.BinariesDirectory)/Qt $(HOST) desktop $(MINGW_TOOL_NAME) qt.tools.$(MINGW_VARIANT) | ||
if ($?) { | ||
Write-Host 'Successfully installed tools_mingw' | ||
} else { | ||
throw 'Failed to install tools_mingw' | ||
} | ||
if ( $env:TOOLCHAIN -eq 'MSVC' ) { | ||
# Load modules from cache | ||
$Env:PSModulePath = '$(MODULES_FOLDER)', $Env:PSModulePath -join [System.IO.Path]::PathSeparator | ||
Write-Host $Env:PSModulePath | ||
Import-Module "Pscx" | ||
Import-Module "VSSetup" | ||
Import-VisualStudioVars -VisualStudioVersion $(VSVER) -Architecture $(ARCHITECTURE) | ||
$env:Path += ";$(WIN_QT_BINDIR)" | ||
try { rm -r -fo $(Build.BinariesDirectory)\tests } catch { $Error.Clear() } | ||
mkdir $(Build.BinariesDirectory)\tests | ||
cd $(Build.BinariesDirectory)\tests | ||
7z x $(Build.SourcesDirectory)\ci\helloworld_qttools.7z | ||
qmake -d $(Build.BinariesDirectory)\tests\helloworld_qttools | ||
nmake | ||
} elseif ( $env:TOOLCHAIN -eq 'MINGW' ) { | ||
Set-Item -Path Env:Path -Value ("$(Build.BinariesDirectory)\Qt\Tools\$(MINGW_FOLDER)\bin;$(WIN_QT_BINDIR);" + $Env:Path) | ||
Write-Host "Path == " + $env:Path | ||
if (![bool] (Get-Command -ErrorAction Ignore -Type Application mingw32-make)) { | ||
python -m aqt install-tool $(if (($QT_BASE_MIRROR + "") -ne "") { "-b $QT_BASE_MIRROR" } else {""}) ` | ||
--outputdir $(Build.BinariesDirectory)/Qt $(HOST) desktop $(MINGW_TOOL_NAME) qt.tools.$(MINGW_VARIANT) | ||
if ($?) { | ||
Write-Host 'Successfully installed tools_mingw' | ||
} else { | ||
throw 'Failed to install tools_mingw' | ||
} | ||
try { rm -r -fo $(Build.BinariesDirectory)\tests } catch { $Error.Clear() } | ||
mkdir $(Build.BinariesDirectory)\tests | ||
cd $(Build.BinariesDirectory)\tests | ||
7z x $(Build.SourcesDirectory)\ci\helloworld_qttools.7z | ||
qmake -d $(Build.BinariesDirectory)\tests\helloworld_qttools | ||
mingw32-make | ||
} | ||
try { rm -r -fo $(Build.BinariesDirectory)\tests } catch { $Error.Clear() } | ||
mkdir $(Build.BinariesDirectory)\tests | ||
cd $(Build.BinariesDirectory)\tests | ||
7z x $(Build.SourcesDirectory)\ci\helloworld_qttools.7z | ||
qmake -d $(Build.BinariesDirectory)\tests\helloworld_qttools | ||
mingw32-make | ||
} | ||
condition: | | ||
and( | ||
eq( variables['Agent.OS'], 'Windows_NT'), | ||
contains(variables['SUBARCHIVES'], 'qttools'), | ||
eq(variables['SUBCOMMAND'], 'install-qt') | ||
) | ||
and( | ||
eq( variables['Agent.OS'], 'Windows_NT'), | ||
contains(variables['SUBARCHIVES'], 'qttools'), | ||
eq(variables['SUBCOMMAND'], 'install-qt') | ||
) | ||
displayName: build test with qmake with specific Qt modules (QT += uitools) | ||
env: | ||
AQT_CONFIG: $(Build.SourcesDirectory)/ci/settings.ini | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters