2019-04-25 09:44:20 +00:00
|
|
|
version: 1
|
|
|
|
accept_configuration:
|
|
|
|
condition: property
|
|
|
|
property: host.os
|
|
|
|
equals_property: target.os
|
2019-06-03 11:35:41 +00:00
|
|
|
|
2019-06-13 12:27:31 +00:00
|
|
|
windows_specific_instructions:
|
2019-06-03 11:35:41 +00:00
|
|
|
- &export_target_architecture_and_sdk
|
|
|
|
# Export TARGET_ARCHITECTURE and WINDOWS_SDK_VERSION for MSVC cross compilation
|
|
|
|
type: Group
|
2019-06-12 13:36:06 +00:00
|
|
|
enable_if:
|
2019-06-03 11:35:41 +00:00
|
|
|
condition: property
|
|
|
|
property: host.os
|
2019-06-12 13:36:06 +00:00
|
|
|
equals_value: Windows
|
2019-06-03 11:35:41 +00:00
|
|
|
instructions:
|
|
|
|
- type: EnvironmentVariable
|
|
|
|
variableName: TARGET_ARCHITECTURE
|
|
|
|
variableValue: amd64 # TODO add something like "{{toLower .Config host.arch}}"
|
|
|
|
disable_if:
|
|
|
|
condition: property
|
|
|
|
property: host.arch
|
|
|
|
not_equals_property: target.arch
|
|
|
|
- type: EnvironmentVariable
|
|
|
|
variableName: TARGET_ARCHITECTURE
|
|
|
|
variableValue: amd64_x86
|
2019-06-12 13:36:06 +00:00
|
|
|
enable_if:
|
2019-06-03 11:35:41 +00:00
|
|
|
condition: and
|
|
|
|
conditions:
|
|
|
|
- condition: property
|
|
|
|
property: target.arch
|
2019-06-12 13:36:06 +00:00
|
|
|
equals_property: X86
|
2019-06-03 11:35:41 +00:00
|
|
|
- condition: property
|
|
|
|
property: host.arch
|
2019-06-12 13:36:06 +00:00
|
|
|
equals_property: X86_64
|
2019-06-03 11:35:41 +00:00
|
|
|
- type: EnvironmentVariable
|
|
|
|
# HACK. Overwrite TARGET_ARCHITECTURE as we do not use standard MSVC cross
|
|
|
|
# compilation targets here. The target architecture will be detected by Qt.
|
|
|
|
variableName: TARGET_ARCHITECTURE
|
|
|
|
variableValue: x86
|
2019-06-12 13:36:06 +00:00
|
|
|
enable_if:
|
2019-06-03 11:35:41 +00:00
|
|
|
condition: property
|
|
|
|
property: target.os
|
2019-06-12 13:36:06 +00:00
|
|
|
in_values: ["WINRT", "WINPHONE", "WINCE"]
|
2019-06-03 11:35:41 +00:00
|
|
|
- type: EnvironmentVariable
|
|
|
|
variableName: WINDOWS_SDK_VERSION
|
|
|
|
variableValue: "10.0.14393.0"
|
2019-06-12 13:36:06 +00:00
|
|
|
enable_if:
|
2019-06-03 11:35:41 +00:00
|
|
|
condition: property
|
|
|
|
property: target.os
|
2019-06-12 13:36:06 +00:00
|
|
|
equals_value: WINRT
|
2019-06-03 11:35:41 +00:00
|
|
|
- type: EnvironmentVariable
|
|
|
|
variableName: WINDOWS_SDK_VERSION
|
|
|
|
variableValue: ""
|
|
|
|
disable_if:
|
|
|
|
condition: property
|
|
|
|
property: host.os
|
|
|
|
equals_value: WINRT # TODO set windows sdk version for desktop windows as well
|
|
|
|
|
|
|
|
- &find_path_to_compiler
|
|
|
|
# MSVC is installed in somehow arbitrary places. To reduce amount of combinations we need to make a variable.
|
|
|
|
# This seems inverted, but on 64 bit hosts VS is installed into the x86 path, otherwise the regular one
|
2019-06-12 14:09:31 +00:00
|
|
|
# TODO cleanup, that step could be removed if we have same installation paths or we read the path from registry.
|
2019-06-03 11:35:41 +00:00
|
|
|
type: Group
|
2019-06-12 13:36:06 +00:00
|
|
|
enable_if:
|
2019-06-03 11:35:41 +00:00
|
|
|
condition: property
|
|
|
|
property: host.os
|
2019-06-12 13:36:06 +00:00
|
|
|
equals_value: Windows
|
2019-06-03 11:35:41 +00:00
|
|
|
instructions:
|
|
|
|
# Try to pick one of many coexistent MSVC installation to use
|
|
|
|
# TODO cleanup, that could be much simpler if all tools are installed to similar paths, so it would
|
|
|
|
# be enough to substitute compiler name.
|
|
|
|
- type: EnvironmentVariable
|
|
|
|
variableName: VC_SCRIPT
|
|
|
|
variableValue: "%VS90COMNTOOLS%\\vsvars32.bat"
|
2019-06-12 13:36:06 +00:00
|
|
|
enable_if:
|
2019-06-03 11:35:41 +00:00
|
|
|
condition: property
|
|
|
|
property: host.compiler
|
2019-06-12 13:36:06 +00:00
|
|
|
equals_value: MSVC2008
|
2019-06-03 11:35:41 +00:00
|
|
|
- type: EnvironmentVariable
|
|
|
|
variableName: VC_SCRIPT
|
|
|
|
variableValue: "%VS100COMNTOOLS%\\vsvars32.bat"
|
2019-06-12 13:36:06 +00:00
|
|
|
enable_if:
|
2019-06-03 11:35:41 +00:00
|
|
|
condition: property
|
|
|
|
property: host.compiler
|
2019-06-12 13:36:06 +00:00
|
|
|
equals_value: MSVC2010
|
2019-06-03 11:35:41 +00:00
|
|
|
- type: EnvironmentVariable
|
|
|
|
variableName: VC_SCRIPT
|
2019-06-12 14:09:31 +00:00
|
|
|
variableValue: "%ProgramFiles(x86)%\\Microsoft Visual Studio 11.0\\VC\\vcvarsall.bat"
|
2019-06-12 13:36:06 +00:00
|
|
|
enable_if:
|
2019-06-03 11:35:41 +00:00
|
|
|
condition: property
|
|
|
|
property: host.compiler
|
2019-06-12 13:36:06 +00:00
|
|
|
equals_value: MSVC2012
|
2019-06-03 11:35:41 +00:00
|
|
|
- type: EnvironmentVariable
|
|
|
|
variableName: VC_SCRIPT
|
2019-06-12 14:09:31 +00:00
|
|
|
variableValue: "%ProgramFiles(x86)%\\Microsoft Visual Studio 12.0\\VC\\vcvarsall.bat"
|
2019-06-12 13:36:06 +00:00
|
|
|
enable_if:
|
2019-06-03 11:35:41 +00:00
|
|
|
condition: property
|
|
|
|
property: host.compiler
|
2019-06-12 13:36:06 +00:00
|
|
|
equals_value: MSVC2013
|
2019-06-03 11:35:41 +00:00
|
|
|
- type: EnvironmentVariable
|
|
|
|
variableName: VC_SCRIPT
|
2019-06-12 14:09:31 +00:00
|
|
|
variableValue: "%ProgramFiles(x86)%\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat"
|
2019-06-12 13:36:06 +00:00
|
|
|
enable_if:
|
2019-06-03 11:35:41 +00:00
|
|
|
condition: property
|
|
|
|
property: host.compiler
|
2019-06-12 13:36:06 +00:00
|
|
|
equals_value: MSVC2015
|
2019-06-03 11:35:41 +00:00
|
|
|
- type: EnvironmentVariable
|
|
|
|
variableName: VC_SCRIPT
|
2019-06-12 14:09:31 +00:00
|
|
|
variableValue: "%ProgramFiles(x86)%\\Microsoft Visual Studio\\2017\\Professional\\VC\\Auxiliary\\Build\\vcvarsall.bat"
|
2019-06-12 13:36:06 +00:00
|
|
|
enable_if:
|
2019-06-03 11:35:41 +00:00
|
|
|
condition: property
|
|
|
|
property: host.compiler
|
2019-06-12 13:36:06 +00:00
|
|
|
equals_value: MSVC2017
|
2019-06-03 11:35:41 +00:00
|
|
|
- type: EnvironmentVariable
|
|
|
|
variableName: VC_SCRIPT
|
2019-06-12 14:09:31 +00:00
|
|
|
variableValue: "%ProgramFiles(x86)%\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\Build\\vcvarsall.bat"
|
2019-06-12 13:36:06 +00:00
|
|
|
enable_if:
|
2019-06-03 11:35:41 +00:00
|
|
|
condition: property
|
|
|
|
property: host.compiler
|
2019-06-12 13:36:06 +00:00
|
|
|
equals_value: MSVC2019
|
2019-06-03 11:35:41 +00:00
|
|
|
|
2019-06-13 12:23:44 +00:00
|
|
|
icc_specific_instructions: &icc_export_variables
|
|
|
|
type: Group
|
|
|
|
instructions:
|
|
|
|
- type: EnvironmentVariable
|
|
|
|
variableName: LD_LIBRARY_PATH
|
|
|
|
variableValue: "{{.Env.ICC64_18_LDLP}}"
|
|
|
|
- type: PrependToEnvironmentVariable
|
|
|
|
variableName: PATH
|
|
|
|
variableValue: "{{.Env.ICC64_18_PATH}}"
|
2019-06-21 11:54:25 +00:00
|
|
|
- type: PrependToEnvironmentVariable
|
|
|
|
variableName: CONFIGURE_ARGS
|
|
|
|
variableValue: "-DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc "
|
2019-06-13 12:23:44 +00:00
|
|
|
enable_if:
|
|
|
|
condition: property
|
|
|
|
property: host.compiler
|
|
|
|
equals_value: ICC_18
|
|
|
|
|
2019-04-25 09:44:20 +00:00
|
|
|
build_instructions:
|
|
|
|
- type: MakeDirectory
|
|
|
|
directory: .git
|
|
|
|
- type: SetBuildDirectory
|
|
|
|
directory: "{{.SourceDir}}"
|
|
|
|
- type: ChangeDirectory
|
|
|
|
directory: "{{.BuildDir}}"
|
2019-06-19 14:13:20 +00:00
|
|
|
- type: EnvironmentVariable
|
|
|
|
variableName: CMAKE_GENERATOR
|
|
|
|
variableValue: Ninja
|
2019-06-13 12:23:44 +00:00
|
|
|
- *icc_export_variables
|
2019-06-03 11:35:41 +00:00
|
|
|
- *export_target_architecture_and_sdk
|
|
|
|
- *find_path_to_compiler
|
|
|
|
# With MSVC we need setup the environment before every subprocess call.
|
|
|
|
- type: WriteFile
|
|
|
|
fileContents: "call \"{{.Env.VC_SCRIPT}}\" {{.Env.TARGET_ARCHITECTURE}} {{.Env.WINDOWS_SDK_VERSION}}\r\ncmd /c %*"
|
|
|
|
filename: c:\\users\\qt\\prefix.bat
|
|
|
|
fileMode: 420
|
|
|
|
maxTimeInSeconds: 20
|
|
|
|
maxTimeBetweenOutput: 20
|
2019-06-12 13:36:06 +00:00
|
|
|
enable_if:
|
2019-06-03 11:35:41 +00:00
|
|
|
condition: property
|
|
|
|
property: host.os
|
2019-06-12 13:36:06 +00:00
|
|
|
equals_value: Windows
|
2019-06-03 11:35:41 +00:00
|
|
|
- type: EnvironmentVariable
|
|
|
|
variableName: ENV_PREFIX
|
|
|
|
variableValue: "c:\\users\\qt\\prefix.bat"
|
2019-06-12 13:36:06 +00:00
|
|
|
enable_if:
|
2019-06-03 11:35:41 +00:00
|
|
|
condition: property
|
|
|
|
property: host.os
|
2019-06-12 13:36:06 +00:00
|
|
|
equals_value: Windows
|
2019-06-03 11:35:41 +00:00
|
|
|
- type: EnvironmentVariable
|
|
|
|
variableName: ENV_PREFIX
|
|
|
|
variableValue: ""
|
|
|
|
disable_if:
|
|
|
|
condition: property
|
|
|
|
property: host.os
|
|
|
|
equals_value: Windows
|
2019-04-25 09:44:20 +00:00
|
|
|
- type: ExecuteCommand
|
2019-06-19 14:13:20 +00:00
|
|
|
command: "{{.Env.ENV_PREFIX}} cmake {{.Env.CONFIGURE_ARGS}} -DCMAKE_INSTALL_PREFIX:PATH={{.InstallDir}} -DBUILD_TESTING=OFF {{.SourceDir}}"
|
2019-06-21 12:25:44 +00:00
|
|
|
executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
|
2019-04-25 09:44:20 +00:00
|
|
|
maxTimeInSeconds: 6000
|
|
|
|
maxTimeBetweenOutput: 120
|
|
|
|
userMessageOnFailure: >
|
|
|
|
Failed to call cmake. Contact Liang then.
|
2019-06-03 11:35:41 +00:00
|
|
|
- type: ExecuteCommand # TODO: remove me, just debuging
|
|
|
|
command: cmd.exe /c type {{.BuildDir}}\\CMakeCache.txt
|
2019-06-12 13:36:06 +00:00
|
|
|
enable_if:
|
2019-06-03 11:35:41 +00:00
|
|
|
condition: property
|
|
|
|
property: host.os
|
2019-06-12 13:36:06 +00:00
|
|
|
equals_value: Windows
|
2019-06-03 11:35:41 +00:00
|
|
|
maxTimeInSeconds: 60
|
|
|
|
userMessageOnFailure: Could not print the file cmake config file. This should not be possible.
|
2019-04-25 09:44:20 +00:00
|
|
|
- type: ExecuteCommand
|
2019-06-17 07:00:38 +00:00
|
|
|
command: "{{.Env.ENV_PREFIX}} cmake --build ."
|
2019-04-25 09:44:20 +00:00
|
|
|
maxTimeInSeconds: 6000
|
|
|
|
maxTimeBetweenOutput: 120
|
|
|
|
userMessageOnFailure: >
|
2019-05-22 15:01:13 +00:00
|
|
|
Failed to build sources. In the current state bug can be everywhere. Contact Liang first.
|
2019-06-17 07:00:38 +00:00
|
|
|
- type: ExecuteCommand
|
|
|
|
command: "{{.Env.ENV_PREFIX}} cmake --install ."
|
|
|
|
maxTimeInSeconds: 6000
|
|
|
|
maxTimeBetweenOutput: 120
|
|
|
|
userMessageOnFailure: >
|
2019-06-19 14:10:10 +00:00
|
|
|
Failed to install package.
|
|
|
|
- type: EnvironmentVariable
|
|
|
|
variableName: DESTDIR
|
|
|
|
variableValue: "{{.InstallRoot}}"
|
|
|
|
- type: ExecuteCommand
|
|
|
|
command: "{{.Env.ENV_PREFIX}} cmake --install ."
|
|
|
|
maxTimeInSeconds: 6000
|
|
|
|
maxTimeBetweenOutput: 120
|
|
|
|
userMessageOnFailure: >
|
|
|
|
Failed to install package for archiving.
|
2019-04-25 09:44:20 +00:00
|
|
|
- type: SignPackage
|
2019-06-12 13:36:06 +00:00
|
|
|
enable_if:
|
2019-04-25 09:44:20 +00:00
|
|
|
condition: property
|
|
|
|
property: host.os
|
2019-06-12 13:36:06 +00:00
|
|
|
equals_value: Windows
|
2019-04-25 09:44:20 +00:00
|
|
|
directory: "{{.InstallRoot}}/{{.AgentWorkingDir}}"
|
2019-05-16 13:09:55 +00:00
|
|
|
maxTimeInSeconds: 1200
|
|
|
|
maxTimeBetweenOutput: 1200
|
2019-04-25 09:44:20 +00:00
|
|
|
- type: UploadArtifact
|
|
|
|
archiveDirectory: "{{.InstallRoot}}/{{.AgentWorkingDir}}"
|
|
|
|
transferType: UploadModuleBuildArtifact
|
|
|
|
maxTimeInSeconds: 1200
|
|
|
|
maxTimeBetweenOutput: 1200
|
2019-06-19 14:10:10 +00:00
|
|
|
- type: ChangeDirectory
|
|
|
|
directory: "{{.SourceDir}}/tests"
|
|
|
|
- type: ExecuteCommand
|
2019-06-19 14:13:20 +00:00
|
|
|
command: "{{.Env.ENV_PREFIX}} cmake {{.Env.CONFIGURE_ARGS}} -DCMAKE_PREFIX_PATH:PATH={{.InstallDir}} {{.SourceDir}}/tests"
|
2019-06-24 07:55:49 +00:00
|
|
|
executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
|
2019-06-19 14:10:10 +00:00
|
|
|
maxTimeInSeconds: 6000
|
|
|
|
maxTimeBetweenOutput: 120
|
|
|
|
userMessageOnFailure: >
|
|
|
|
Failed to call cmake. Contact Liang then.
|
|
|
|
- type: ExecuteCommand
|
|
|
|
command: "{{.Env.ENV_PREFIX}} cmake --build ."
|
|
|
|
maxTimeInSeconds: 6000
|
|
|
|
maxTimeBetweenOutput: 120
|
|
|
|
userMessageOnFailure: >
|
|
|
|
Failed to build sources. In the current state bug can be everywhere. Contact Liang first.
|
|
|
|
- type: UploadTestArtifact
|
|
|
|
transferType: UploadModuleTestsArtifact
|
|
|
|
archiveDirectory: "{{.SourceDir}}/tests"
|
|
|
|
maxTimeInSeconds: 1200
|
|
|
|
maxTimeBetweenOutput: 1200
|