-
Notifications
You must be signed in to change notification settings - Fork 247
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
Pipeline changes to build, publish, and test #1400
Conversation
danlegg
commented
Mar 27, 2024
- Handcraft NuGet commands to pack and publish
- Run unit tests on Windows-2022 image
.pipelines/jobs/OneBranchNuGet.yml
Outdated
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=C:\__w\1\s\x86\cppwinrt\cppwinrt.exe;cppwinrt_fast_fwd_x86=C:\__w\1\s\x86\cppwinrt_fast_forwarder.lib;cppwinrt_fast_fwd_x64=C:\__w\1\s\x64\cppwinrt_fast_forwarder.lib;cppwinrt_fast_fwd_arm=C:\__w\1\s\arm\cppwinrt_fast_forwarder.lib;cppwinrt_fast_fwd_arm64=C:\__w\1\s\arm64\cppwinrt_fast_forwarder.lib;target_version=$(PackageVersion) -Version $(PackageVersion) -Verbosity Detailed' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Build.SourcesDirectory would be preferable to "C:/__w/1/s". Was Build.SourcesDirectory not working here? I'm curious about the guid for the task as well, was NuGetCommand@2 not available or working for OneBranch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
.pipelines/jobs/OneBranchNuGet.yml
Outdated
@@ -56,15 +55,11 @@ jobs: | |||
artifactName: 'drop_build_arm64' | |||
targetPath: '$(Build.SourcesDirectory)/arm64' | |||
|
|||
- task: NuGetCommand@2 | |||
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we change the type of task here, and why is the command changed from 'pack' to 'custom'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NuGetCommand@2 works for the custom nuget commands too - I've switched back. Rather than trying to get all the input parameters to play nicely with the task I just used a custom nuget command which I copied out of a working pipeline log.