mirror of
https://github.com/miurahr/aqtinstall.git
synced 2025-12-18 05:04:38 +03:00
Add Azure build jobs for QtIFW and QtCreator
This commit is contained in:
@@ -5,6 +5,7 @@ import collections
|
||||
import json
|
||||
import random
|
||||
from itertools import product
|
||||
from typing import Dict, Optional
|
||||
|
||||
MIRRORS = [
|
||||
"https://ftp.jaist.ac.jp/pub/qtproject",
|
||||
@@ -29,6 +30,7 @@ class BuildJob:
|
||||
output_dir=None,
|
||||
list_options=None,
|
||||
spec=None,
|
||||
tool_options: Optional[Dict[str, str]] = None,
|
||||
):
|
||||
self.command = command
|
||||
self.qt_version = qt_version
|
||||
@@ -40,6 +42,7 @@ class BuildJob:
|
||||
self.mirror = mirror
|
||||
self.subarchives = subarchives
|
||||
self.list_options = list_options if list_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
|
||||
self.spec = spec
|
||||
self.output_dir = output_dir
|
||||
@@ -276,6 +279,33 @@ linux_build_jobs.extend(
|
||||
]
|
||||
)
|
||||
|
||||
qt_creator_bin_path = "./Tools/QtCreator/bin/"
|
||||
qt_creator_mac_bin_path = "./Qt Creator.app/Contents/MacOS/"
|
||||
qt_ifw_bin_path = "./Tools/QtInstallerFramework/4.1/bin/"
|
||||
tool_options = {
|
||||
"TOOL1_ARGS": "tools_qtcreator qt.tools.qtcreator",
|
||||
"LIST_TOOL1_CMD": f"ls {qt_creator_bin_path}",
|
||||
"TEST_TOOL1_CMD": f"{qt_creator_bin_path}qbs --version",
|
||||
"TOOL2_ARGS": "tools_ifw",
|
||||
"TEST_TOOL2_CMD": f"{qt_ifw_bin_path}archivegen --version",
|
||||
"LIST_TOOL2_CMD": f"ls {qt_ifw_bin_path}",
|
||||
}
|
||||
# Mac Qt Creator is a .app, or "Package Bundle", so the path is changed:
|
||||
tool_options_mac = {
|
||||
**tool_options,
|
||||
"TEST_TOOL1_CMD": f'"{qt_creator_mac_bin_path}qbs" --version',
|
||||
"LIST_TOOL1_CMD": f'ls "{qt_creator_mac_bin_path}"',
|
||||
}
|
||||
windows_build_jobs.append(
|
||||
BuildJob("install-tool", "", "windows", "desktop", "", "", tool_options=tool_options)
|
||||
)
|
||||
linux_build_jobs.append(
|
||||
BuildJob("install-tool", "", "linux", "desktop", "", "", tool_options=tool_options)
|
||||
)
|
||||
mac_build_jobs.append(
|
||||
BuildJob("install-tool", "", "mac", "desktop", "", "", tool_options=tool_options_mac)
|
||||
)
|
||||
|
||||
matrices = {}
|
||||
|
||||
for platform_build_job in all_platform_build_jobs:
|
||||
@@ -313,6 +343,12 @@ for platform_build_job in all_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()),
|
||||
("TOOL1_ARGS", build_job.tool_options.get("TOOL1_ARGS", "")),
|
||||
("LIST_TOOL1_CMD", build_job.tool_options.get("LIST_TOOL1_CMD", "")),
|
||||
("TEST_TOOL1_CMD", build_job.tool_options.get("TEST_TOOL1_CMD", "")),
|
||||
("TOOL2_ARGS", build_job.tool_options.get("TOOL2_ARGS", "")),
|
||||
("LIST_TOOL2_CMD", build_job.tool_options.get("LIST_TOOL2_CMD", "")),
|
||||
("TEST_TOOL2_CMD", build_job.tool_options.get("TEST_TOOL2_CMD", "")),
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
35
ci/steps.yml
35
ci/steps.yml
@@ -7,6 +7,13 @@ steps:
|
||||
pip install -e .
|
||||
displayName: install package
|
||||
|
||||
# Install linux dependencies
|
||||
- bash: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgl1-mesa-dev libxkbcommon-x11-0
|
||||
condition: and(eq(variables['TARGET'], 'desktop'), eq(variables['Agent.OS'], 'Linux'))
|
||||
displayName: install test dependency for Linux
|
||||
|
||||
# Run Aqt
|
||||
##----------------------------------------------------
|
||||
## we insert sleep in random 1sec < duration < 60sec to reduce
|
||||
@@ -108,6 +115,22 @@ steps:
|
||||
if [[ "$(SUBCOMMAND)" == "install-doc" ]]; then
|
||||
python -m aqt $(SUBCOMMAND) $(HOST) $(TARGET) $(QT_VERSION) --archives $(SUBARCHIVES)
|
||||
fi
|
||||
if [[ "$(SUBCOMMAND)" == "install-tool" ]]; then
|
||||
opt=""
|
||||
if [[ "$(OUTPUT_DIR)" != "" ]]; then
|
||||
opt+=" --outputdir $(OUTPUT_DIR)"
|
||||
sudo mkdir -p "$(OUTPUT_DIR)"
|
||||
sudo chown $(whoami) "$(OUTPUT_DIR)"
|
||||
fi
|
||||
python -m aqt $(SUBCOMMAND) $(HOST) $(TARGET) $(TOOL1_ARGS) $opt
|
||||
$(LIST_TOOL1_CMD)
|
||||
echo "Testing $(TOOL1_ARGS) with '$(TEST_TOOL1_CMD)'"
|
||||
$(TEST_TOOL1_CMD)
|
||||
python -m aqt $(SUBCOMMAND) $(HOST) $(TARGET) $(TOOL2_ARGS) $opt
|
||||
$(LIST_TOOL2_CMD)
|
||||
echo "Testing $(TOOL2_ARGS) with '$(TEST_TOOL2_CMD)'"
|
||||
$(TEST_TOOL2_CMD)
|
||||
fi
|
||||
workingDirectory: $(Build.BinariesDirectory)
|
||||
env:
|
||||
AQT_CONFIG: $(Build.SourcesDirectory)/ci/settings.ini
|
||||
@@ -132,15 +155,9 @@ steps:
|
||||
export PATH=$(QT_BINDIR):$PATH
|
||||
qmake $(Build.BinariesDirectory)/tests/accelbubble
|
||||
make
|
||||
condition: and(eq(variables['TARGET'], 'android'), or(eq(variables['Agent.OS'], 'Linux'), eq(variables['Agent.OS'], 'Darwin')), ne(variables['SUBCOMMAND'], 'list'))
|
||||
condition: and(eq(variables['TARGET'], 'android'), or(eq(variables['Agent.OS'], 'Linux'), eq(variables['Agent.OS'], 'Darwin')), ne(variables['SUBCOMMAND'], 'list'), ne(variables['SUBCOMMAND'], 'install-tool'))
|
||||
displayName: Build accelbubble example application to test for android
|
||||
|
||||
- script: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgl1-mesa-dev
|
||||
condition: and(eq(variables['TARGET'], 'desktop'), eq(variables['Agent.OS'], 'Linux'), eq(variables['SUBCOMMAND'], 'install-qt'))
|
||||
displayName: install test dependency for Linux
|
||||
|
||||
##----------------------------------------------------
|
||||
# determine Windows build system
|
||||
- powershell: |
|
||||
@@ -169,7 +186,7 @@ steps:
|
||||
}
|
||||
cd $(WIN_QT_BINDIR)
|
||||
unzip $(Build.SourcesDirectory)\ci\jom_1_1_3.zip
|
||||
condition: eq( variables['Agent.OS'], 'Windows_NT')
|
||||
condition: and(eq( variables['Agent.OS'], 'Windows_NT'), eq(variables['SUBCOMMAND'], 'install-qt'))
|
||||
displayName: Detect toolchain for Windows and update PATH
|
||||
|
||||
# When no modules
|
||||
@@ -218,7 +235,7 @@ steps:
|
||||
qmake $(Build.BinariesDirectory)\tests\helloworld
|
||||
mingw32-make
|
||||
}
|
||||
condition: and(eq( variables['Agent.OS'], 'Windows_NT'), eq(variables['MODULE'], ''))
|
||||
condition: and(eq( variables['Agent.OS'], 'Windows_NT'), eq(variables['MODULE'], ''), eq(variables['SUBCOMMAND'], 'install-qt'))
|
||||
displayName: build test with qmake w/o extra module
|
||||
- powershell: |
|
||||
Import-VisualStudioVars -VisualStudioVersion $(VSVER) -Architecture $(ARCHITECTURE)
|
||||
|
||||
Reference in New Issue
Block a user