Enables CI for VS2019 (#181)
* Enables CI for VS2019 * Try different yaml * Fixed VS2019 build breaks * Removed vs2019 msbuild generators * Only publish from vs2017
This commit is contained in:
Родитель
9bfdb3ee78
Коммит
1b4e42c757
|
@ -19,45 +19,93 @@ trigger:
|
|||
jobs:
|
||||
- job: WindowsK4ABuildTest
|
||||
displayName: Windows K4A Build + Test
|
||||
pool:
|
||||
vmImage: 'vs2017-win2016'
|
||||
demands:
|
||||
- Cmd
|
||||
strategy:
|
||||
maxParallel: 100
|
||||
matrix:
|
||||
x86_64-pc-windows-msvc_debug_ninja:
|
||||
VS2017_x86_64-pc-windows-msvc_debug_ninja:
|
||||
CMakeArch: 'amd64'
|
||||
BuildGenerator: 'Ninja'
|
||||
CMakeConfiguration: 'debug'
|
||||
x86_64-pc-windows-msvc_relwithdebinfo_ninja:
|
||||
vmImage: 'vs2017-win2016'
|
||||
VS2017_x86_64-pc-windows-msvc_relwithdebinfo_ninja:
|
||||
CMakeArch: 'amd64'
|
||||
BuildGenerator: 'Ninja'
|
||||
CMakeConfiguration: 'relwithdebinfo'
|
||||
x86_64-pc-windows-msvc_debug_msbuild:
|
||||
vmImage: 'vs2017-win2016'
|
||||
VS2017_x86_64-pc-windows-msvc_debug_msbuild:
|
||||
CMakeArch: 'amd64'
|
||||
BuildGenerator: 'Visual Studio 15 2017 Win64'
|
||||
CMakeConfiguration: 'debug'
|
||||
x86_64-pc-windows-msvc_relwithdebinfo_msbuild:
|
||||
vmImage: 'vs2017-win2016'
|
||||
VS2017_x86_64-pc-windows-msvc_relwithdebinfo_msbuild:
|
||||
CMakeArch: 'amd64'
|
||||
BuildGenerator: 'Visual Studio 15 2017 Win64'
|
||||
CMakeConfiguration: 'relwithdebinfo'
|
||||
x86-pc-windows-msvc_debug_ninja:
|
||||
vmImage: 'vs2017-win2016'
|
||||
VS2017_x86-pc-windows-msvc_debug_ninja:
|
||||
CMakeArch: 'x86'
|
||||
BuildGenerator: 'Ninja'
|
||||
CMakeConfiguration: 'debug'
|
||||
x86-pc-windows-msvc_relwithdebinfo_ninja:
|
||||
vmImage: 'vs2017-win2016'
|
||||
VS2017_x86-pc-windows-msvc_relwithdebinfo_ninja:
|
||||
CMakeArch: 'x86'
|
||||
BuildGenerator: 'Ninja'
|
||||
CMakeConfiguration: 'relwithdebinfo'
|
||||
x86-pc-windows-msvc_debug_msbuild:
|
||||
vmImage: 'vs2017-win2016'
|
||||
VS2017_x86-pc-windows-msvc_debug_msbuild:
|
||||
CMakeArch: 'x86'
|
||||
BuildGenerator: 'Visual Studio 15 2017'
|
||||
CMakeConfiguration: 'debug'
|
||||
x86-pc-windows-msvc_relwithdebinfo_msbuild:
|
||||
vmImage: 'vs2017-win2016'
|
||||
VS2017_x86-pc-windows-msvc_relwithdebinfo_msbuild:
|
||||
CMakeArch: 'x86'
|
||||
BuildGenerator: 'Visual Studio 15 2017'
|
||||
CMakeConfiguration: 'relwithdebinfo'
|
||||
vmImage: 'vs2017-win2016'
|
||||
VS2019_x86_64-pc-windows-msvc_debug_ninja:
|
||||
CMakeArch: 'amd64'
|
||||
BuildGenerator: 'Ninja'
|
||||
CMakeConfiguration: 'debug'
|
||||
vmImage: 'windows-2019'
|
||||
VS2019_x86_64-pc-windows-msvc_relwithdebinfo_ninja:
|
||||
CMakeArch: 'amd64'
|
||||
BuildGenerator: 'Ninja'
|
||||
CMakeConfiguration: 'relwithdebinfo'
|
||||
vmImage: 'windows-2019'
|
||||
# VS2019 msbuild generators blocked by issue Microsoft/azure-pipelines-image-generation#754
|
||||
# VS2019_x86_64-pc-windows-msvc_debug_msbuild:
|
||||
# CMakeArch: 'amd64'
|
||||
# BuildGenerator: 'Visual Studio 16 2019'
|
||||
# CMakeConfiguration: 'debug'
|
||||
# vmImage: 'windows-2019'
|
||||
# VS2019_x86_64-pc-windows-msvc_relwithdebinfo_msbuild:
|
||||
# CMakeArch: 'amd64'
|
||||
# BuildGenerator: 'Visual Studio 16 2019'
|
||||
# CMakeConfiguration: 'relwithdebinfo'
|
||||
# vmImage: 'windows-2019'
|
||||
VS2019_x86-pc-windows-msvc_debug_ninja:
|
||||
CMakeArch: 'x86'
|
||||
BuildGenerator: 'Ninja'
|
||||
CMakeConfiguration: 'debug'
|
||||
vmImage: 'windows-2019'
|
||||
VS2019_x86-pc-windows-msvc_relwithdebinfo_ninja:
|
||||
CMakeArch: 'x86'
|
||||
BuildGenerator: 'Ninja'
|
||||
CMakeConfiguration: 'relwithdebinfo'
|
||||
vmImage: 'windows-2019'
|
||||
# VS2019 msbuild generators blocked by issue Microsoft/azure-pipelines-image-generation#754
|
||||
# VS2019_x86-pc-windows-msvc_debug_msbuild:
|
||||
# CMakeArch: 'x86'
|
||||
# BuildGenerator: 'Visual Studio 16 2019'
|
||||
# CMakeConfiguration: 'debug'
|
||||
# vmImage: 'windows-2019'
|
||||
# VS2019_x86-pc-windows-msvc_relwithdebinfo_msbuild:
|
||||
# CMakeArch: 'x86'
|
||||
# BuildGenerator: 'Visual Studio 16 2019'
|
||||
# CMakeConfiguration: 'relwithdebinfo'
|
||||
# vmImage: 'windows-2019'
|
||||
pool:
|
||||
vmImage: $(vmImage)
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
|
@ -89,11 +137,20 @@ jobs:
|
|||
displayName: 'Check Line Endings'
|
||||
|
||||
- task: BatchScript@1
|
||||
displayName: 'Setup VS2017 Env'
|
||||
displayName: 'Setup VS Env'
|
||||
inputs:
|
||||
filename: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat'
|
||||
arguments: '-arch=$(CMakeArch)'
|
||||
modifyEnvironment: true
|
||||
condition: and(succeeded(), eq(variables['vmImage'], 'vs2017-win2016'))
|
||||
|
||||
- task: BatchScript@1
|
||||
displayName: 'Setup VS Env'
|
||||
inputs:
|
||||
filename: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\Common7\Tools\VsDevCmd.bat'
|
||||
arguments: '-arch=$(CMakeArch)'
|
||||
modifyEnvironment: true
|
||||
condition: and(succeeded(), eq(variables['vmImage'], 'windows-2019'))
|
||||
|
||||
- script: |
|
||||
cmake -G "$(BuildGenerator)" "-DCMAKE_VERBOSE_MAKEFILE=ON" "$(Build.SourcesDirectory)" "-DCMAKE_BUILD_TYPE=$(CMakeConfiguration)"
|
||||
|
@ -146,7 +203,7 @@ jobs:
|
|||
ArtifactName: '$(CMakeArch)-windows-msvc-$(CMakeConfiguration)'
|
||||
parallel: true
|
||||
parallelCount: 8
|
||||
condition: and(succeeded(), eq(variables['BuildGenerator'], 'Ninja'))
|
||||
condition: and(succeeded(), and(eq(variables['vmImage'], 'vs2017-win2016'), eq(variables['BuildGenerator'], 'Ninja')))
|
||||
|
||||
# This will publish symbols created from this build to the Azure DevOps symbol
|
||||
# server. This symbol server will be private to Microsoft internal.
|
||||
|
@ -158,7 +215,7 @@ jobs:
|
|||
indexSources: true
|
||||
publishSymbols: true
|
||||
symbolServerType: 'teamServices'
|
||||
condition: and(succeeded(), eq(variables['BuildGenerator'], 'Ninja'))
|
||||
condition: and(succeeded(), and(eq(variables['vmImage'], 'vs2017-win2016'), eq(variables['BuildGenerator'], 'Ninja')))
|
||||
|
||||
- job: LinuxK4ABuildTest
|
||||
displayName: Linux K4A Build + Test
|
||||
|
|
|
@ -30,11 +30,11 @@ function Download-ToTemp
|
|||
}
|
||||
|
||||
# Download vswhere to temp dir
|
||||
$url = "https://github.com/Microsoft/vswhere/releases/download/2.5.2/vswhere.exe"
|
||||
$url = "https://github.com/Microsoft/vswhere/releases/download/2.6.7/vswhere.exe"
|
||||
$vswhere = Download-ToTemp -url $url
|
||||
|
||||
# Run vswhere to check for Visual Studio 2015 or Visual Studio 2017
|
||||
$vsWhereOutput = (& $vswhere -format xml)
|
||||
# Run vswhere to check for Visual Studio 2017 or Visual Studio 2019
|
||||
$vsWhereOutput = (& $vswhere -prerelease -format xml)
|
||||
$vsInstances = [xml]($vsWhereOutput)
|
||||
|
||||
if ((-not ($vsInstances)) -or (-not ($vsInstances.instances))) {
|
||||
|
@ -43,16 +43,16 @@ if ((-not ($vsInstances)) -or (-not ($vsInstances.instances))) {
|
|||
|
||||
$instances = $vsInstances.SelectNodes("//instances/instance")
|
||||
if ($instances.Count -eq 0) {
|
||||
Write-Error "Visual Studio 2017 not installed. Please install Visual Studio 2017"
|
||||
Write-Error "Visual Studio not installed. Please install Visual Studio 2017 or Visual Studio 2019"
|
||||
}
|
||||
|
||||
$instances = $instances | Where-Object { [Version]$_.installationVersion -ge [Version]"14.0"}
|
||||
$instances = $instances | Where-Object { [Version]$_.installationVersion -ge [Version]"15.0"}
|
||||
if (-not $instances) {
|
||||
Write-Error "Only Visual Studio 2015 or Visual Studio 2017 are supported"
|
||||
Write-Error "Only Visual Studio 2017 and greater are supported"
|
||||
}
|
||||
|
||||
# Check for cmake and ninja (installed as part of the Microsoft.VisualStudio.Component.VC.CMake.Project component)
|
||||
$vsWhereOutput = (& $vswhere -format xml -requires Microsoft.VisualStudio.Component.VC.CMake.Project)
|
||||
$vsWhereOutput = (& $vswhere -prerelease -format xml -requires Microsoft.VisualStudio.Component.VC.CMake.Project)
|
||||
$vsInstancesWithCMakeNinja = [xml]$vsWhereOutput
|
||||
if ((-not $vsInstancesWithCMakeNinja) -or (-not ($vsInstancesWithCMakeNinja.instances))) {
|
||||
if (-not (Get-Command -Name "cmake")) {
|
||||
|
|
|
@ -13,6 +13,9 @@
|
|||
#define NOMINMAX
|
||||
#include "Windows.h"
|
||||
|
||||
#include <locale>
|
||||
#include <codecvt>
|
||||
|
||||
#include "PathCch.h"
|
||||
#include "Shlwapi.h"
|
||||
|
||||
|
@ -129,10 +132,11 @@ path path::extension() const
|
|||
|
||||
path path::parent_path() const
|
||||
{
|
||||
std::wstring wsParentPath(m_path.begin(), m_path.end());
|
||||
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;
|
||||
std::wstring wsParentPath = converter.from_bytes(m_path);
|
||||
PathCchRemoveFileSpec(&wsParentPath[0], wsParentPath.size());
|
||||
|
||||
std::string resultPath(wsParentPath.begin(), wsParentPath.end());
|
||||
std::string resultPath = converter.to_bytes(wsParentPath);
|
||||
|
||||
return path(resultPath.c_str());
|
||||
}
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
|
||||
// System headers
|
||||
//
|
||||
#include <codecvt>
|
||||
#include <functional>
|
||||
#include <locale>
|
||||
#include <memory>
|
||||
#include <map>
|
||||
#include <regex>
|
||||
|
@ -139,7 +141,8 @@ HRESULT GetContainerIdToWasapiIdMap(std::map<GUID, std::string, GuidComparer> &r
|
|||
// only use letters A-Z, numbers 0-9, dashes(-), periods(.), and curly braces ({}), all of which
|
||||
// have the same numeric value for chars and wchars and don't use the upper byte of the wchar.
|
||||
//
|
||||
std::string idString(idWString.begin(), idWString.end());
|
||||
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;
|
||||
std::string idString = converter.to_bytes(idWString);
|
||||
|
||||
ComUniquePtr<IPropertyStore> pProps;
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче