forked from dotnet/maui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
undefined
- Loading branch information
Showing
5 changed files
with
174 additions
and
92 deletions.
There are no files selected for viewing
This file contains 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,106 @@ | ||
parameters: | ||
- name: condition | ||
default: true | ||
|
||
- name: artifactName | ||
type: string | ||
default: nuget | ||
|
||
- name: artifactItemPattern | ||
type: string | ||
default: '**/*.nupkg' | ||
|
||
- name: uploadPrefix | ||
type: string | ||
default: '' | ||
|
||
- name: checkoutDirectory | ||
type: string | ||
default: $(System.DefaultWorkingDirectory) | ||
|
||
- name: prepareSteps | ||
type: stepList | ||
default: [] | ||
|
||
- name: category | ||
type: string | ||
default: '' | ||
|
||
steps: | ||
- ${{ each step in parameters.prepareSteps }}: | ||
- ${{ each pair in step }}: | ||
${{ pair.key }}: ${{ pair.value }} | ||
|
||
- template: provision.yml | ||
parameters: | ||
checkoutDirectory: ${{ parameters.checkoutDirectory }} | ||
skipXcode: false | ||
skipProvisioning: true | ||
|
||
- task: DownloadBuildArtifacts@0 | ||
displayName: 'Download Packages' | ||
inputs: | ||
artifactName: ${{ parameters.artifactName }} | ||
itemPattern: ${{ parameters.artifactItemPattern }} | ||
downloadPath: $(System.DefaultWorkingDirectory)/artifacts | ||
|
||
- pwsh: Move-Item -Path artifacts\${{ parameters.artifactName }}\*.nupkg -Destination artifacts -Force | ||
displayName: Move the downloaded artifacts | ||
|
||
- pwsh: | | ||
Get-ChildItem artifacts -Filter 'Microsoft.Maui.Controls.*.nupkg' | Where-Object { $_.Name -match '^Microsoft\.Maui\.Controls\.([\d\.]+.*)\.nupkg$' } | ||
$version = $Matches.1 | ||
if (!$version) { | ||
Write-Error "Failed to extract the version from the nupkgs" | ||
exit 1 | ||
} | ||
Write-Host "Found .NET MAUI version (MAUI_PACKAGE_VERSION): $version" | ||
Write-Host "##vso[task.setvariable variable=MAUI_PACKAGE_VERSION]$version" | ||
displayName: Read the .NET MAUI version from the nugets | ||
|
||
- pwsh: ./build.ps1 --target=dotnet-local-workloads --verbosity=diagnostic | ||
displayName: 'Install .NET (Local Workloads)' | ||
retryCountOnTaskFailure: 3 | ||
workingDirectory: ${{ parameters.checkoutDirectory }} | ||
env: | ||
DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token) | ||
PRIVATE_BUILD: $(PrivateBuild) | ||
|
||
- pwsh: ./build.ps1 --target=dotnet-integration-test --filter="Category=${{ parameters.category }}" --resultsfilename="integration-tests-${{ parameters.category }}" --verbosity=diagnostic | ||
displayName: Run ${{ parameters.category }} templates build tests | ||
workingDirectory: ${{ parameters.checkoutDirectory }} | ||
|
||
- task: CopyFiles@2 | ||
displayName: Copy binlogs | ||
inputs: | ||
SourceFolder: '$(Build.SourcesDirectory)' | ||
Contents: | | ||
**/*.binlog | ||
../**/*.binlog | ||
../../**/*.binlog | ||
TargetFolder: '$(Build.StagingDirectory)/IntegrationTestsBuildLogs' | ||
continueOnError: true | ||
condition: succeededOrFailed() | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: Publish Artifacts | ||
condition: always() | ||
continueOnError: true | ||
inputs: | ||
PathToPublish: '$(Build.StagingDirectory)/IntegrationTestsBuildLogs' | ||
ArtifactName: BuildTemplateBuildLogs | ||
|
||
- task: PublishTestResults@2 | ||
displayName: Publish the ${{ parameters.category }} templates build tests | ||
condition: always() | ||
inputs: | ||
testRunner: VSTest | ||
testResultsFiles: '$(build.artifactstagingdirectory)/**/*.trx' | ||
testRunTitle: ${{ parameters.category }} templates build tests | ||
|
||
- pwsh: | | ||
Write-Host "Current job status is: $env:AGENT_JOBSTATUS" | ||
if ($env:AGENT_JOBSTATUS -eq "SucceededWithIssues") { | ||
Write-Host "##vso[task.complete result=Failed;]DONE" | ||
} | ||
displayName: Fail if any issues occurred |
This file contains 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 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 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 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