зеркало из https://github.com/microsoft/cppwinrt.git
Pipeline changes to build, publish, and test (#1400)
Co-authored-by: Dan Legg <dalegg@microsoft.com>
This commit is contained in:
Родитель
e69ff22721
Коммит
6dccf9ef88
|
@ -35,10 +35,6 @@ extends:
|
|||
tsa:
|
||||
enabled: false
|
||||
|
||||
nugetPublishing:
|
||||
feeds:
|
||||
name: CppWinRT
|
||||
|
||||
stages:
|
||||
- stage: build
|
||||
pool:
|
||||
|
|
|
@ -15,7 +15,6 @@ jobs:
|
|||
|
||||
variables:
|
||||
ob_outputDirectory: '$(Build.SourcesDirectory)\out'
|
||||
ob_nugetPublishing_enabled: ${{ parameters.OfficialBuild }}
|
||||
PackageVersion: ${{ parameters.BuildVersion }}
|
||||
|
||||
steps:
|
||||
|
@ -59,12 +58,8 @@ jobs:
|
|||
- task: NuGetCommand@2
|
||||
displayName: 'Build NuGet package'
|
||||
inputs:
|
||||
command: 'pack'
|
||||
packagesToPack: 'nuget/Microsoft.Windows.CppWinRT.nuspec'
|
||||
versioningScheme: byEnvVar
|
||||
versionEnvVar: 'PackageVersion'
|
||||
buildProperties: 'cppwinrt_exe=$(Build.SourcesDirectory)\x86\cppwinrt\cppwinrt.exe;cppwinrt_fast_fwd_x86=$(Build.SourcesDirectory)\x86\cppwinrt_fast_forwarder.lib;cppwinrt_fast_fwd_x64=$(Build.SourcesDirectory)\x64\cppwinrt_fast_forwarder.lib;cppwinrt_fast_fwd_arm=$(Build.SourcesDirectory)\arm\cppwinrt_fast_forwarder.lib;cppwinrt_fast_fwd_arm64=$(Build.SourcesDirectory)\arm64\cppwinrt_fast_forwarder.lib'
|
||||
packDestination: $(ob_outputDirectory)\packages
|
||||
command: 'custom'
|
||||
arguments: 'pack nuget/Microsoft.Windows.CppWinRT.nuspec -NonInteractive -OutputDirectory $(ob_outputDirectory)\packages -Properties Configuration=release;cppwinrt_exe=$(Build.SourcesDirectory)\x86\cppwinrt\cppwinrt.exe;cppwinrt_fast_fwd_x86=$(Build.SourcesDirectory)\x86\cppwinrt_fast_forwarder.lib;cppwinrt_fast_fwd_x64=$(Build.SourcesDirectory)\x64\cppwinrt_fast_forwarder.lib;cppwinrt_fast_fwd_arm=$(Build.SourcesDirectory)\arm\cppwinrt_fast_forwarder.lib;cppwinrt_fast_fwd_arm64=$(Build.SourcesDirectory)\arm64\cppwinrt_fast_forwarder.lib;target_version=$(PackageVersion) -Version $(PackageVersion) -Verbosity Detailed'
|
||||
|
||||
- task: onebranch.pipeline.signing@1
|
||||
displayName: '🔒 Onebranch Signing for NuGet package'
|
||||
|
@ -74,3 +69,9 @@ jobs:
|
|||
signing_profile: external_distribution
|
||||
files_to_sign: 'Microsoft.Windows.CppWinRT.*.nupkg'
|
||||
search_root: $(ob_outputDirectory)\packages
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: 'Publish NuGet package'
|
||||
inputs:
|
||||
command: 'custom'
|
||||
arguments: 'push $(ob_outputDirectory)\packages\Microsoft.Windows.CppWinRT.$(PackageVersion).nupkg -NonInteractive -Source https://microsoft.pkgs.visualstudio.com/_packaging/CppWinRT/nuget/v3/index.json -ApiKey VSTS'
|
|
@ -8,6 +8,9 @@ jobs:
|
|||
- job:
|
||||
pool:
|
||||
type: windows
|
||||
isCustom: true
|
||||
name: 'Azure Pipelines'
|
||||
vmImage: 'windows-2022' # (or 2019)
|
||||
strategy:
|
||||
matrix:
|
||||
test.x86:
|
||||
|
|
|
@ -108,8 +108,8 @@ jobs:
|
|||
inputs:
|
||||
command: sign
|
||||
signing_profile: external_distribution
|
||||
files_to_sign: '**/Microsoft.Windows.CppWinRT.*.dll'
|
||||
search_root: '$(Agent.TempDirectory)\$(VsixFilename)'
|
||||
files_to_sign: '**\*.dll'
|
||||
search_root: '$(Agent.TempDirectory)'
|
||||
|
||||
- task: ArchiveFiles@2
|
||||
displayName: 'Repack signed VSIX contents'
|
||||
|
|
|
@ -17,17 +17,26 @@ TEST_CASE("format")
|
|||
winrt::hstring str = L"World";
|
||||
REQUIRE(std::format(L"Hello {}", str) == L"Hello World");
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("format_make")
|
||||
{
|
||||
{
|
||||
winrt::Windows::Foundation::IStringable obj = winrt::make<stringable>();
|
||||
REQUIRE(std::format(L"This is {}", obj) == L"This is a stringable object");
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("format_json")
|
||||
{
|
||||
{
|
||||
winrt::Windows::Data::Json::JsonArray jsonArray;
|
||||
REQUIRE(std::format(L"The contents of the array are: {}", jsonArray) == L"The contents of the array are: []");
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("format_wstring")
|
||||
{
|
||||
#if __cpp_lib_format >= 202207L
|
||||
{
|
||||
std::wstring str = L"World";
|
||||
|
|
Загрузка…
Ссылка в новой задаче