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:
Manuel de la Pena 2022-04-05 15:24:02 -04:00 коммит произвёл GitHub
Родитель 969b54b24d
Коммит 5e5f05c326
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 38 добавлений и 27 удалений

Просмотреть файл

@ -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,26 +192,28 @@ jobs:
enableDotnet: ${{ parameters.enableDotnet }}
sbomFilter: '*.nupkg;*.pkg;*.msi'
- job: upload_vsdrops
displayName: 'Upload API diff to VSDrops'
timeoutInMinutes: 1000
dependsOn: # can start as soon as the tests are done and the api diff
- build
- api_diff
condition: succeededOrFailed()
- ${{ if eq(parameters.enableAPIDiff, true) }}:
- job: upload_vsdrops
displayName: 'Upload API diff to VSDrops'
timeoutInMinutes: 1000
dependsOn: # can start as soon as the tests are done and the api diff
- build
- api_diff
condition: succeededOrFailed()
variables:
API_GENERATOR_DIFF_BUILT: $[ dependencies.api_diff.outputs['apiGeneratorDiff.API_GENERATOR_BUILT'] ]
variables:
API_GENERATOR_DIFF_BUILT: $[ dependencies.api_diff.outputs['apiGeneratorDiff.API_GENERATOR_BUILT'] ]
pool:
vmImage: 'windows-latest'
workspace:
clean: all
steps:
- template: upload-vsdrops.yml
parameters:
testPrefix: sim
runTests: ${{ parameters.runTests }}
pool:
vmImage: 'windows-latest'
workspace:
clean: all
steps:
- template: upload-vsdrops.yml
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'] ]
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'] ]
${{ 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'] ]
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'