mirror of
https://github.com/miurahr/aqtinstall.git
synced 2025-12-17 20:54:38 +03:00
Add CI test for tool installation (#47)
* Test: Update target Qt versions * Add tools test * tools: fix errors Signed-off-by: Hiroshi Miura <miurahr@linux.com>
This commit is contained in:
@@ -152,7 +152,7 @@ class ToolArchives(QtArchives):
|
|||||||
if full_version != self.version:
|
if full_version != self.version:
|
||||||
continue
|
continue
|
||||||
if "-" in full_version:
|
if "-" in full_version:
|
||||||
split_version = full_version.split["-"]
|
split_version = full_version.split("-")
|
||||||
named_version = split_version[0] + "-" + split_version[1]
|
named_version = split_version[0] + "-" + split_version[1]
|
||||||
else:
|
else:
|
||||||
named_version = full_version
|
named_version = full_version
|
||||||
|
|||||||
@@ -98,7 +98,12 @@ class QtInstaller:
|
|||||||
p = Pool(NUM_PROCESS)
|
p = Pool(NUM_PROCESS)
|
||||||
ret_arr = p.map(functools.partial(self.retrieve_archive, command=command, path=base_dir), archives)
|
ret_arr = p.map(functools.partial(self.retrieve_archive, command=command, path=base_dir), archives)
|
||||||
ret = functools.reduce(and_, ret_arr)
|
ret = functools.reduce(and_, ret_arr)
|
||||||
if ret:
|
if not ret: # fails to install
|
||||||
|
self.logger.error("Failed to install.")
|
||||||
|
exit(1)
|
||||||
|
if qt_version == "Tools": # tools installation
|
||||||
|
return
|
||||||
|
# finalize
|
||||||
if arch.startswith('win64_mingw'):
|
if arch.startswith('win64_mingw'):
|
||||||
arch_dir = arch[6:] + '_64'
|
arch_dir = arch[6:] + '_64'
|
||||||
elif arch.startswith('win32_mingw'):
|
elif arch.startswith('win32_mingw'):
|
||||||
@@ -107,6 +112,10 @@ class QtInstaller:
|
|||||||
arch_dir = arch[6:]
|
arch_dir = arch[6:]
|
||||||
else:
|
else:
|
||||||
arch_dir = arch
|
arch_dir = arch
|
||||||
|
self.make_conf_files(base_dir, qt_version, arch_dir)
|
||||||
|
|
||||||
|
def make_conf_files(self, base_dir, qt_version, arch_dir):
|
||||||
|
"""Make Qt configuration files, qt.conf and qtconfig.pri"""
|
||||||
try:
|
try:
|
||||||
# prepare qt.conf
|
# prepare qt.conf
|
||||||
with open(os.path.join(base_dir, qt_version, arch_dir, 'bin', 'qt.conf'), 'w') as f:
|
with open(os.path.join(base_dir, qt_version, arch_dir, 'bin', 'qt.conf'), 'w') as f:
|
||||||
@@ -124,8 +133,6 @@ class QtInstaller:
|
|||||||
except IOError as e:
|
except IOError as e:
|
||||||
self.logger.error("Configuration file generation error: %s\n", e.args, exc_info=True)
|
self.logger.error("Configuration file generation error: %s\n", e.args, exc_info=True)
|
||||||
raise e
|
raise e
|
||||||
else:
|
|
||||||
exit(1)
|
|
||||||
|
|
||||||
|
|
||||||
class Metalink:
|
class Metalink:
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ jobs:
|
|||||||
displayName: Linux (Specific Mirror)
|
displayName: Linux (Specific Mirror)
|
||||||
variables:
|
variables:
|
||||||
PYTHON_VERSION: '3.7'
|
PYTHON_VERSION: '3.7'
|
||||||
QT_VERSION: 5.13.0
|
QT_VERSION: 5.13.1
|
||||||
HOST: linux
|
HOST: linux
|
||||||
TARGET: android
|
TARGET: android
|
||||||
ARCH: android_armv7
|
ARCH: android_armv7
|
||||||
@@ -55,3 +55,18 @@ jobs:
|
|||||||
vmImage: 'ubuntu-16.04'
|
vmImage: 'ubuntu-16.04'
|
||||||
steps:
|
steps:
|
||||||
- template: ci/steps.yml
|
- template: ci/steps.yml
|
||||||
|
|
||||||
|
- job: LinuxToolsOpenSSL
|
||||||
|
displayName: Tools(OpenSSL, Linux)
|
||||||
|
variables:
|
||||||
|
PYTHON_VERSION: '3.7'
|
||||||
|
HOST: linux
|
||||||
|
TOOL_NAME: tools_openssl_x64
|
||||||
|
TOOL_VERSION: 1.1.1-0
|
||||||
|
ARCH: qt.tools.openssl.gcc_64
|
||||||
|
TEST_EXECUTABLE: OpenSSL/binary/bin/openssl
|
||||||
|
TEST_COMMAND: version
|
||||||
|
pool:
|
||||||
|
vmImage: 'ubuntu-16.04'
|
||||||
|
steps:
|
||||||
|
- template: ci/steps.yml
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ python_versions = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
qt_versions = [
|
qt_versions = [
|
||||||
'5.11.3',
|
'5.12.5',
|
||||||
'5.12.3',
|
'5.13.1',
|
||||||
'5.13.0'
|
'5.14.0'
|
||||||
]
|
]
|
||||||
|
|
||||||
linux_build_jobs = []
|
linux_build_jobs = []
|
||||||
@@ -63,25 +63,25 @@ mac_build_jobs.append(
|
|||||||
# Windows Desktop
|
# Windows Desktop
|
||||||
windows_build_jobs.extend(
|
windows_build_jobs.extend(
|
||||||
[
|
[
|
||||||
BuildJob('5.11.3', 'windows', 'desktop', 'win64_msvc2017_64', 'msvc2017_64'),
|
BuildJob('5.12.5', 'windows', 'desktop', 'win64_msvc2017_64', 'msvc2017_64'),
|
||||||
BuildJob('5.11.3', 'windows', 'desktop', 'win32_msvc2015', 'msvc2015'),
|
BuildJob('5.12.5', 'windows', 'desktop', 'win32_msvc2017', 'msvc2017'),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
windows_build_jobs.extend(
|
windows_build_jobs.extend(
|
||||||
[
|
[
|
||||||
BuildJob('5.12.3', 'windows', 'desktop', 'win64_msvc2017_64', 'msvc2017_64'),
|
BuildJob('5.13.1', 'windows', 'desktop', 'win64_msvc2017_64', 'msvc2017_64'),
|
||||||
BuildJob('5.12.3', 'windows', 'desktop', 'win32_msvc2017', 'msvc2017'),
|
BuildJob('5.13.1', 'windows', 'desktop', 'win64_msvc2015_64', 'msvc2015_64'),
|
||||||
|
BuildJob('5.13.1', 'windows', 'desktop', 'win64_mingw73', 'mingw73_64'),
|
||||||
|
BuildJob('5.13.1', 'windows', 'desktop', 'win32_msvc2017', 'msvc2017'),
|
||||||
|
BuildJob('5.13.1', 'windows', 'desktop', 'win32_mingw73', 'mingw73_32'),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
windows_build_jobs.extend(
|
windows_build_jobs.extend(
|
||||||
[
|
[
|
||||||
BuildJob('5.13.0', 'windows', 'desktop', 'win64_msvc2017_64', 'msvc2017_64'),
|
BuildJob('5.14.0', 'windows', 'desktop', 'win64_msvc2015_64', 'msvc2015_64'),
|
||||||
BuildJob('5.13.0', 'windows', 'desktop', 'win64_msvc2015_64', 'msvc2015_64'),
|
BuildJob('5.14.0', 'windows', 'desktop', 'win32_msvc2017', 'msvc2017'),
|
||||||
BuildJob('5.13.0', 'windows', 'desktop', 'win64_mingw73', 'mingw73_64'),
|
|
||||||
BuildJob('5.13.0', 'windows', 'desktop', 'win32_msvc2017', 'msvc2017'),
|
|
||||||
BuildJob('5.13.0', 'windows', 'desktop', 'win32_mingw73', 'mingw73_32'),
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ windows_build_jobs.extend(
|
|||||||
|
|
||||||
for android_arch in ['android_x86', 'android_armv7']:
|
for android_arch in ['android_x86', 'android_armv7']:
|
||||||
linux_build_jobs.append(
|
linux_build_jobs.append(
|
||||||
BuildJob('5.13.0', 'linux', 'android', android_arch, android_arch)
|
BuildJob('5.13.1', 'linux', 'android', android_arch, android_arch)
|
||||||
)
|
)
|
||||||
|
|
||||||
matrices = {}
|
matrices = {}
|
||||||
|
|||||||
25
ci/steps.yml
25
ci/steps.yml
@@ -26,7 +26,7 @@ steps:
|
|||||||
scriptPath: $(Build.SourcesDirectory)/bin/aqt
|
scriptPath: $(Build.SourcesDirectory)/bin/aqt
|
||||||
arguments: install $(QT_VERSION) $(HOST) $(TARGET) $(ARCH) --internal
|
arguments: install $(QT_VERSION) $(HOST) $(TARGET) $(ARCH) --internal
|
||||||
workingDirectory: $(Build.BinariesDirectory)
|
workingDirectory: $(Build.BinariesDirectory)
|
||||||
condition: not(variables['QT_BASE_MIRROR'])
|
condition: and(not(variables['QT_BASE_MIRROR']), not(variables['TOOL_NAME']))
|
||||||
displayName: Run Aqt (No Base URL Set)
|
displayName: Run Aqt (No Base URL Set)
|
||||||
- task: PythonScript@0
|
- task: PythonScript@0
|
||||||
inputs:
|
inputs:
|
||||||
@@ -34,7 +34,7 @@ steps:
|
|||||||
scriptPath: $(Build.SourcesDirectory)/bin/aqt
|
scriptPath: $(Build.SourcesDirectory)/bin/aqt
|
||||||
arguments: install $(QT_VERSION) $(HOST) $(TARGET) $(ARCH) -b $(QT_BASE_MIRROR)
|
arguments: install $(QT_VERSION) $(HOST) $(TARGET) $(ARCH) -b $(QT_BASE_MIRROR)
|
||||||
workingDirectory: $(Build.BinariesDirectory)
|
workingDirectory: $(Build.BinariesDirectory)
|
||||||
condition: variables['QT_BASE_MIRROR']
|
condition: and(variables['QT_BASE_MIRROR'], not(variables['TOOL_NAME']))
|
||||||
displayName: Run Aqt (Base URL Set)
|
displayName: Run Aqt (Base URL Set)
|
||||||
#
|
#
|
||||||
# Test installation results
|
# Test installation results
|
||||||
@@ -95,3 +95,24 @@ steps:
|
|||||||
- script: echo Currently not implemented.
|
- script: echo Currently not implemented.
|
||||||
condition: and(eq(variables['TARGET'], 'ios'), eq(variables['Agent.OS'], 'Darwin'))
|
condition: and(eq(variables['TARGET'], 'ios'), eq(variables['Agent.OS'], 'Darwin'))
|
||||||
displayName: Build test with qmake for ios
|
displayName: Build test with qmake for ios
|
||||||
|
#
|
||||||
|
# Install aqtinstall
|
||||||
|
- powershell: |
|
||||||
|
$aqtVersion = & python $(Build.SourcesDirectory)/setup.py --version | Out-String -Stream
|
||||||
|
pip install $(Build.SourcesDirectory)/dist/aqtinstall-$aqtVersion-py2.py3-none-any.whl
|
||||||
|
displayName: install package
|
||||||
|
- task: PythonScript@0
|
||||||
|
inputs:
|
||||||
|
scriptSource: filePath
|
||||||
|
scriptPath: $(Build.SourcesDirectory)/bin/aqt
|
||||||
|
arguments: tool $(HOST) $(TOOL_NAME) $(TOOL_VERSION) $(ARCH) --internal
|
||||||
|
workingDirectory: $(Build.BinariesDirectory)
|
||||||
|
condition: variables['TOOL_NAME']
|
||||||
|
displayName: Run Aqt (Tool)
|
||||||
|
#
|
||||||
|
# Test installation results
|
||||||
|
# for OpenSSL on linux
|
||||||
|
- script: |
|
||||||
|
$(Build.BinariesDirectory)/Qt/Tools/$(TEST_EXECUTABLE) $(TEST_COMMAND)
|
||||||
|
condition: variables['TOOL_NAME']
|
||||||
|
displayName: Tool test
|
||||||
|
|||||||
Reference in New Issue
Block a user