2020-01-13 10:22:52 -05:00
|
|
|
parameters:
|
2020-04-12 13:20:37 -04:00
|
|
|
- name: Packages
|
|
|
|
type: object
|
|
|
|
default: {}
|
|
|
|
- name: LinuxImage
|
|
|
|
type: string
|
|
|
|
default: "ubuntu-latest"
|
|
|
|
- name: DotNetSdkVersion
|
|
|
|
type: string
|
|
|
|
default: 3.1.100
|
2020-01-13 10:22:52 -05:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
- job: CompatibilityCheck
|
|
|
|
displayName: Compatibility Check
|
|
|
|
pool:
|
2020-01-18 10:19:19 -05:00
|
|
|
vmImage: "${{ parameters.LinuxImage }}"
|
2020-01-13 10:22:52 -05:00
|
|
|
# only execute for pull requests
|
|
|
|
condition: and(succeeded(), variables['System.PullRequest.PullRequestNumber'])
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
${{ each Package in parameters.Packages }}:
|
|
|
|
${{ Package.key }}:
|
|
|
|
NugetPackageName: ${{ Package.value.NugetPackageName }}
|
2020-01-15 05:27:38 -05:00
|
|
|
AssemblyFileName: ${{ Package.value.AssemblyFileName }}
|
|
|
|
maxParallel: 2
|
2020-04-07 12:42:45 -04:00
|
|
|
dependsOn: Build
|
2020-01-13 10:22:52 -05:00
|
|
|
steps:
|
|
|
|
- checkout: none
|
|
|
|
|
|
|
|
- task: UseDotNet@2
|
|
|
|
displayName: "Update DotNet"
|
|
|
|
inputs:
|
|
|
|
packageType: sdk
|
|
|
|
version: ${{ parameters.DotNetSdkVersion }}
|
|
|
|
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
displayName: "Download New Assembly Build Artifact"
|
|
|
|
inputs:
|
2020-01-15 05:27:38 -05:00
|
|
|
source: "current"
|
|
|
|
artifact: "$(NugetPackageName)"
|
2020-01-13 10:22:52 -05:00
|
|
|
path: "$(System.ArtifactsDirectory)/new-artifacts"
|
2020-01-15 05:27:38 -05:00
|
|
|
runVersion: "latest"
|
2020-01-13 10:22:52 -05:00
|
|
|
|
|
|
|
- task: CopyFiles@2
|
|
|
|
displayName: "Copy New Assembly Build Artifact"
|
|
|
|
inputs:
|
2020-01-15 05:27:38 -05:00
|
|
|
sourceFolder: $(System.ArtifactsDirectory)/new-artifacts
|
2020-01-13 10:22:52 -05:00
|
|
|
contents: "**/*.dll"
|
|
|
|
targetFolder: $(System.ArtifactsDirectory)/new-release
|
2020-01-15 05:27:38 -05:00
|
|
|
cleanTargetFolder: true
|
|
|
|
overWrite: true
|
|
|
|
flattenFolders: true
|
2020-01-13 10:22:52 -05:00
|
|
|
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
|
|
displayName: "Download Reference Assembly Build Artifact"
|
|
|
|
inputs:
|
2020-01-15 05:27:38 -05:00
|
|
|
source: "specific"
|
|
|
|
artifact: "$(NugetPackageName)"
|
2020-01-13 10:22:52 -05:00
|
|
|
path: "$(System.ArtifactsDirectory)/current-artifacts"
|
2020-01-15 05:27:38 -05:00
|
|
|
project: "$(System.TeamProjectId)"
|
|
|
|
pipeline: "$(System.DefinitionId)"
|
|
|
|
runVersion: "latestFromBranch"
|
|
|
|
runBranch: "refs/heads/$(System.PullRequest.TargetBranch)"
|
2020-01-13 10:22:52 -05:00
|
|
|
|
|
|
|
- task: CopyFiles@2
|
|
|
|
displayName: "Copy Reference Assembly Build Artifact"
|
|
|
|
inputs:
|
2020-01-15 05:27:38 -05:00
|
|
|
sourceFolder: $(System.ArtifactsDirectory)/current-artifacts
|
2020-01-13 10:22:52 -05:00
|
|
|
contents: "**/*.dll"
|
|
|
|
targetFolder: $(System.ArtifactsDirectory)/current-release
|
2020-01-15 05:27:38 -05:00
|
|
|
cleanTargetFolder: true
|
|
|
|
overWrite: true
|
|
|
|
flattenFolders: true
|
2020-01-13 10:22:52 -05:00
|
|
|
|
|
|
|
- task: DownloadGitHubRelease@0
|
|
|
|
displayName: "Download ABI Compatibility Check Tool"
|
|
|
|
inputs:
|
|
|
|
connection: Jellyfin Release Download
|
|
|
|
userRepository: EraYaN/dotnet-compatibility
|
2020-01-15 05:27:38 -05:00
|
|
|
defaultVersionType: "latest"
|
|
|
|
itemPattern: "**-ci.zip"
|
2020-01-13 10:22:52 -05:00
|
|
|
downloadPath: "$(System.ArtifactsDirectory)"
|
|
|
|
|
|
|
|
- task: ExtractFiles@1
|
|
|
|
displayName: "Extract ABI Compatibility Check Tool"
|
|
|
|
inputs:
|
|
|
|
archiveFilePatterns: "$(System.ArtifactsDirectory)/*-ci.zip"
|
|
|
|
destinationFolder: $(System.ArtifactsDirectory)/tools
|
|
|
|
cleanDestinationFolder: true
|
|
|
|
|
|
|
|
# The `--warnings-only` switch will swallow the return code and not emit any errors.
|
|
|
|
- task: CmdLine@2
|
|
|
|
displayName: "Execute ABI Compatibility Check Tool"
|
|
|
|
inputs:
|
|
|
|
script: "dotnet tools/CompatibilityCheckerCLI.dll current-release/$(AssemblyFileName) new-release/$(AssemblyFileName) --azure-pipelines --warnings-only"
|
2020-01-15 05:27:38 -05:00
|
|
|
workingDirectory: $(System.ArtifactsDirectory)
|