-
Notifications
You must be signed in to change notification settings - Fork 388
Lowering Build Sample Apps and Test Sample Apps from Aggregator to Foundation #5783
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
5112336
Lowering Build Sample Apps and Test Sample Apps from Aggregator to Fo…
19f9828
resolve comments: clean up code, modify pipeline param and variables,…
a052b3a
modify variables
1eaede8
update variables
35647d4
add back FallbackSource
7aef7e9
Add comments for test sample apps
bae9695
update the method for getting removal list
4ec5543
update naming
e5db51b
update order for NuGetAuthenticate
f8860bb
Merge branch 'main' into user/haonanttt/sampleApps
haonanttt 6f5e6d0
update comment
1646343
renaming param and modify comment
771f059
update typo
abd138d
update scripts
13a7dee
update script
a12cc7d
Update test/ModifySampleAppsReferences.ps1
haonanttt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
148 changes: 148 additions & 0 deletions
148
build/AzurePipelinesTemplates/WindowsAppSDK-BuildAndTestSampleApps-Stage.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
# Note: In Foundation, the approach to test launching sample apps differs slightly from Aggregator: | ||
# 1. In Foundation, we only exercises a subset of the sample apps that are tested in Aggregator. | ||
# 2. All sample apps in Foundation are built and tested in SelfContained mode. | ||
# The reason for this difference is: sample apps only use component package in Foundation. There is no associated framework package, Runtime package is not generated until Aggregator. | ||
# 3. Foundation pipeline only supports running sample app testing in one specific stage. | ||
|
||
parameters: | ||
- name: "IsOneBranch" | ||
type: boolean | ||
default: true | ||
- name: TestSampleApps | ||
displayName: "Test launch of Sample apps separately in the TestSampleApps Stage" | ||
type: boolean | ||
default: true | ||
- name: TestOnArm64 | ||
type: boolean | ||
default: true | ||
- name: SamplesBuildOutputArtifactName | ||
displayName: "Base name for Samples build output artifacts" | ||
type: string | ||
default: 'SamplesBuildOutput' | ||
- name: runStaticAnalysis | ||
type: boolean | ||
default: true | ||
- name: maxParallel_x64 | ||
type: number | ||
default: 10 | ||
- name: maxParallel_arm64 | ||
type: number | ||
default: 10 | ||
# sampleFeatureAreasList param have the same naming rule and pattern as Aggregator repo: | ||
# https://microsoft.visualstudio.com/ProjectReunion/_git/WindowsAppSDKAggregator?path=/build/AzurePipelinesTemplates/WindowsAppSDK-BuildWindowsAppSDK-Stages.yml | ||
- name: "sampleFeatureAreasList" | ||
type: object | ||
default: | ||
SamplesCompatTest: | ||
- 'Installer' | ||
- 'Unpackaged' | ||
- 'Notifications-Push' | ||
- 'Insights' | ||
- 'AppLifecycle-Activation-cpp-cpp--console--unpackaged' | ||
- 'AppLifecycle-Activation-cpp-cpp--win32--unpackaged' | ||
- 'AppLifecycle-Activation-cs' | ||
- 'AppLifecycle-Instancing-cpp-cpp--console--unpackaged' | ||
- 'AppLifecycle-Instancing-cpp-cpp--win32--packaged' | ||
- 'AppLifecycle-Instancing-cpp-cpp--win32--unpackaged' | ||
- 'AppLifecycle-Instancing-cs' | ||
- 'AppLifecycle-Instancing-cs1' | ||
- 'AppLifecycle-StateNotifications-cpp-cpp--console--unpackaged' | ||
- 'AppLifecycle-StateNotifications-cpp-cpp--win32--packaged' | ||
- 'AppLifecycle-StateNotifications-cpp-cpp--win32--unpackaged' | ||
- 'AppLifecycle-StateNotifications-cs' | ||
- 'AppLifecycle-StateNotifications-cs1' | ||
- 'AppLifecycle-EnvironmentVariables' | ||
- 'AppLifecycle-Restart-cpp--console--unpackaged' | ||
- 'ResourceManagement-cpp-cpp--console--unpackaged' | ||
- 'ResourceManagement-cs-cs--winforms--unpackaged' | ||
- 'ResourceManagement-cs1' | ||
- 'Mica-cpp--win32' | ||
- 'Windowing-cpp-cpp--win32' | ||
- 'Windowing-cs-cs--winforms--unpackaged' | ||
- 'SelfContainedDeployment-cpp-cpp--console--unpackaged' | ||
- 'SelfContainedDeployment-cs' | ||
|
||
stages: | ||
- stage: BuildSampleApps_x64 | ||
dependsOn: Pack | ||
variables: | ||
SamplesRepoName: 'WindowsAppSDK-Samples' | ||
SelfRepoName: 'WindowsAppSDK' | ||
FoundationVersion: $[ stageDependencies.Pack.NugetPackage.outputs['DetermineComponentNugetPackageVersion.componentPackageVersion'] ] | ||
jobs: | ||
- template: WindowsAppSDK-BuildSamplesCompat-Job.yml | ||
parameters: | ||
IsOneBranch: ${{ parameters.IsOneBranch }} | ||
JobName: "SamplesCompatTest" | ||
FeatureAreas: ${{ parameters.sampleFeatureAreasList.SamplesCompatTest }} | ||
BuildConfig: | ||
- 'Release' | ||
- 'Debug' | ||
BuildPlatform: | ||
- 'x64' | ||
${{ if eq(parameters.TestSampleApps, 'true') }}: | ||
SamplesArtifactName: ${{ parameters.SamplesBuildOutputArtifactName }}_x64 | ||
${{ if ne(parameters.TestSampleApps, 'true') }}: | ||
SamplesArtifactName: '' | ||
runStaticAnalysis : ${{ parameters.runStaticAnalysis }} | ||
maxParallel: ${{ parameters.maxParallel_x64 }} | ||
|
||
- stage: BuildSampleApps_arm64 | ||
dependsOn: Pack | ||
variables: | ||
SamplesRepoName: 'WindowsAppSDK-Samples' | ||
SelfRepoName: 'WindowsAppSDK' | ||
FoundationVersion: $[ stageDependencies.Pack.NugetPackage.outputs['DetermineComponentNugetPackageVersion.componentPackageVersion'] ] | ||
jobs: | ||
- template: WindowsAppSDK-BuildSamplesCompat-Job.yml | ||
parameters: | ||
IsOneBranch: ${{ parameters.IsOneBranch }} | ||
JobName: "SamplesCompatTest" | ||
FeatureAreas: ${{ parameters.sampleFeatureAreasList.SamplesCompatTest }} | ||
BuildConfig: | ||
- 'Release' | ||
- 'Debug' | ||
BuildPlatform: | ||
- 'arm64' | ||
${{ if eq(parameters.TestSampleApps, 'true') }}: | ||
SamplesArtifactName: ${{ parameters.SamplesBuildOutputArtifactName }}_arm64 | ||
${{ if ne(parameters.TestSampleApps, 'true') }}: | ||
SamplesArtifactName: '' | ||
runStaticAnalysis : ${{ parameters.runStaticAnalysis }} | ||
maxParallel: ${{ parameters.maxParallel_arm64 }} | ||
|
||
- ${{ if eq( parameters.TestSampleApps, true ) }}: | ||
- stage: TestSampleApps_x64 | ||
dependsOn: | ||
- BuildSampleApps_x64 | ||
- Build_x64 | ||
variables: | ||
SamplesRepoName: 'WindowsAppSDK-Samples' | ||
SelfRepoName: 'WindowsAppSDK' | ||
jobs: | ||
- template: WindowsAppSDK-RunTestsInPipeline-Job.yml | ||
parameters: | ||
jobName: TestSamplesX64 | ||
samplesArtifactName: ${{ parameters.SamplesBuildOutputArtifactName }}_x64 | ||
callingStage: 'TestSampleApps' | ||
sampleFeatureAreasList: ${{ parameters.sampleFeatureAreasList }} | ||
IsOneBranch: ${{ parameters.IsOneBranch }} | ||
TestMatrix: $[ variables.SampleAppsTests ] | ||
|
||
- ${{ if eq(parameters.TestOnArm64, true)}}: | ||
- stage: TestSampleApps_arm64 | ||
dependsOn: | ||
- BuildSampleApps_arm64 | ||
- Build_arm64 | ||
variables: | ||
SamplesRepoName: 'WindowsAppSDK-Samples' | ||
SelfRepoName: 'WindowsAppSDK' | ||
jobs: | ||
- template: WindowsAppSDK-RunTestsInPipeline-Job.yml | ||
parameters: | ||
jobName: TestSamplesArm64 | ||
samplesArtifactName: ${{ parameters.SamplesBuildOutputArtifactName }}_arm64 | ||
callingStage: 'TestSampleApps' | ||
sampleFeatureAreasList: ${{ parameters.sampleFeatureAreasList }} | ||
IsOneBranch: ${{ parameters.IsOneBranch }} | ||
TestMatrix: $[ variables.SampleAppsTestsArm64 ] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.