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

Add New CI Pipeline for Latest WindowsAppSDK #36222

Closed
wants to merge 16 commits into from

Conversation

shuaiyuanxx
Copy link
Contributor

@shuaiyuanxx shuaiyuanxx commented Dec 5, 2024

Summary

This PR introduces the following changes to the CI pipeline and version management:

Pipeline Enhancements:

  • Added a new script UpdateVersions.ps1 to automate the update of Microsoft.WindowsAppSDK versions across various project files.
  • Introduced a new pipeline configuration ci-using-the-latest-winappsdk.yml to build using the latest Microsoft.WindowsAppSDK.
  • Updated existing pipeline configurations to support the new useLatestWinAppSDK parameter.

Pipeline Configuration Updates:

  • Updated job-build-project.yml to handle the useLatestWinAppSDK parameter and adjust the RestoreAdditionalProjectSourcesArg accordingly.
  • Added a new template steps-update-winappsdk-and-restore-nuget.yml for updating and restoring NuGet packages with the latest Microsoft.WindowsAppSDK.

PR Checklist

  • Closes: #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Changes

New Files

  • .pipelines/UpdateVersions.ps1: Script to update Microsoft.WindowsAppSDK versions.
  • .pipelines/v2/ci-using-the-latest-winappsdk.yml: New pipeline configuration for using the latest Microsoft.WindowsAppSDK.
  • .pipelines/v2/templates/steps-update-winappsdk-and-restore-nuget.yml: Template for updating and restoring NuGet packages.

Modified Files

  • .pipelines/v2/templates/job-build-project.yml: Updated to handle useLatestWinAppSDK parameter and adjust MSBuild arguments.
  • .pipelines/v2/templates/pipeline-ci-build.yml: Added useLatestWinAppSDK parameter.

Validation Steps Performed

  • Verified that the new .pipelines/UpdateVersions.ps1 script correctly updates the Microsoft.WindowsAppSDK versions in the relevant project files.
  • Ensured that the new pipeline configuration builds successfully with the latest Microsoft.WindowsAppSDK.
  • Tested the conditional execution of verifyNoticeMdAgainstNugetPackages.ps1 based on the useLatestWinAppSDK parameter.

This comment has been minimized.

@shuaiyuanxx shuaiyuanxx changed the title Azure pipelines Add New CI Pipeline for Latest Microsoft.WindowsAppSDK Dec 5, 2024
@shuaiyuanxx shuaiyuanxx changed the title Add New CI Pipeline for Latest Microsoft.WindowsAppSDK Add New CI Pipeline for Latest WindowsAppSDK Dec 5, 2024

This comment has been minimized.

@shuaiyuanxx shuaiyuanxx requested review from lei9444 and moooyo December 5, 2024 06:44
Copy link
Member

@crutkas crutkas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel with this, maybe it is time to migrate the cpp projects also over to a centralized prop like we did with the c# stuff.

project: '55e8140e-57ac-4e5f-8f9c-c7c15b51929d'
definition: '104083'
buildVersionToDownload: 'latestFromBranch'
branchName: 'refs/heads/release/1.6-stable'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this feels like it would change overtime, no?

Copy link
Contributor Author

@shuaiyuanxx shuaiyuanxx Dec 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The project and definition IDs in Azure Pipelines are unique identifiers for a specific project and pipeline definition, respectively. These IDs do not change over time unless you explicitly delete and recreate the project or pipeline, which would generate new IDs.

}

# Update .csproj files
Get-ChildItem -Recurse *.csproj | ForEach-Object {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this just being safe in the future?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just got the idea from the pipeline in WindowsAppSDK-Samples, it also did it in this way: https://github.com/microsoft/WindowsAppSDK-Samples/blob/main/UpdateVersions.ps1

@crutkas
Copy link
Member

crutkas commented Dec 6, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Pipeline can now specify the version of winappsdk to be used.
@shuaiyuanxx shuaiyuanxx marked this pull request as draft December 9, 2024 04:48
@shuaiyuanxx shuaiyuanxx force-pushed the azure-pipelines branch 9 times, most recently from 3b6f86c to dd0e182 Compare December 9, 2024 06:40
@shuaiyuanxx
Copy link
Contributor Author

Doing some test for the code update, close it until the pipeline passed all the test.

@shuaiyuanxx

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants