Test --autodesktop in Azure Pipelines

This commit is contained in:
Dave Dalcino
2022-07-24 14:27:53 -07:00
parent 78fe5f30eb
commit 5563b3e7b2
2 changed files with 15 additions and 12 deletions

View File

@@ -32,6 +32,7 @@ class BuildJob:
list_options=None, list_options=None,
spec=None, spec=None,
mingw_variant: str = "", mingw_variant: str = "",
is_autodesktop: bool = False,
tool_options: Optional[Dict[str, str]] = None, tool_options: Optional[Dict[str, str]] = None,
check_output_cmd: Optional[str] = None, check_output_cmd: Optional[str] = None,
): ):
@@ -45,6 +46,7 @@ class BuildJob:
self.mirror = mirror self.mirror = mirror
self.subarchives = subarchives self.subarchives = subarchives
self.mingw_variant: str = mingw_variant self.mingw_variant: str = mingw_variant
self.is_autodesktop: bool = is_autodesktop
self.list_options = list_options if list_options else {} self.list_options = list_options if list_options else {}
self.tool_options: Dict[str, str] = tool_options if tool_options else {} self.tool_options: Dict[str, str] = tool_options if tool_options else {}
# `steps.yml` assumes that qt_version is the highest version that satisfies spec # `steps.yml` assumes that qt_version is the highest version that satisfies spec
@@ -268,15 +270,13 @@ mac_build_jobs.append(
# mobile SDK # mobile SDK
mac_build_jobs.extend( mac_build_jobs.extend(
[ [
BuildJob("install-qt", "5.15.2", "mac", "ios", "ios", "ios"), BuildJob("install-qt", "5.15.2", "mac", "ios", "ios", "ios", is_autodesktop=True),
BuildJob("install-qt", "6.2.2", "mac", "ios", "ios", "ios", module="qtsensors"), BuildJob("install-qt", "6.2.2", "mac", "ios", "ios", "ios", module="qtsensors", is_autodesktop=False),
BuildJob( BuildJob("install-qt", "6.1.0", "mac", "android", "android_armv7", "android_armv7", is_autodesktop=True),
"install-qt", "6.1.0", "mac", "android", "android_armv7", "android_armv7"
),
] ]
) )
linux_build_jobs.extend( linux_build_jobs.extend(
[BuildJob("install-qt", "6.1.0", "linux", "android", "android_armv7", "android_armv7")] [BuildJob("install-qt", "6.1.0", "linux", "android", "android_armv7", "android_armv7", is_autodesktop=True)]
) )
# Test binary patch of qmake # Test binary patch of qmake
@@ -368,6 +368,7 @@ for platform_build_job in all_platform_build_jobs:
("SPEC", build_job.spec if build_job.spec else ""), ("SPEC", build_job.spec if build_job.spec else ""),
("MINGW_VARIANT", build_job.mingw_variant), ("MINGW_VARIANT", build_job.mingw_variant),
("MINGW_FOLDER", build_job.mingw_folder()), ("MINGW_FOLDER", build_job.mingw_folder()),
("IS_AUTODESKTOP", str(build_job.is_autodesktop)),
("HAS_EXTENSIONS", build_job.list_options.get("HAS_EXTENSIONS", "False")), ("HAS_EXTENSIONS", build_job.list_options.get("HAS_EXTENSIONS", "False")),
("USE_EXTENSION", build_job.list_options.get("USE_EXTENSION", "None")), ("USE_EXTENSION", build_job.list_options.get("USE_EXTENSION", "None")),
("OUTPUT_DIR", build_job.output_dir if build_job.output_dir else ""), ("OUTPUT_DIR", build_job.output_dir if build_job.output_dir else ""),

View File

@@ -45,12 +45,9 @@ steps:
if [[ "$(SUBARCHIVES)" != "" ]]; then if [[ "$(SUBARCHIVES)" != "" ]]; then
opt+=" --archives $(SUBARCHIVES)" opt+=" --archives $(SUBARCHIVES)"
fi fi
if [[ "$(SPEC)" == "" ]]; then if [[ "$(IS_AUTODESKTOP)" == "True" ]]; then
python -m aqt install-qt $(HOST) $(TARGET) $(QT_VERSION) $(ARCH) $opt opt+=" --autodesktop"
else elif [[ "$(TARGET)" == "android" || "$(TARGET)" == "ios" ]]; then
python -m aqt install-qt $(HOST) $(TARGET) "$(SPEC)" $(ARCH) $opt
fi
if [[ "$(TARGET)" == "android" || "$(TARGET)" == "ios" ]]; then
if [[ "$(HOST)" == "windows" ]]; then if [[ "$(HOST)" == "windows" ]]; then
python -m aqt install-qt $(HOST) desktop $(QT_VERSION) mingw81_64 --archives qtbase python -m aqt install-qt $(HOST) desktop $(QT_VERSION) mingw81_64 --archives qtbase
else else
@@ -58,6 +55,11 @@ steps:
python -m aqt install-qt $(HOST) desktop $(QT_VERSION) --archives qtbase qtdeclarative python -m aqt install-qt $(HOST) desktop $(QT_VERSION) --archives qtbase qtdeclarative
fi fi
fi fi
if [[ "$(SPEC)" == "" ]]; then
python -m aqt install-qt $(HOST) $(TARGET) $(QT_VERSION) $(ARCH) $opt
else
python -m aqt install-qt $(HOST) $(TARGET) "$(SPEC)" $(ARCH) $opt
fi
if [[ "$(OUTPUT_DIR)" != "" ]]; then if [[ "$(OUTPUT_DIR)" != "" ]]; then
# Use 'strings' to read binary # Use 'strings' to read binary
echo "Verify patched value of qt_prfxpath" echo "Verify patched value of qt_prfxpath"