analyze-aot-compact.yml•1.47 kB
parameters:
- name: runtime
type: string
- name: sourceDirectory
type: string
default: $(Build.SourcesDirectory)
steps:
- task: PowerShell@2
displayName: "Run AOT Compatibility Analysis"
inputs:
pwsh: true
filePath: ${{ parameters.sourceDirectory }}/eng/scripts/Analyze-AOT-Compact.ps1
arguments: >
-Runtime '${{ parameters.runtime }}'
-OutputFormat Console
workingDirectory: ${{ parameters.sourceDirectory }}
continueOnError: true
- task: PowerShell@2
displayName: "Check if AOT report exists and publish artifact"
inputs:
pwsh: true
targetType: 'inline'
script: |
$reportPath = "${{ parameters.sourceDirectory }}/.work/aotCompactReport"
$exists = Test-Path $reportPath
Write-Host "AOT report directory exists: $exists"
if ($exists) {
Write-Host "##vso[task.setvariable variable=ShouldPublishArtifact]true"
} else {
Write-Host "##vso[task.setvariable variable=ShouldPublishArtifact]false"
}
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
parameters:
CustomCondition: and(succeeded(), eq(variables['ShouldPublishArtifact'], 'true'), eq(variables['AOTReportExists'], 'true'))
ArtifactPath: ${{ parameters.sourceDirectory }}/.work/aotCompactReport
ArtifactName: AOTCompatibilityReport
SbomEnabled: ${{ ne(variables['Build.Reason'], 'PullRequest') }}