2019-02-18 21:16:17 -05:00
name : $(Date:yyyyMMdd)$(Rev:.r)
2019-02-18 17:47:31 -05:00
variables :
2019-02-18 20:17:57 -05:00
- name : TestProjects
value : 'Jellyfin.Server.Tests/Jellyfin.Server.Tests.csproj'
- name : RestoreBuildProjects
value : 'Jellyfin.Server/Jellyfin.Server.csproj'
2019-02-18 17:47:31 -05:00
2019-02-18 16:36:24 -05:00
pr :
2019-02-18 17:42:24 -05:00
autoCancel : true
trigger :
batch : true
2019-02-18 16:26:40 -05:00
2019-02-18 17:24:39 -05:00
jobs :
2019-02-18 20:17:57 -05:00
- job : main_build
displayName : Main Build
pool :
vmImage : ubuntu-16.04
strategy :
matrix :
release :
BuildConfiguration : Release
debug :
2019-02-18 20:50:25 -05:00
BuildConfiguration : Debug
2019-02-18 21:16:17 -05:00
maxParallel : 2
2019-02-18 17:47:31 -05:00
steps :
- checkout : self
2019-02-26 18:53:16 -05:00
clean : true
2019-02-18 17:47:31 -05:00
submodules : true
persistCredentials : false
2019-02-18 17:42:24 -05:00
2019-02-18 17:47:31 -05:00
- task : DotNetCoreCLI@2
displayName : Restore
inputs :
command : restore
projects : '$(RestoreBuildProjects)'
2019-02-18 17:42:24 -05:00
2019-02-18 17:47:31 -05:00
- task : DotNetCoreCLI@2
displayName : Build
inputs :
projects : '$(RestoreBuildProjects)'
arguments : '--configuration $(BuildConfiguration)'
2019-02-18 17:42:24 -05:00
2019-02-18 17:47:31 -05:00
- task : DotNetCoreCLI@2
displayName : Test
inputs :
command : test
projects : '$(RestoreBuildProjects)'
arguments : '--configuration $(BuildConfiguration)'
enabled : false
2019-02-18 16:26:40 -05:00
2019-02-18 17:47:31 -05:00
- task : DotNetCoreCLI@2
displayName : Publish
inputs :
command : publish
publishWebProjects : false
projects : '$(RestoreBuildProjects)'
arguments : '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)'
2019-02-18 20:55:10 -05:00
zipAfterPublish : false
2019-02-18 16:26:40 -05:00
2019-02-18 20:55:10 -05:00
# - task: PublishBuildArtifacts@1
# displayName: 'Publish Artifact'
# inputs:
# PathtoPublish: '$(build.artifactstagingdirectory)'
# artifactName: 'jellyfin-build-$(BuildConfiguration)'
# zipAfterPublish: true
2019-02-18 20:17:57 -05:00
- task : PublishBuildArtifacts@1
displayName : 'Publish Artifact Naming'
2019-03-13 16:09:08 -04:00
condition : and(eq(variables['BuildConfiguration'], 'Release'), succeeded())
2019-02-18 20:17:57 -05:00
inputs :
2019-02-18 20:59:56 -05:00
PathtoPublish : '$(build.artifactstagingdirectory)/Jellyfin.Server/Emby.Naming.dll'
2019-02-18 20:17:57 -05:00
artifactName : 'Jellyfin.Naming'
- task : PublishBuildArtifacts@1
displayName : 'Publish Artifact Controller'
2019-03-13 16:09:08 -04:00
condition : and(eq(variables['BuildConfiguration'], 'Release'), succeeded())
2019-02-18 20:17:57 -05:00
inputs :
2019-02-18 20:50:25 -05:00
PathtoPublish : '$(build.artifactstagingdirectory)/Jellyfin.Server/MediaBrowser.Controller.dll'
2019-02-18 20:17:57 -05:00
artifactName : 'Jellyfin.Controller'
- task : PublishBuildArtifacts@1
displayName : 'Publish Artifact Model'
2019-03-13 16:09:08 -04:00
condition : and(eq(variables['BuildConfiguration'], 'Release'), succeeded())
2019-02-18 20:17:57 -05:00
inputs :
2019-02-18 20:50:25 -05:00
PathtoPublish : '$(build.artifactstagingdirectory)/Jellyfin.Server/MediaBrowser.Model.dll'
2019-02-18 20:17:57 -05:00
artifactName : 'Jellyfin.Model'
- task : PublishBuildArtifacts@1
displayName : 'Publish Artifact Common'
2019-03-13 16:09:08 -04:00
condition : and(eq(variables['BuildConfiguration'], 'Release'), succeeded())
2019-02-18 20:17:57 -05:00
inputs :
2019-02-18 20:50:25 -05:00
PathtoPublish : '$(build.artifactstagingdirectory)/Jellyfin.Server/MediaBrowser.Common.dll'
2019-02-18 20:17:57 -05:00
artifactName : 'Jellyfin.Common'
- job : dotnet_compat
displayName : Compatibility Check
pool :
vmImage : ubuntu-16.04
dependsOn : main_build
2019-04-08 18:43:25 -04:00
condition : false #and(succeeded(), variables['System.PullRequest.PullRequestNumber']) # Only execute if the pullrequest numer is defined. (So not for normal CI builds)
2019-02-18 20:17:57 -05:00
strategy :
matrix :
Naming :
NugetPackageName : Jellyfin.Naming
2019-02-18 20:28:16 -05:00
AssemblyFileName : Emby.Naming.dll
2019-02-18 20:17:57 -05:00
Controller :
NugetPackageName : Jellyfin.Controller
2019-02-18 20:28:16 -05:00
AssemblyFileName : MediaBrowser.Controller.dll
2019-02-18 20:17:57 -05:00
Model :
NugetPackageName : Jellyfin.Model
2019-02-18 20:28:16 -05:00
AssemblyFileName : MediaBrowser.Model.dll
2019-02-18 20:17:57 -05:00
Common :
NugetPackageName : Jellyfin.Common
2019-02-18 20:28:16 -05:00
AssemblyFileName : MediaBrowser.Common.dll
2019-02-18 21:16:17 -05:00
maxParallel : 2
2019-02-18 20:17:57 -05:00
steps :
- checkout : none
2019-03-13 16:09:08 -04:00
- task : DownloadBuildArtifacts@0
displayName : Download the Reference Assembly Build Artifact
2019-02-18 20:17:57 -05:00
inputs :
2019-03-13 16:09:08 -04:00
buildType: 'specific' # Options : current, specific
project : $(System.TeamProjectId) # Required when buildType == Specific
pipeline : $(System.DefinitionId) # Required when buildType == Specific, not sure if this will take a name too
#specificBuildWithTriggering: false # Optional
buildVersionToDownload: 'latestFromBranch' # Required when buildType == Specific# Options : latest, latestFromBranch, specific
allowPartiallySucceededBuilds : false # Optional
branchName : '$(System.PullRequest.TargetBranch)' # Required when buildType == Specific && BuildVersionToDownload == LatestFromBranch
#buildId: # Required when buildType == Specific && BuildVersionToDownload == Specific
#tags: # Optional
downloadType: 'single' # Options : single, specific
artifactName : '$(NugetPackageName)' # Required when downloadType == Single
#itemPattern: '**' # Optional
downloadPath : '$(System.ArtifactsDirectory)/current-artifacts'
#parallelizationLimit: '8' # Optional
2019-02-18 20:17:57 -05:00
- task : CopyFiles@2
2019-02-18 20:59:56 -05:00
displayName : Copy Nuget Assembly to current-release folder
2019-02-18 20:17:57 -05:00
inputs :
2019-03-13 16:09:08 -04:00
sourceFolder : $(System.ArtifactsDirectory)/current-artifacts # Optional
2019-02-18 20:17:57 -05:00
contents : '**/*.dll'
targetFolder : $(System.ArtifactsDirectory)/current-release
cleanTargetFolder : true # Optional
overWrite : true # Optional
flattenFolders : true # Optional
- task : DownloadBuildArtifacts@0
2019-03-13 16:09:08 -04:00
displayName : Download the New Assembly Build Artifact
2019-02-18 20:17:57 -05:00
inputs :
buildType: 'current' # Options : current, specific
allowPartiallySucceededBuilds : false # Optional
downloadType: 'single' # Options : single, specific
artifactName : '$(NugetPackageName)' # Required when downloadType == Single
2019-02-18 20:59:56 -05:00
downloadPath : '$(System.ArtifactsDirectory)/new-artifacts'
- task : CopyFiles@2
displayName : Copy Artifact Assembly to new-release folder
inputs :
sourceFolder : $(System.ArtifactsDirectory)/new-artifacts # Optional
contents : '**/*.dll'
targetFolder : $(System.ArtifactsDirectory)/new-release
cleanTargetFolder : true # Optional
overWrite : true # Optional
flattenFolders : true # Optional
2019-02-18 20:17:57 -05:00
2019-03-07 16:00:28 -05:00
- task : DownloadGitHubRelease@0
2019-02-18 20:17:57 -05:00
displayName : Download ABI compatibility check tool from GitHub
inputs :
2019-02-26 18:53:16 -05:00
connection : Jellyfin GitHub
2019-02-18 20:17:57 -05:00
userRepository : EraYaN/dotnet-compatibility
defaultVersionType: 'latest' # Options : latest, specificVersion, specificTag
#version: # Required when defaultVersionType != Latest
itemPattern : '**-ci.zip' # Optional
downloadPath : '$(System.ArtifactsDirectory)'
- task : ExtractFiles@1
displayName : Extract ABI compatibility check tool
inputs :
2019-02-18 21:07:44 -05:00
archiveFilePatterns : '$(System.ArtifactsDirectory)/*-ci.zip'
2019-02-18 20:28:16 -05:00
destinationFolder : $(System.ArtifactsDirectory)/tools
2019-02-18 20:17:57 -05:00
cleanDestinationFolder : true
2019-02-18 20:28:16 -05:00
- task : CmdLine@2
displayName : Execute ABI compatibility check tool
inputs :
2019-02-18 21:12:53 -05:00
script : 'dotnet tools/CompatibilityCheckerCoreCLI.dll current-release/$(AssemblyFileName) new-release/$(AssemblyFileName)'
2019-02-18 20:28:16 -05:00
workingDirectory : $(System.ArtifactsDirectory) # Optional
#failOnStderr: false # Optional
2019-02-18 20:17:57 -05:00