2019-02-18 19:16:17 -07:00
name : $(Date:yyyyMMdd)$(Rev:.r)
2019-02-18 15:47:31 -07:00
variables :
2019-02-18 18:17:57 -07:00
- name : TestProjects
value : 'Jellyfin.Server.Tests/Jellyfin.Server.Tests.csproj'
- name : RestoreBuildProjects
value : 'Jellyfin.Server/Jellyfin.Server.csproj'
2019-02-18 15:47:31 -07:00
2019-02-18 14:36:24 -07:00
pr :
2019-02-18 15:42:24 -07:00
autoCancel : true
trigger :
batch : true
2019-02-18 14:26:40 -07:00
2019-02-18 15:24:39 -07:00
jobs :
2019-02-18 18:17:57 -07:00
- job : main_build
displayName : Main Build
pool :
2019-07-05 02:17:48 -07:00
vmImage : ubuntu-latest
2019-02-18 18:17:57 -07:00
strategy :
matrix :
release :
BuildConfiguration : Release
debug :
2019-02-18 18:50:25 -07:00
BuildConfiguration : Debug
2019-02-18 19:16:17 -07:00
maxParallel : 2
2019-02-18 15:47:31 -07:00
steps :
- checkout : self
2019-02-26 16:53:16 -07:00
clean : true
2019-02-18 15:47:31 -07:00
submodules : true
persistCredentials : false
2019-02-18 15:42:24 -07:00
2019-02-18 15:47:31 -07:00
- task : DotNetCoreCLI@2
displayName : Publish
inputs :
command : publish
publishWebProjects : false
projects : '$(RestoreBuildProjects)'
arguments : '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)'
2019-02-18 18:55:10 -07:00
zipAfterPublish : false
2019-02-18 14:26:40 -07:00
2019-02-18 18:55:10 -07:00
# - task: PublishBuildArtifacts@1
# displayName: 'Publish Artifact'
# inputs:
# PathtoPublish: '$(build.artifactstagingdirectory)'
# artifactName: 'jellyfin-build-$(BuildConfiguration)'
# zipAfterPublish: true
2019-02-18 18:17:57 -07:00
2019-07-05 03:02:35 -07:00
- task : PublishPipelineArtifact@0
2019-02-18 18:17:57 -07:00
displayName : 'Publish Artifact Naming'
2019-03-13 13:09:08 -07:00
condition : and(eq(variables['BuildConfiguration'], 'Release'), succeeded())
2019-02-18 18:17:57 -07:00
inputs :
2019-07-05 03:02:35 -07:00
targetPath : '$(build.artifactstagingdirectory)/Jellyfin.Server/Emby.Naming.dll'
2019-02-18 18:17:57 -07:00
artifactName : 'Jellyfin.Naming'
2019-07-05 03:02:35 -07:00
- task : PublishPipelineArtifact@0
2019-02-18 18:17:57 -07:00
displayName : 'Publish Artifact Controller'
2019-03-13 13:09:08 -07:00
condition : and(eq(variables['BuildConfiguration'], 'Release'), succeeded())
2019-02-18 18:17:57 -07:00
inputs :
2019-07-05 03:02:35 -07:00
targetPath : '$(build.artifactstagingdirectory)/Jellyfin.Server/MediaBrowser.Controller.dll'
2019-02-18 18:17:57 -07:00
artifactName : 'Jellyfin.Controller'
2019-07-05 03:02:35 -07:00
- task : PublishPipelineArtifact@0
2019-02-18 18:17:57 -07:00
displayName : 'Publish Artifact Model'
2019-03-13 13:09:08 -07:00
condition : and(eq(variables['BuildConfiguration'], 'Release'), succeeded())
2019-02-18 18:17:57 -07:00
inputs :
2019-07-05 03:02:35 -07:00
targetPath : '$(build.artifactstagingdirectory)/Jellyfin.Server/MediaBrowser.Model.dll'
2019-02-18 18:17:57 -07:00
artifactName : 'Jellyfin.Model'
2019-07-05 03:02:35 -07:00
- task : PublishPipelineArtifact@0
2019-02-18 18:17:57 -07:00
displayName : 'Publish Artifact Common'
2019-03-13 13:09:08 -07:00
condition : and(eq(variables['BuildConfiguration'], 'Release'), succeeded())
2019-02-18 18:17:57 -07:00
inputs :
2019-07-05 03:02:35 -07:00
targetPath : '$(build.artifactstagingdirectory)/Jellyfin.Server/MediaBrowser.Common.dll'
2019-02-18 18:17:57 -07:00
artifactName : 'Jellyfin.Common'
2019-09-09 14:40:51 -07:00
- job : main_build_win
displayName : Main Build Windows
pool :
vmImage : windows-latest
strategy :
matrix :
release :
BuildConfiguration : Release
maxParallel : 2
steps :
- checkout : self
clean : true
submodules : true
persistCredentials : false
- task : CmdLine@2
displayName : Clone the UX repository
inputs :
script : git clone --depth=1 https://github.com/jellyfin/jellyfin-ux $(Agent.TempDirectory)\jellyfin-ux
- task : PowerShell@2
displayName : Build the NSIS Installer
inputs :
targetType: 'filePath' # Optional. Options : filePath, inline
filePath : ./deployment/windows/build-jellyfin.ps1 # Required when targetType == FilePath
arguments : -InstallFFMPEG -InstallNSSM -MakeNSIS -UXLocation $(Agent.TempDirectory)\jellyfin-ux -InstallLocation $(build.artifactstagingdirectory)
#script: '# Write your PowerShell commands here.Write-Host Hello World' # Required when targetType == Inline
errorActionPreference: 'stop' # Optional. Options : stop, continue, silentlyContinue
#failOnStderr: false # Optional
#ignoreLASTEXITCODE: false # Optional
#pwsh: false # Optional
workingDirectory : $(Build.SourcesDirectory) # Optional
- task : CopyFiles@2
displayName : Copy the NSIS Installer to the artifact directory
inputs :
sourceFolder : $(Build.SourcesDirectory)/deployment/windows/ # Optional
contents : 'jellyfin*.exe'
targetFolder : $(System.ArtifactsDirectory)/setup
cleanTargetFolder : true # Optional
overWrite : true # Optional
flattenFolders : true # Optional
- task : PublishPipelineArtifact@0
displayName : 'Publish Setup Artifact'
condition : and(eq(variables['BuildConfiguration'], 'Release'), succeeded())
inputs :
targetPath : '$(build.artifactstagingdirectory)/setup'
artifactName : 'Jellyfin Server Setup'
2019-02-18 18:17:57 -07:00
- job : dotnet_compat
displayName : Compatibility Check
pool :
2019-07-05 02:17:48 -07:00
vmImage : ubuntu-latest
2019-02-18 18:17:57 -07:00
dependsOn : main_build
2019-07-05 02:17:48 -07:00
condition : and(succeeded(), variables['System.PullRequest.PullRequestNumber']) # Only execute if the pullrequest numer is defined. (So not for normal CI builds)
2019-02-18 18:17:57 -07:00
strategy :
matrix :
Naming :
NugetPackageName : Jellyfin.Naming
2019-02-18 18:28:16 -07:00
AssemblyFileName : Emby.Naming.dll
2019-02-18 18:17:57 -07:00
Controller :
NugetPackageName : Jellyfin.Controller
2019-02-18 18:28:16 -07:00
AssemblyFileName : MediaBrowser.Controller.dll
2019-02-18 18:17:57 -07:00
Model :
NugetPackageName : Jellyfin.Model
2019-02-18 18:28:16 -07:00
AssemblyFileName : MediaBrowser.Model.dll
2019-02-18 18:17:57 -07:00
Common :
NugetPackageName : Jellyfin.Common
2019-02-18 18:28:16 -07:00
AssemblyFileName : MediaBrowser.Common.dll
2019-02-18 19:16:17 -07:00
maxParallel : 2
2019-02-18 18:17:57 -07:00
steps :
- checkout : none
2019-07-05 03:02:35 -07:00
- task : DownloadPipelineArtifact@2
2019-07-05 03:10:57 -07:00
displayName : Download the New Assembly Build Artifact
2019-02-18 18:17:57 -07:00
inputs :
2019-07-05 03:10:57 -07:00
source: 'current' # Options : current, specific
2019-07-05 03:02:35 -07:00
#preferTriggeringPipeline: false # Optional
#tags: # Optional
artifact : '$(NugetPackageName)' # Optional
#patterns: '**' # Optional
2019-07-05 03:10:57 -07:00
path : '$(System.ArtifactsDirectory)/new-artifacts'
#project: # Required when source == Specific
#pipeline: # Required when source == Specific
runVersion: 'latest' # Required when source == Specific. Options : latest, latestFromBranch, specific
#runBranch: 'refs/heads/master' # Required when source == Specific && runVersion == LatestFromBranch
2019-07-05 03:02:35 -07:00
#runId: # Required when source == Specific && runVersion == Specific
2019-02-18 18:17:57 -07:00
- task : CopyFiles@2
2019-07-05 04:03:34 -07:00
displayName : Copy New Assembly to new-release folder
2019-02-18 18:17:57 -07:00
inputs :
2019-07-05 03:10:57 -07:00
sourceFolder : $(System.ArtifactsDirectory)/new-artifacts # Optional
2019-02-18 18:17:57 -07:00
contents : '**/*.dll'
2019-07-05 03:10:57 -07:00
targetFolder : $(System.ArtifactsDirectory)/new-release
2019-02-18 18:17:57 -07:00
cleanTargetFolder : true # Optional
overWrite : true # Optional
2019-07-05 03:10:57 -07:00
flattenFolders : true # Optional
2019-02-18 18:17:57 -07:00
2019-07-05 03:02:35 -07:00
- task : DownloadPipelineArtifact@2
2019-07-05 03:10:57 -07:00
displayName : Download the Reference Assembly Build Artifact
2019-02-18 18:17:57 -07:00
inputs :
2019-07-05 03:10:57 -07:00
source: 'specific' # Options : current, specific
2019-07-05 03:02:35 -07:00
#preferTriggeringPipeline: false # Optional
#tags: # Optional
artifact : '$(NugetPackageName)' # Optional
#patterns: '**' # Optional
2019-07-05 03:10:57 -07:00
path : '$(System.ArtifactsDirectory)/current-artifacts'
project : '$(System.TeamProjectId)' # Required when source == Specific
pipeline : '$(System.DefinitionId)' # Required when source == Specific
runVersion: 'latestFromBranch' # Required when source == Specific. Options : latest, latestFromBranch, specific
runBranch : 'refs/heads/$(System.PullRequest.TargetBranch)' # Required when source == Specific && runVersion == LatestFromBranch
2019-07-05 03:02:35 -07:00
#runId: # Required when source == Specific && runVersion == Specific
2019-02-18 18:59:56 -07:00
- task : CopyFiles@2
2019-07-05 04:03:34 -07:00
displayName : Copy Reference Assembly to current-release folder
2019-02-18 18:59:56 -07:00
inputs :
2019-07-05 03:10:57 -07:00
sourceFolder : $(System.ArtifactsDirectory)/current-artifacts # Optional
2019-02-18 18:59:56 -07:00
contents : '**/*.dll'
2019-07-05 03:10:57 -07:00
targetFolder : $(System.ArtifactsDirectory)/current-release
2019-02-18 18:59:56 -07:00
cleanTargetFolder : true # Optional
overWrite : true # Optional
flattenFolders : true # Optional
2019-02-18 18:17:57 -07:00
2019-03-07 14:00:28 -07:00
- task : DownloadGitHubRelease@0
2019-02-18 18:17:57 -07:00
displayName : Download ABI compatibility check tool from GitHub
inputs :
2019-07-06 15:20:37 -07:00
connection : Jellyfin Release Download
2019-02-18 18:17:57 -07: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 19:07:44 -07:00
archiveFilePatterns : '$(System.ArtifactsDirectory)/*-ci.zip'
2019-02-18 18:28:16 -07:00
destinationFolder : $(System.ArtifactsDirectory)/tools
2019-02-18 18:17:57 -07:00
cleanDestinationFolder : true
2019-02-18 18:28:16 -07:00
- task : CmdLine@2
displayName : Execute ABI compatibility check tool
inputs :
2019-07-28 12:01:18 -07:00
script : 'dotnet tools/CompatibilityCheckerCoreCLI.dll current-release/$(AssemblyFileName) new-release/$(AssemblyFileName) --azure-pipelines'
2019-02-18 18:28:16 -07:00
workingDirectory : $(System.ArtifactsDirectory) # Optional
#failOnStderr: false # Optional
2019-02-18 18:17:57 -07:00