2019-02-19 01:17:57 +00:00
|
|
|
name: $(Date:yyyyMMdd).$(Rev:.r)
|
2019-02-18 22:47:31 +00:00
|
|
|
|
|
|
|
variables:
|
2019-02-19 01:17:57 +00:00
|
|
|
- name: TestProjects
|
|
|
|
value: 'Jellyfin.Server.Tests/Jellyfin.Server.Tests.csproj'
|
|
|
|
- name: RestoreBuildProjects
|
|
|
|
value: 'Jellyfin.Server/Jellyfin.Server.csproj'
|
2019-02-18 22:47:31 +00:00
|
|
|
|
2019-02-18 21:36:24 +00:00
|
|
|
pr:
|
2019-02-18 22:42:24 +00:00
|
|
|
autoCancel: true
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
batch: true
|
2019-02-18 21:36:24 +00:00
|
|
|
branches:
|
|
|
|
include:
|
2019-02-19 01:17:57 +00:00
|
|
|
- master
|
2019-02-18 21:26:40 +00:00
|
|
|
|
2019-02-18 22:24:39 +00:00
|
|
|
jobs:
|
2019-02-19 01:17:57 +00:00
|
|
|
- job: main_build
|
|
|
|
displayName: Main Build
|
|
|
|
pool:
|
|
|
|
vmImage: ubuntu-16.04
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
release:
|
|
|
|
BuildConfiguration: Release
|
|
|
|
debug:
|
2019-02-19 01:50:25 +00:00
|
|
|
BuildConfiguration: Debug
|
2019-02-18 22:47:31 +00:00
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
clean: false
|
|
|
|
submodules: true
|
|
|
|
persistCredentials: false
|
2019-02-18 22:42:24 +00:00
|
|
|
|
2019-02-18 22:47:31 +00:00
|
|
|
- task: DotNetCoreCLI@2
|
|
|
|
displayName: Restore
|
|
|
|
inputs:
|
|
|
|
command: restore
|
|
|
|
projects: '$(RestoreBuildProjects)'
|
2019-02-18 22:42:24 +00:00
|
|
|
|
2019-02-18 22:47:31 +00:00
|
|
|
- task: DotNetCoreCLI@2
|
|
|
|
displayName: Build
|
|
|
|
inputs:
|
|
|
|
projects: '$(RestoreBuildProjects)'
|
|
|
|
arguments: '--configuration $(BuildConfiguration)'
|
2019-02-18 22:42:24 +00:00
|
|
|
|
2019-02-18 22:47:31 +00:00
|
|
|
- task: DotNetCoreCLI@2
|
|
|
|
displayName: Test
|
|
|
|
inputs:
|
|
|
|
command: test
|
|
|
|
projects: '$(RestoreBuildProjects)'
|
|
|
|
arguments: '--configuration $(BuildConfiguration)'
|
|
|
|
enabled: false
|
2019-02-18 21:26:40 +00:00
|
|
|
|
2019-02-18 22:47:31 +00:00
|
|
|
- task: DotNetCoreCLI@2
|
|
|
|
displayName: Publish
|
|
|
|
inputs:
|
|
|
|
command: publish
|
|
|
|
publishWebProjects: false
|
|
|
|
projects: '$(RestoreBuildProjects)'
|
|
|
|
arguments: '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)'
|
2019-02-19 01:55:10 +00:00
|
|
|
zipAfterPublish: false
|
2019-02-18 21:26:40 +00:00
|
|
|
|
2019-02-19 01:55:10 +00:00
|
|
|
# - task: PublishBuildArtifacts@1
|
|
|
|
# displayName: 'Publish Artifact'
|
|
|
|
# inputs:
|
|
|
|
# PathtoPublish: '$(build.artifactstagingdirectory)'
|
|
|
|
# artifactName: 'jellyfin-build-$(BuildConfiguration)'
|
|
|
|
# zipAfterPublish: true
|
2019-02-19 01:17:57 +00:00
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: 'Publish Artifact Naming'
|
|
|
|
condition: eq(variables['BuildConfiguration'], 'Release')
|
|
|
|
inputs:
|
2019-02-19 01:50:25 +00:00
|
|
|
PathtoPublish: '$(build.artifactstagingdirectory)/Jellyfin.Server/MediaBrowser.Naming.dll'
|
2019-02-19 01:17:57 +00:00
|
|
|
artifactName: 'Jellyfin.Naming'
|
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: 'Publish Artifact Controller'
|
|
|
|
condition: eq(variables['BuildConfiguration'], 'Release')
|
|
|
|
inputs:
|
2019-02-19 01:50:25 +00:00
|
|
|
PathtoPublish: '$(build.artifactstagingdirectory)/Jellyfin.Server/MediaBrowser.Controller.dll'
|
2019-02-19 01:17:57 +00:00
|
|
|
artifactName: 'Jellyfin.Controller'
|
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: 'Publish Artifact Model'
|
|
|
|
condition: eq(variables['BuildConfiguration'], 'Release')
|
|
|
|
inputs:
|
2019-02-19 01:50:25 +00:00
|
|
|
PathtoPublish: '$(build.artifactstagingdirectory)/Jellyfin.Server/MediaBrowser.Model.dll'
|
2019-02-19 01:17:57 +00:00
|
|
|
artifactName: 'Jellyfin.Model'
|
|
|
|
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: 'Publish Artifact Common'
|
|
|
|
condition: eq(variables['BuildConfiguration'], 'Release')
|
|
|
|
inputs:
|
2019-02-19 01:50:25 +00:00
|
|
|
PathtoPublish: '$(build.artifactstagingdirectory)/Jellyfin.Server/MediaBrowser.Common.dll'
|
2019-02-19 01:17:57 +00:00
|
|
|
artifactName: 'Jellyfin.Common'
|
|
|
|
|
|
|
|
- job: dotnet_compat
|
|
|
|
displayName: Compatibility Check
|
|
|
|
pool:
|
|
|
|
vmImage: ubuntu-16.04
|
|
|
|
dependsOn: main_build
|
2019-02-19 01:32:36 +00:00
|
|
|
condition: succeeded()
|
2019-02-19 01:17:57 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
Naming:
|
|
|
|
NugetPackageName: Jellyfin.Naming
|
2019-02-19 01:28:16 +00:00
|
|
|
AssemblyFileName: Emby.Naming.dll
|
2019-02-19 01:17:57 +00:00
|
|
|
Controller:
|
|
|
|
NugetPackageName: Jellyfin.Controller
|
2019-02-19 01:28:16 +00:00
|
|
|
AssemblyFileName: MediaBrowser.Controller.dll
|
2019-02-19 01:17:57 +00:00
|
|
|
Model:
|
|
|
|
NugetPackageName: Jellyfin.Model
|
2019-02-19 01:28:16 +00:00
|
|
|
AssemblyFileName: MediaBrowser.Model.dll
|
2019-02-19 01:17:57 +00:00
|
|
|
Common:
|
|
|
|
NugetPackageName: Jellyfin.Common
|
2019-02-19 01:28:16 +00:00
|
|
|
AssemblyFileName: MediaBrowser.Common.dll
|
2019-02-19 01:17:57 +00:00
|
|
|
steps:
|
|
|
|
- checkout: none
|
|
|
|
|
2019-02-19 01:42:42 +00:00
|
|
|
- task: NuGetCommand@2
|
2019-02-19 01:17:57 +00:00
|
|
|
displayName: 'Download $(NugetPackageName)'
|
|
|
|
inputs:
|
|
|
|
command: custom
|
|
|
|
arguments: 'install $(NugetPackageName) -OutputDirectory $(System.ArtifactsDirectory)/packages -ExcludeVersion -DirectDownload'
|
|
|
|
|
|
|
|
- task: CopyFiles@2
|
|
|
|
displayName: Copy Nuget Assembly to release folder
|
|
|
|
inputs:
|
|
|
|
sourceFolder: $(System.ArtifactsDirectory)/packages/$(NugetPackageName) # Optional
|
|
|
|
contents: '**/*.dll'
|
|
|
|
targetFolder: $(System.ArtifactsDirectory)/current-release
|
|
|
|
cleanTargetFolder: true # Optional
|
|
|
|
overWrite: true # Optional
|
|
|
|
flattenFolders: true # Optional
|
|
|
|
|
|
|
|
- task: DownloadBuildArtifacts@0
|
|
|
|
displayName: Download the Assembly Build Artifact
|
|
|
|
inputs:
|
|
|
|
buildType: 'current' # Options: current, specific
|
|
|
|
allowPartiallySucceededBuilds: false # Optional
|
|
|
|
downloadType: 'single' # Options: single, specific
|
|
|
|
artifactName: '$(NugetPackageName)' # Required when downloadType == Single
|
|
|
|
downloadPath: '$(System.ArtifactsDirectory)/new-release'
|
|
|
|
|
|
|
|
- task: DownloadGitHubReleases@0
|
|
|
|
displayName: Download ABI compatibility check tool from GitHub
|
|
|
|
inputs:
|
|
|
|
connection: GitHub (EraYaN)
|
|
|
|
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:
|
|
|
|
archiveFilePatterns: '*-ci.zip'
|
2019-02-19 01:28:16 +00:00
|
|
|
destinationFolder: $(System.ArtifactsDirectory)/tools
|
2019-02-19 01:17:57 +00:00
|
|
|
cleanDestinationFolder: true
|
|
|
|
|
2019-02-19 01:28:16 +00:00
|
|
|
- task: CmdLine@2
|
|
|
|
displayName: Execute ABI compatibility check tool
|
|
|
|
inputs:
|
|
|
|
script: 'tools/CompatibilityCheckerCoreCLI current-release/$(AssemblyFileName) new-release/$(AssemblyFileName)'
|
|
|
|
workingDirectory: $(System.ArtifactsDirectory) # Optional
|
|
|
|
#failOnStderr: false # Optional
|
|
|
|
|
2019-02-19 01:17:57 +00:00
|
|
|
|