mirror of
https://github.com/miurahr/aqtinstall.git
synced 2025-12-18 13:14:37 +03:00
Add Azure build jobs for QtIFW and QtCreator
This commit is contained in:
@@ -5,6 +5,7 @@ import collections
|
|||||||
import json
|
import json
|
||||||
import random
|
import random
|
||||||
from itertools import product
|
from itertools import product
|
||||||
|
from typing import Dict, Optional
|
||||||
|
|
||||||
MIRRORS = [
|
MIRRORS = [
|
||||||
"https://ftp.jaist.ac.jp/pub/qtproject",
|
"https://ftp.jaist.ac.jp/pub/qtproject",
|
||||||
@@ -29,6 +30,7 @@ class BuildJob:
|
|||||||
output_dir=None,
|
output_dir=None,
|
||||||
list_options=None,
|
list_options=None,
|
||||||
spec=None,
|
spec=None,
|
||||||
|
tool_options: Optional[Dict[str, str]] = None,
|
||||||
):
|
):
|
||||||
self.command = command
|
self.command = command
|
||||||
self.qt_version = qt_version
|
self.qt_version = qt_version
|
||||||
@@ -40,6 +42,7 @@ class BuildJob:
|
|||||||
self.mirror = mirror
|
self.mirror = mirror
|
||||||
self.subarchives = subarchives
|
self.subarchives = subarchives
|
||||||
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 {}
|
||||||
# `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
|
||||||
self.spec = spec
|
self.spec = spec
|
||||||
self.output_dir = output_dir
|
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 = {}
|
matrices = {}
|
||||||
|
|
||||||
for platform_build_job in all_platform_build_jobs:
|
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 ""),
|
("OUTPUT_DIR", build_job.output_dir if build_job.output_dir else ""),
|
||||||
("QT_BINDIR", build_job.qt_bindir()),
|
("QT_BINDIR", build_job.qt_bindir()),
|
||||||
("WIN_QT_BINDIR", build_job.win_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 .
|
pip install -e .
|
||||||
displayName: install package
|
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
|
# Run Aqt
|
||||||
##----------------------------------------------------
|
##----------------------------------------------------
|
||||||
## we insert sleep in random 1sec < duration < 60sec to reduce
|
## we insert sleep in random 1sec < duration < 60sec to reduce
|
||||||
@@ -108,6 +115,22 @@ steps:
|
|||||||
if [[ "$(SUBCOMMAND)" == "install-doc" ]]; then
|
if [[ "$(SUBCOMMAND)" == "install-doc" ]]; then
|
||||||
python -m aqt $(SUBCOMMAND) $(HOST) $(TARGET) $(QT_VERSION) --archives $(SUBARCHIVES)
|
python -m aqt $(SUBCOMMAND) $(HOST) $(TARGET) $(QT_VERSION) --archives $(SUBARCHIVES)
|
||||||
fi
|
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)
|
workingDirectory: $(Build.BinariesDirectory)
|
||||||
env:
|
env:
|
||||||
AQT_CONFIG: $(Build.SourcesDirectory)/ci/settings.ini
|
AQT_CONFIG: $(Build.SourcesDirectory)/ci/settings.ini
|
||||||
@@ -132,15 +155,9 @@ steps:
|
|||||||
export PATH=$(QT_BINDIR):$PATH
|
export PATH=$(QT_BINDIR):$PATH
|
||||||
qmake $(Build.BinariesDirectory)/tests/accelbubble
|
qmake $(Build.BinariesDirectory)/tests/accelbubble
|
||||||
make
|
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
|
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
|
# determine Windows build system
|
||||||
- powershell: |
|
- powershell: |
|
||||||
@@ -169,7 +186,7 @@ steps:
|
|||||||
}
|
}
|
||||||
cd $(WIN_QT_BINDIR)
|
cd $(WIN_QT_BINDIR)
|
||||||
unzip $(Build.SourcesDirectory)\ci\jom_1_1_3.zip
|
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
|
displayName: Detect toolchain for Windows and update PATH
|
||||||
|
|
||||||
# When no modules
|
# When no modules
|
||||||
@@ -218,7 +235,7 @@ steps:
|
|||||||
qmake $(Build.BinariesDirectory)\tests\helloworld
|
qmake $(Build.BinariesDirectory)\tests\helloworld
|
||||||
mingw32-make
|
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
|
displayName: build test with qmake w/o extra module
|
||||||
- powershell: |
|
- powershell: |
|
||||||
Import-VisualStudioVars -VisualStudioVersion $(VSVER) -Architecture $(ARCHITECTURE)
|
Import-VisualStudioVars -VisualStudioVersion $(VSVER) -Architecture $(ARCHITECTURE)
|
||||||
|
|||||||
Reference in New Issue
Block a user