Skip to content

Commit 6dccf9e

Browse files
danleggdalegg
andauthored
Pipeline changes to build, publish, and test (#1400)
Co-authored-by: Dan Legg <[email protected]>
1 parent e69ff22 commit 6dccf9e

File tree

5 files changed

+22
-13
lines changed

5 files changed

+22
-13
lines changed

.pipelines/OneBranch.Official.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ extends:
3434
globalSdl:
3535
tsa:
3636
enabled: false
37-
38-
nugetPublishing:
39-
feeds:
40-
name: CppWinRT
4137

4238
stages:
4339
- stage: build

.pipelines/jobs/OneBranchNuGet.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ jobs:
1515

1616
variables:
1717
ob_outputDirectory: '$(Build.SourcesDirectory)\out'
18-
ob_nugetPublishing_enabled: ${{ parameters.OfficialBuild }}
1918
PackageVersion: ${{ parameters.BuildVersion }}
2019

2120
steps:
@@ -59,12 +58,8 @@ jobs:
5958
- task: NuGetCommand@2
6059
displayName: 'Build NuGet package'
6160
inputs:
62-
command: 'pack'
63-
packagesToPack: 'nuget/Microsoft.Windows.CppWinRT.nuspec'
64-
versioningScheme: byEnvVar
65-
versionEnvVar: 'PackageVersion'
66-
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'
67-
packDestination: $(ob_outputDirectory)\packages
61+
command: 'custom'
62+
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'
6863

6964
- task: onebranch.pipeline.signing@1
7065
displayName: '🔒 Onebranch Signing for NuGet package'
@@ -74,3 +69,9 @@ jobs:
7469
signing_profile: external_distribution
7570
files_to_sign: 'Microsoft.Windows.CppWinRT.*.nupkg'
7671
search_root: $(ob_outputDirectory)\packages
72+
73+
- task: NuGetCommand@2
74+
displayName: 'Publish NuGet package'
75+
inputs:
76+
command: 'custom'
77+
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'

.pipelines/jobs/OneBranchTest.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ jobs:
88
- job:
99
pool:
1010
type: windows
11+
isCustom: true
12+
name: 'Azure Pipelines'
13+
vmImage: 'windows-2022' # (or 2019)
1114
strategy:
1215
matrix:
1316
test.x86:

.pipelines/jobs/OneBranchVsix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ jobs:
108108
inputs:
109109
command: sign
110110
signing_profile: external_distribution
111-
files_to_sign: '**/Microsoft.Windows.CppWinRT.*.dll'
112-
search_root: '$(Agent.TempDirectory)\$(VsixFilename)'
111+
files_to_sign: '**\*.dll'
112+
search_root: '$(Agent.TempDirectory)'
113113

114114
- task: ArchiveFiles@2
115115
displayName: 'Repack signed VSIX contents'

test/test_cpp20/format.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,26 @@ TEST_CASE("format")
1717
winrt::hstring str = L"World";
1818
REQUIRE(std::format(L"Hello {}", str) == L"Hello World");
1919
}
20+
}
2021

22+
TEST_CASE("format_make")
23+
{
2124
{
2225
winrt::Windows::Foundation::IStringable obj = winrt::make<stringable>();
2326
REQUIRE(std::format(L"This is {}", obj) == L"This is a stringable object");
2427
}
28+
}
2529

30+
TEST_CASE("format_json")
31+
{
2632
{
2733
winrt::Windows::Data::Json::JsonArray jsonArray;
2834
REQUIRE(std::format(L"The contents of the array are: {}", jsonArray) == L"The contents of the array are: []");
2935
}
36+
}
3037

38+
TEST_CASE("format_wstring")
39+
{
3140
#if __cpp_lib_format >= 202207L
3241
{
3342
std::wstring str = L"World";

0 commit comments

Comments
 (0)