Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline changes to build, publish, and test #1400

Merged
merged 28 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0abe6cd
Try different nuget syntax
dalegg Mar 20, 2024
66eb2dd
Need target_version in nuget command
dalegg Mar 20, 2024
de81d6a
Wrong nuget feed
dalegg Mar 20, 2024
ec4bb2c
Don't use default nuget publisher - try PkgES
dalegg Mar 20, 2024
47cac02
)
dalegg Mar 20, 2024
64e2667
Don't publish, just create nuget to binplace later
dalegg Mar 21, 2024
214cf3a
binplace nuget, try new publishing
dalegg Mar 21, 2024
a126a31
comment out signing to continue migration testing - package was alrea…
dalegg Mar 21, 2024
85033ad
nuget battle continues
dalegg Mar 21, 2024
c5b9cad
try different nuget command
dalegg Mar 21, 2024
f33aee3
skip build
dalegg Mar 21, 2024
c4e52e5
skip everything
dalegg Mar 21, 2024
1434d48
skip everything
dalegg Mar 21, 2024
3ab0a9e
use cppwinrt version
dalegg Mar 21, 2024
91f076b
manual push
dalegg Mar 21, 2024
62e22fd
manual push
dalegg Mar 21, 2024
6ac764b
Maybe there's a problem with binplacing the nuget
dalegg Mar 21, 2024
31f1e20
$
dalegg Mar 22, 2024
314a622
more granularity in failing test
dalegg Mar 22, 2024
2827eec
guard json against lib version
dalegg Mar 22, 2024
6608803
try to get compile error
dalegg Mar 22, 2024
e03c0c1
Change dotnet and signing
dalegg Mar 25, 2024
7bb8530
Signing fix
dalegg Mar 25, 2024
7972687
Use ge toolset
dalegg Mar 25, 2024
fd9ca4f
Change test job to run on azure
dalegg Mar 26, 2024
d1cdb78
Clean up
dalegg Mar 26, 2024
2460204
More cleanup
dalegg Mar 26, 2024
1a38de0
Try NuGetCommand@2 again with custom input
dalegg Mar 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .pipelines/OneBranch.Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ extends:
globalSdl:
tsa:
enabled: false

nugetPublishing:
feeds:
name: CppWinRT

stages:
- stage: build
Expand Down
15 changes: 8 additions & 7 deletions .pipelines/jobs/OneBranchNuGet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:

variables:
ob_outputDirectory: '$(Build.SourcesDirectory)\out'
ob_nugetPublishing_enabled: ${{ parameters.OfficialBuild }}
PackageVersion: ${{ parameters.BuildVersion }}

steps:
Expand Down Expand Up @@ -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'
Expand All @@ -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'
3 changes: 3 additions & 0 deletions .pipelines/jobs/OneBranchTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ jobs:
- job:
pool:
type: windows
isCustom: true
name: 'Azure Pipelines'
vmImage: 'windows-2022' # (or 2019)
strategy:
matrix:
test.x86:
Expand Down
4 changes: 2 additions & 2 deletions .pipelines/jobs/OneBranchVsix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
9 changes: 9 additions & 0 deletions test/test_cpp20/format.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Loading