mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 18:57:39 -07:00
New: Multi target net framework 4.6.2 and net core 3.0
This commit is contained in:
parent
d881b26261
commit
8fe924fdcd
99 changed files with 898 additions and 852 deletions
|
@ -11,11 +11,6 @@ variables:
|
|||
minorVersion: $[counter('minorVersion', 1076)]
|
||||
lidarrVersion: '$(majorVersion).$(minorVersion)'
|
||||
buildName: '$(Build.SourceBranchName).$(lidarrVersion)'
|
||||
windowsInstaller: 'Lidarr.$(buildName).windows-installer.exe'
|
||||
windowsZip: 'Lidarr.$(buildName).windows.zip'
|
||||
macOsApp: 'Lidarr.$(buildName).osx-app.zip'
|
||||
macOsTar: 'Lidarr.$(buildName).osx.tar.gz'
|
||||
linuxTar: 'Lidarr.$(buildName).linux.tar.gz'
|
||||
sentryOrg: 'lidarr'
|
||||
dotnetVersion: '3.0.100'
|
||||
|
||||
|
@ -44,7 +39,7 @@ stages:
|
|||
imageName: 'macos-10.14'
|
||||
Windows:
|
||||
osName: 'Windows'
|
||||
imageName: 'vs2017-win2016'
|
||||
imageName: 'windows-2019'
|
||||
|
||||
pool:
|
||||
vmImage: $(imageName)
|
||||
|
@ -59,6 +54,7 @@ stages:
|
|||
displayName: 'Install .net core 3.0'
|
||||
inputs:
|
||||
version: $(dotnetVersion)
|
||||
condition: ne(variables['osName'], 'Windows')
|
||||
- bash: ./build.sh --backend
|
||||
displayName: Build Lidarr Backend
|
||||
- bash: |
|
||||
|
@ -66,22 +62,25 @@ stages:
|
|||
find ${OUTPUTFOLDER} -depth -empty -type d -exec rm -r "{}" \;
|
||||
find ${TESTSFOLDER} -type f ! -path "*/publish/*" -exec rm -rf {} \;
|
||||
find ${TESTSFOLDER} -depth -empty -type d -exec rm -r "{}" \;
|
||||
ls -lR
|
||||
displayName: Clean up intermediate output
|
||||
- publish: $(outputFolder)
|
||||
artifact: '$(osName)Backend'
|
||||
displayName: Publish Backend
|
||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||
- publish: '$(testsFolder)/net462/win-x64/publish'
|
||||
artifact: WindowsTests
|
||||
- publish: '$(testsFolder)/netcoreapp3.0/win-x64/publish'
|
||||
artifact: WindowsCoreTests
|
||||
displayName: Publish Windows Test Package
|
||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||
- publish: '$(testsFolder)/net462/linux-x64/publish'
|
||||
artifact: LinuxTests
|
||||
displayName: Publish Linux Test Package
|
||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||
- publish: '$(testsFolder)/net462/osx-x64/publish'
|
||||
artifact: MacTests
|
||||
- publish: '$(testsFolder)/netcoreapp3.0/linux-x64/publish'
|
||||
artifact: LinuxCoreTests
|
||||
displayName: Publish Linux Test Package
|
||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||
- publish: '$(testsFolder)/netcoreapp3.0/osx-x64/publish'
|
||||
artifact: MacCoreTests
|
||||
displayName: Publish MacOS Test Package
|
||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||
|
||||
|
@ -101,7 +100,7 @@ stages:
|
|||
imageName: 'macos-10.14'
|
||||
Windows:
|
||||
osName: 'Windows'
|
||||
imageName: 'vs2017-win2016'
|
||||
imageName: 'windows-2019'
|
||||
pool:
|
||||
vmImage: $(imageName)
|
||||
steps:
|
||||
|
@ -129,7 +128,7 @@ stages:
|
|||
- job: Windows_Installer
|
||||
displayName: Create Installer
|
||||
pool:
|
||||
vmImage: 'vs2017-win2016'
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- checkout: self
|
||||
fetchDepth: 1
|
||||
|
@ -148,9 +147,9 @@ stages:
|
|||
- bash: ./build.sh --packages
|
||||
displayName: Create Packages
|
||||
- bash: |
|
||||
./setup/inno/ISCC.exe "./setup/lidarr.iss"
|
||||
cp ./setup/output/Lidarr.*windows.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/${WINDOWSINSTALLER}
|
||||
displayName: Create Windows installer
|
||||
setup/inno/ISCC.exe setup/lidarr.iss //DFramework=netcoreapp3.0
|
||||
cp setup/output/Lidarr.*windows.netcoreapp3.0.exe ${BUILD_ARTIFACTSTAGINGDIRECTORY}/Lidarr.${BUILDNAME}.windows-core-x64-installer.exe
|
||||
displayName: Create .NET Core Windows installer
|
||||
- publish: $(Build.ArtifactStagingDirectory)
|
||||
artifact: 'WindowsInstaller'
|
||||
displayName: Publish Installer
|
||||
|
@ -184,37 +183,62 @@ stages:
|
|||
- bash: |
|
||||
find . -name "fpcalc" -exec chmod a+x {} \;
|
||||
find . -name "Lidarr" -exec chmod a+x {} \;
|
||||
displayName: Set Mac executable bits
|
||||
find . -name "Lidarr.Update" -exec chmod a+x {} \;
|
||||
displayName: Set executable bits
|
||||
- task: ArchiveFiles@2
|
||||
displayName: Create Windows zip
|
||||
displayName: Create Windows Core zip
|
||||
inputs:
|
||||
archiveFile: '$(Build.ArtifactStagingDirectory)/$(windowsZip)'
|
||||
archiveFile: '$(Build.ArtifactStagingDirectory)/Lidarr.$(buildName).windows-core-x64.zip'
|
||||
archiveType: 'zip'
|
||||
includeRootFolder: false
|
||||
rootFolderOrFile: $(artifactsFolder)/windows/net462
|
||||
rootFolderOrFile: $(artifactsFolder)/windows/netcoreapp3.0
|
||||
- task: ArchiveFiles@2
|
||||
displayName: Create MacOS app
|
||||
displayName: Create MacOS Core app
|
||||
inputs:
|
||||
archiveFile: '$(Build.ArtifactStagingDirectory)/$(macOsApp)'
|
||||
archiveFile: '$(Build.ArtifactStagingDirectory)/Lidarr.$(buildName).osx-app-core-x64.zip'
|
||||
archiveType: 'zip'
|
||||
includeRootFolder: false
|
||||
rootFolderOrFile: $(artifactsFolder)/macos-app/net462
|
||||
rootFolderOrFile: $(artifactsFolder)/macos-app/netcoreapp3.0
|
||||
- task: ArchiveFiles@2
|
||||
displayName: Create MacOS tar
|
||||
displayName: Create MacOS Core tar
|
||||
inputs:
|
||||
archiveFile: '$(Build.ArtifactStagingDirectory)/$(macOsTar)'
|
||||
archiveFile: '$(Build.ArtifactStagingDirectory)/Lidarr.$(buildName).osx-core-x64.tar.gz'
|
||||
archiveType: 'tar'
|
||||
tarCompression: 'gz'
|
||||
includeRootFolder: false
|
||||
rootFolderOrFile: $(artifactsFolder)/macos/net462
|
||||
rootFolderOrFile: $(artifactsFolder)/macos/netcoreapp3.0
|
||||
- task: ArchiveFiles@2
|
||||
displayName: Create Linux tar
|
||||
displayName: Create Linux Mono tar
|
||||
inputs:
|
||||
archiveFile: '$(Build.ArtifactStagingDirectory)/$(linuxTar)'
|
||||
archiveFile: '$(Build.ArtifactStagingDirectory)/Lidarr.$(buildName).linux.tar.gz'
|
||||
archiveType: 'tar'
|
||||
tarCompression: 'gz'
|
||||
includeRootFolder: false
|
||||
rootFolderOrFile: $(artifactsFolder)/linux/net462
|
||||
rootFolderOrFile: $(artifactsFolder)/linux-x64/net462
|
||||
- task: ArchiveFiles@2
|
||||
displayName: Create Linux Core tar
|
||||
inputs:
|
||||
archiveFile: '$(Build.ArtifactStagingDirectory)/Lidarr.$(buildName).linux-core-x64.tar.gz'
|
||||
archiveType: 'tar'
|
||||
tarCompression: 'gz'
|
||||
includeRootFolder: false
|
||||
rootFolderOrFile: $(artifactsFolder)/linux-x64/netcoreapp3.0
|
||||
- task: ArchiveFiles@2
|
||||
displayName: Create ARM32 Core tar
|
||||
inputs:
|
||||
archiveFile: '$(Build.ArtifactStagingDirectory)/Lidarr.$(buildName).linux-core-arm.tar.gz'
|
||||
archiveType: 'tar'
|
||||
tarCompression: 'gz'
|
||||
includeRootFolder: false
|
||||
rootFolderOrFile: $(artifactsFolder)/linux-arm/netcoreapp3.0
|
||||
- task: ArchiveFiles@2
|
||||
displayName: Create Linux Core tar
|
||||
inputs:
|
||||
archiveFile: '$(Build.ArtifactStagingDirectory)/Lidarr.$(buildName).linux-core-arm64.tar.gz'
|
||||
archiveType: 'tar'
|
||||
tarCompression: 'gz'
|
||||
includeRootFolder: false
|
||||
rootFolderOrFile: $(artifactsFolder)/linux-arm64/netcoreapp3.0
|
||||
- publish: $(Build.ArtifactStagingDirectory)
|
||||
artifact: 'Packages'
|
||||
displayName: Publish Packages
|
||||
|
@ -250,9 +274,19 @@ stages:
|
|||
displayName: Unit Native
|
||||
strategy:
|
||||
matrix:
|
||||
Windows:
|
||||
MacCore:
|
||||
osName: 'Mac'
|
||||
testName: 'MacCore'
|
||||
imageName: 'macos-10.13'
|
||||
WindowsCore:
|
||||
osName: 'Windows'
|
||||
imageName: 'vs2017-win2016'
|
||||
testName: 'WindowsCore'
|
||||
imageName: 'windows-2019'
|
||||
LinuxCore:
|
||||
osName: 'Linux'
|
||||
testName: 'LinuxCore'
|
||||
imageName: 'ubuntu-16.04'
|
||||
pattern: 'Lidarr.**.linux-core-x64.tar.gz'
|
||||
|
||||
pool:
|
||||
vmImage: $(imageName)
|
||||
|
@ -263,15 +297,21 @@ stages:
|
|||
displayName: 'Install .net core 3.0'
|
||||
inputs:
|
||||
version: $(dotnetVersion)
|
||||
condition: ne(variables['osName'], 'Windows')
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: Download Test Artifact
|
||||
inputs:
|
||||
buildType: 'current'
|
||||
artifactName: '$(osName)Tests'
|
||||
artifactName: '$(testName)Tests'
|
||||
targetPath: $(testsFolder)
|
||||
- powershell: Set-Service SCardSvr -StartupType Manual
|
||||
displayName: Enable Windows Test Service
|
||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||
- bash: |
|
||||
wget https://github.com/acoustid/chromaprint/releases/download/v1.4.3/chromaprint-fpcalc-1.4.3-linux-x86_64.tar.gz
|
||||
sudo tar xf chromaprint-fpcalc-1.4.3-linux-x86_64.tar.gz --strip-components=1 --directory /usr/bin
|
||||
displayName: Install fpcalc
|
||||
condition: and(succeeded(), eq(variables['osName'], 'Linux'))
|
||||
- bash: |
|
||||
SYMLINK=5_18_1
|
||||
MONOPREFIX=/Library/Frameworks/Mono.framework/Versions/$SYMLINK
|
||||
|
@ -296,7 +336,7 @@ stages:
|
|||
inputs:
|
||||
testResultsFormat: 'NUnit'
|
||||
testResultsFiles: '**/TestResult.xml'
|
||||
testRunTitle: '$(osName) Unit Tests'
|
||||
testRunTitle: '$(testName) Unit Tests'
|
||||
failTaskOnFailedTests: true
|
||||
|
||||
- job: Unit_Docker
|
||||
|
@ -314,7 +354,10 @@ stages:
|
|||
containerImage: servarr/testimages:mono-6.10
|
||||
mono604:
|
||||
testName: 'Mono 6.4'
|
||||
containerImage: servarr/testimages:mono-6.12
|
||||
containerImage: lidarr/testimages:mono-6.4
|
||||
mono606:
|
||||
testName: 'Mono 6.6'
|
||||
containerImage: lidarr/testimages:mono-6.6
|
||||
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
|
@ -326,12 +369,17 @@ stages:
|
|||
steps:
|
||||
- bash: mono --version
|
||||
displayName: Check Mono version
|
||||
- task: UseDotNet@2
|
||||
displayName: 'Install .net core 3.0'
|
||||
inputs:
|
||||
version: $(dotnetVersion)
|
||||
condition: ne(variables['osName'], 'Windows')
|
||||
- checkout: none
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: Download Test Artifact
|
||||
inputs:
|
||||
buildType: 'current'
|
||||
artifactName: WindowsTests
|
||||
artifactName: LinuxTests
|
||||
targetPath: $(testsFolder)
|
||||
- task: Bash@3
|
||||
displayName: Run Tests
|
||||
|
@ -356,10 +404,21 @@ stages:
|
|||
displayName: Integration Native
|
||||
strategy:
|
||||
matrix:
|
||||
Windows:
|
||||
MacCore:
|
||||
osName: 'Mac'
|
||||
testName: 'MacCore'
|
||||
imageName: 'macos-10.13'
|
||||
pattern: 'Lidarr.**.osx-core-x64.tar.gz'
|
||||
WindowsCore:
|
||||
osName: 'Windows'
|
||||
imageName: 'vs2017-win2016'
|
||||
pattern: 'Lidarr.**.windows.zip'
|
||||
testName: 'WindowsCore'
|
||||
imageName: 'windows-2019'
|
||||
pattern: 'Lidarr.**.windows-core-x64.zip'
|
||||
LinuxCore:
|
||||
osName: 'Linux'
|
||||
testName: 'LinuxCore'
|
||||
imageName: 'ubuntu-16.04'
|
||||
pattern: 'Lidarr.**.linux-core-x64.tar.gz'
|
||||
|
||||
pool:
|
||||
vmImage: $(imageName)
|
||||
|
@ -377,12 +436,13 @@ stages:
|
|||
displayName: 'Install .net core 3.0'
|
||||
inputs:
|
||||
version: $(dotnetVersion)
|
||||
condition: ne(variables['osName'], 'Windows')
|
||||
- checkout: none
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: Download Test Artifact
|
||||
inputs:
|
||||
buildType: 'current'
|
||||
artifactName: '$(osName)Tests'
|
||||
artifactName: '$(testName)Tests'
|
||||
targetPath: $(testsFolder)
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: Download Build Artifact
|
||||
|
@ -410,7 +470,7 @@ stages:
|
|||
inputs:
|
||||
testResultsFormat: 'NUnit'
|
||||
testResultsFiles: '**/TestResult.xml'
|
||||
testRunTitle: '$(osName) Integration Tests'
|
||||
testRunTitle: '$(testName) Integration Tests'
|
||||
failTaskOnFailedTests: true
|
||||
displayName: Publish Test Results
|
||||
|
||||
|
@ -429,7 +489,10 @@ stages:
|
|||
containerImage: servarr/testimages:mono-6.10
|
||||
mono604:
|
||||
testName: 'Mono 6.4'
|
||||
containerImage: servarr/testimages:mono-6.12
|
||||
containerImage: lidarr/testimages:mono-6.4
|
||||
mono606:
|
||||
testName: 'Mono 6.6'
|
||||
containerImage: lidarr/testimages:mono-6.6
|
||||
|
||||
variables:
|
||||
pattern: 'Lidarr.**.linux.tar.gz'
|
||||
|
@ -444,12 +507,17 @@ stages:
|
|||
steps:
|
||||
- bash: mono --version
|
||||
displayName: Check Mono version
|
||||
- task: UseDotNet@2
|
||||
displayName: 'Install .net core 3.0'
|
||||
inputs:
|
||||
version: $(dotnetVersion)
|
||||
condition: ne(variables['osName'], 'Windows')
|
||||
- checkout: none
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: Download Test Artifact
|
||||
inputs:
|
||||
buildType: 'current'
|
||||
artifactName: WindowsTests
|
||||
artifactName: LinuxTests
|
||||
targetPath: $(testsFolder)
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: Download Build Artifact
|
||||
|
@ -466,7 +534,6 @@ stages:
|
|||
- bash: |
|
||||
mkdir -p ./bin/
|
||||
cp -r -v ${BUILD_ARTIFACTSTAGINGDIRECTORY}/bin/Lidarr/. ./bin/
|
||||
ls -lR
|
||||
displayName: Move Package Contents
|
||||
- task: Bash@3
|
||||
displayName: Run Integration Tests
|
||||
|
@ -493,17 +560,17 @@ stages:
|
|||
Linux:
|
||||
osName: 'Linux'
|
||||
imageName: 'ubuntu-16.04'
|
||||
pattern: 'Lidarr.**.linux.tar.gz'
|
||||
pattern: 'Lidarr.**.linux-core-x64.tar.gz'
|
||||
failBuild: true
|
||||
Mac:
|
||||
osName: 'Mac'
|
||||
imageName: 'macos-10.14' # Fails due to firefox not being installed on image
|
||||
pattern: 'Lidarr.**.osx.tar.gz'
|
||||
imageName: 'macos-10.13' # Fails due to firefox not being installed on image
|
||||
pattern: 'Lidarr.**.osx-core-x64.tar.gz'
|
||||
failBuild: false
|
||||
Windows:
|
||||
osName: 'Windows'
|
||||
imageName: 'vs2017-win2016'
|
||||
pattern: 'Lidarr.**.windows.zip'
|
||||
imageName: 'windows-2019'
|
||||
pattern: 'Lidarr.**.windows-core-x64.zip'
|
||||
failBuild: true
|
||||
|
||||
pool:
|
||||
|
@ -514,12 +581,13 @@ stages:
|
|||
displayName: 'Install .net core 3.0'
|
||||
inputs:
|
||||
version: $(dotnetVersion)
|
||||
condition: ne(variables['osName'], 'Windows')
|
||||
- checkout: none
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: Download Test Artifact
|
||||
inputs:
|
||||
buildType: 'current'
|
||||
artifactName: '$(osName)Tests'
|
||||
artifactName: '$(osName)CoreTests'
|
||||
targetPath: $(testsFolder)
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: Download Build Artifact
|
||||
|
@ -551,7 +619,6 @@ stages:
|
|||
mv geckodriver _tests
|
||||
displayName: Install Gecko Driver
|
||||
condition: and(succeeded(), ne(variables['osName'], 'Windows'))
|
||||
- bash: ls -lR
|
||||
- task: Bash@3
|
||||
displayName: Run Automation Tests
|
||||
inputs:
|
||||
|
@ -581,7 +648,7 @@ stages:
|
|||
imageName: 'ubuntu-16.04'
|
||||
Windows:
|
||||
osName: 'Windows'
|
||||
imageName: 'vs2017-win2016'
|
||||
imageName: 'windows-2019'
|
||||
pool:
|
||||
vmImage: $(imageName)
|
||||
steps:
|
||||
|
@ -600,7 +667,7 @@ stages:
|
|||
- job: Analyze_Frontend
|
||||
displayName: Frontend
|
||||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
vmImage: windows-2019
|
||||
steps:
|
||||
- checkout: self # Need history for Sonar analysis
|
||||
- task: SonarCloudPrepare@1
|
||||
|
@ -620,10 +687,14 @@ stages:
|
|||
- job: Analyze_Backend
|
||||
displayName: Backend
|
||||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
vmImage: windows-2019
|
||||
variables:
|
||||
disable.coverage.autogenerate: 'true'
|
||||
steps:
|
||||
- checkout: self # Need history for Sonar analysis
|
||||
submodules: true
|
||||
- powershell: Set-Service SCardSvr -StartupType Manual
|
||||
displayName: Enable Windows Test Service
|
||||
- task: SonarCloudPrepare@1
|
||||
inputs:
|
||||
SonarCloud: 'SonarCloud'
|
||||
|
@ -635,22 +706,23 @@ stages:
|
|||
extraProperties: |
|
||||
sonar.exclusions=**/obj/**,**/*.dll,**/NzbDrone.Core.Test/Files/**/*,./frontend/**,**/ExternalModules/**,./src/Libraries/**
|
||||
sonar.coverage.exclusions=**/Lidarr.Api.V1/**/*,**/MonoTorrent/**/*,**/Marr.Data/**/*
|
||||
sonar.cs.opencover.reportsPaths=$(Build.SourcesDirectory)/_tests/CoverageResults/coverage.opencover.xml
|
||||
sonar.cs.opencover.reportsPaths=$(Build.SourcesDirectory)/CoverageResults/**/coverage.opencover.xml
|
||||
sonar.cs.nunit.reportsPaths=$(Build.SourcesDirectory)/TestResult.xml
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: Build backend
|
||||
inputs:
|
||||
command: 'build'
|
||||
projects: 'src/Lidarr.Windows.sln'
|
||||
- task: Bash@3
|
||||
- bash: |
|
||||
./build.sh --backend -f netcoreapp3.0 -r win-x64
|
||||
TEST_DIR=_tests/netcoreapp3.0/win-x64/publish/ ./test.sh Windows Unit Coverage
|
||||
displayName: Coverage Unit Tests
|
||||
- task: SonarCloudAnalyze@1
|
||||
displayName: Publish SonarCloud Results
|
||||
- task: reportgenerator@4
|
||||
displayName: Generate Coverage Report
|
||||
inputs:
|
||||
targetType: 'filePath'
|
||||
filePath: ./test.sh
|
||||
arguments: Windows Unit Coverage
|
||||
reports: '$(Build.SourcesDirectory)/CoverageResults/**/coverage.opencover.xml'
|
||||
targetdir: '$(Build.SourcesDirectory)/CoverageResults/combined'
|
||||
reporttypes: 'HtmlInline_AzurePipelines;Cobertura;Badges'
|
||||
- task: PublishCodeCoverageResults@1
|
||||
displayName: Publish Coverage Results
|
||||
displayName: Publish Coverage Report
|
||||
inputs:
|
||||
codeCoverageTool: 'cobertura'
|
||||
summaryFileLocation: './_tests/CoverageResults/coverage.cobertura.xml'
|
||||
- task: SonarCloudAnalyze@1
|
||||
summaryFileLocation: './CoverageResults/combined/Cobertura.xml'
|
||||
reportDirectory: './CoverageResults/combined/'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue