[CI] Improve API diff. (#14642)
Two small improvements before we reconver from the EO: 1. Upload the api diff to vsdrops. 2. Ensure that the dependencies are correct.
This commit is contained in:
Родитель
969b54b24d
Коммит
5e5f05c326
|
@ -19,7 +19,7 @@ steps:
|
|||
testPrefix: sim
|
||||
runTests: ${{ parameters.runTests }}
|
||||
|
||||
- ${{ if and(eq(parameters.enableAPIDiff, true), eq(variables['APIDIFF_BUILT'], 'True')) }}:
|
||||
- ${{ if eq(parameters.enableAPIDiff, true) }}:
|
||||
# Download the Html Report that was added by the tests job.
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: 'Download API diff (from stable)'
|
||||
|
@ -34,10 +34,9 @@ steps:
|
|||
archiveFilePatterns: '$(System.DefaultWorkingDirectory)/Reports/apidiff-stable/apidiff-stable.zip'
|
||||
destinationFolder: '$(System.DefaultWorkingDirectory)/apidiff-stable'
|
||||
|
||||
- ${{ if and(eq(parameters.enableAPIDiff, true), eq(variables['API_GENERATOR_BUILT'], 'True')) }}:
|
||||
- ${{ if eq(parameters.enableAPIDiff, true) }}:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: 'Download API & Generator comparison'
|
||||
condition: and(succeeded(), contains(variables.API_GENERATOR_DIFF_BUILT, 'True'))
|
||||
inputs:
|
||||
patterns: 'apicomparison/apicomparison.zip'
|
||||
allowFailedBuilds: true
|
||||
|
@ -45,7 +44,6 @@ steps:
|
|||
|
||||
- task: ExtractFiles@1
|
||||
displayName: 'Extract API & Generator comparison'
|
||||
condition: and(succeeded(), contains(variables.API_GENERATOR_DIFF_BUILT, 'True'))
|
||||
inputs:
|
||||
archiveFilePatterns: '$(System.DefaultWorkingDirectory)/Reports/apicomparison/apicomparison.zip'
|
||||
destinationFolder: '$(System.DefaultWorkingDirectory)/apicomparison'
|
||||
|
|
|
@ -192,6 +192,7 @@ jobs:
|
|||
enableDotnet: ${{ parameters.enableDotnet }}
|
||||
sbomFilter: '*.nupkg;*.pkg;*.msi'
|
||||
|
||||
- ${{ if eq(parameters.enableAPIDiff, true) }}:
|
||||
- job: upload_vsdrops
|
||||
displayName: 'Upload API diff to VSDrops'
|
||||
timeoutInMinutes: 1000
|
||||
|
@ -212,6 +213,7 @@ jobs:
|
|||
parameters:
|
||||
testPrefix: sim
|
||||
runTests: ${{ parameters.runTests }}
|
||||
enableAPIDiff: ${{ parameters.enableAPIDiff }}
|
||||
|
||||
|
||||
- job: publish_html
|
||||
|
@ -220,9 +222,10 @@ jobs:
|
|||
dependsOn: # has to wait for the tests to be done AND the data to be uploaded
|
||||
- configure
|
||||
- build
|
||||
- api_diff
|
||||
- upload_azure_blob
|
||||
- upload_vsdrops
|
||||
- ${{ if eq(parameters.enableAPIDiff, true) }}:
|
||||
- api_diff
|
||||
condition: succeededOrFailed()
|
||||
variables:
|
||||
# Define the variable FOO from the previous job
|
||||
|
@ -230,11 +233,12 @@ jobs:
|
|||
BUILD_PACKAGE: $[ dependencies.configure.outputs['labels.build-package'] ]
|
||||
TESTS_BOT: $[ dependencies.build.outputs['runTests.TESTS_BOT'] ]
|
||||
TESTS_JOBSTATUS: $[ dependencies.build.outputs['runTests.TESTS_JOBSTATUS'] ]
|
||||
PR_ID: $[ dependencies.configure.outputs['labels.pr-number'] ]
|
||||
${{ if eq(parameters.enableAPIDiff, true) }}:
|
||||
APIDIFF_MESSAGE: $[ dependencies.api_diff.outputs['apidiff.APIDIFF_MESSAGE'] ]
|
||||
APIDIFF_BUILT: $[ dependencies.api_diff.outputs['apidiff.APIDIFF_BUILT'] ]
|
||||
API_GENERATOR_DIFF_BUILT: $[ dependencies.api_diff.outputs['apiGeneratorDiff.API_GENERATOR_BUILT'] ]
|
||||
API_GENERATOR_DIFF_STATUS_MESSAGE: $[ dependencies.api_diff.outputs['apiGeneratorDiff.API_GENERATOR_DIFF_STATUS_MESSAGE'] ]
|
||||
PR_ID: $[ dependencies.configure.outputs['labels.pr-number'] ]
|
||||
pool:
|
||||
vmImage: 'windows-latest'
|
||||
workspace:
|
||||
|
|
|
@ -10,12 +10,21 @@ parameters:
|
|||
type: boolean
|
||||
default: true
|
||||
|
||||
- name: enableAPIDiff
|
||||
type: boolean
|
||||
default: true
|
||||
|
||||
steps:
|
||||
|
||||
- checkout: self
|
||||
persistCredentials: true
|
||||
path: s/xamarin-macios
|
||||
|
||||
- template: download-artifacts.yml
|
||||
parameters:
|
||||
runTests: false # we do not run tests on builds
|
||||
enableAPIDiff: ${{ parameters.enableAPIDiff }}
|
||||
|
||||
# Upload the API diff to vsdrops to be able to locate it
|
||||
- task: ms-vscs-artifact.build-tasks.artifactDropTask-1.artifactDropTask@0
|
||||
displayName: 'Publish API diff to Artifact Services Drop'
|
||||
|
|
Загрузка…
Ссылка в новой задаче