@ -66,16 +66,13 @@ stages:
inputs:
version : $(dotnetVersion)
- bash : |
BUNDLEDVERSIONS=${AGENT_TOOLSDIRECTORY}/dotnet/sdk/${DOTNETVERSION}/Microsoft.NETCoreSdk.BundledVersions.props
echo $BUNDLEDVERSIONS
grep osx-x64 $BUNDLEDVERSIONS
if grep -q freebsd-x64 $BUNDLEDVERSIONS; then
echo "BSD already enabled"
else
echo "Enabling BSD support"
sed -i.ORI 's/osx-x64/osx-x64;freebsd-x64/' $BUNDLEDVERSIONS
SDK_PATH="${AGENT_TOOLSDIRECTORY}/dotnet/sdk/${DOTNETVERSION}"
BUNDLEDVERSIONS="${SDK_PATH}/Microsoft.NETCoreSdk.BundledVersions.props"
if ! grep -q freebsd-x64 $BUNDLEDVERSIONS; then
sed -i.ORI 's/osx-x64/osx-x64;freebsd-x64;linux-x86/' $BUNDLEDVERSIONS
fi
displayName : E nable FreeBSD Support
displayName : Extra Platform Support
- task : Cache@2
inputs:
key : 'nuget | "$(Agent.OS)" | $(Build.SourcesDirectory)/src/Directory.Packages.props'
@ -87,29 +84,27 @@ stages:
NUGET_PACKAGES : $(nugetCacheFolder)
- powershell : Get-ChildItem _output\net6.0*,_output\*.Update\* -Recurse | Where { $_.Fullname -notlike "*\publish\*" -and $_.attributes -notlike "*directory*" } | Remove-Item
displayName : Clean up intermediate output
- task : PublishPipelineArtifact@1
inputs:
path : $(outputFolder)
- publish : $(outputFolder)
artifact : '$(osName)Backend'
artifactType : 'pipeline'
parallel : true
parallelCount : 100
displayName : Publish Backend
- publish : '$(testsFolder)/net6.0/win-x64/publish'
artifact : WindowsCoreT ests
displayName : Publish Windows Test Package
artifact : win-x64-tests
displayName : Publish win-x64 Test Package
- publish : '$(testsFolder)/net6.0/linux-x64/publish'
artifact : LinuxCoreTests
displayName : Publish Linux Test Package
artifact : linux-x64-tests
displayName : Publish linux-x64 Test Package
- publish : '$(testsFolder)/net6.0/linux-x86/publish'
artifact : linux-x86-tests
displayName : Publish linux-x86 Test Package
- publish : '$(testsFolder)/net6.0/linux-musl-x64/publish'
artifact : LinuxMuslCoreTests
displayName : Publish Linux Musl Test Package
artifact : linux-musl-x64-t ests
displayName : Publish linux-musl-x64 Test Package
- publish : '$(testsFolder)/net6.0/freebsd-x64/publish'
artifact : FreebsdCoreT ests
displayName : Publish FreeBSD Test Package
artifact : freebsd-x64-t ests
displayName : Publish freebsd-x64 Test Package
- publish : '$(testsFolder)/net6.0/osx-x64/publish'
artifact : MacCoreT ests
displayName : Publish MacOS Test Package
artifact : osx-x64-t ests
displayName : Publish osx-x64 Test Package
- stage : Build_Backend_Other
displayName : Build Backend (Other OS)
@ -141,25 +136,29 @@ stages:
inputs:
version : $(dotnetVersion)
- bash : |
BUNDLEDVERSIONS=${AGENT_TOOLSDIRECTORY}/dotnet/sdk/${DOTNETVERSION}/Microsoft.NETCoreSdk.BundledVersions.props
echo $BUNDLEDVERSIONS
grep osx-x64 $BUNDLEDVERSIONS
if grep -q freebsd-x64 $BUNDLEDVERSIONS; then
echo "BSD already enabled"
else
echo "Enabling BSD support"
sed -i.ORI 's/osx-x64/osx-x64;freebsd-x64/' $BUNDLEDVERSIONS
SDK_PATH="${AGENT_TOOLSDIRECTORY}/dotnet/sdk/${DOTNETVERSION}"
BUNDLEDVERSIONS="${SDK_PATH}/Microsoft.NETCoreSdk.BundledVersions.props"
if ! grep -q freebsd-x64 $BUNDLEDVERSIONS; then
sed -i.ORI 's/osx-x64/osx-x64;freebsd-x64;linux-x86/' $BUNDLEDVERSIONS
fi
displayName : E nable FreeBSD Support
displayName : Extra Platform Support
- task : Cache@2
inputs:
key : 'nuget | "$(Agent.OS)" | $(Build.SourcesDirectory)/src/Directory.Packages.props'
path : $(nugetCacheFolder)
displayName : Cache NuGet packages
- bash : ./build.sh --backend --enable- bsd
- bash : ./build.sh --backend --enable- extra-platforms
displayName : Build Readarr Backend
env:
NUGET_PACKAGES : $(nugetCacheFolder)
- bash : |
find ${OUTPUTFOLDER} -type f ! -path "*/publish/*" -exec rm -rf {} \;
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 "{}" \;
displayName : Clean up intermediate output
condition : and(succeeded(), ne(variables['osName'], 'Windows'))
- stage : Build_Frontend
displayName : Frontend
@ -262,35 +261,35 @@ stages:
artifactName : WindowsFrontend
targetPath : _output
displayName : Fetch Frontend
- bash : ./build.sh --packages --enable- bsd
- bash : ./build.sh --packages --enable- extra-platforms
displayName : Create Packages
- bash : |
find . -name "Readarr" -exec chmod a+x {} \;
find . -name "Readarr.Update" -exec chmod a+x {} \;
displayName : Set executable bits
- task : ArchiveFiles@2
displayName : Create Windows Core zip
displayName : Create win-x64 zip
inputs:
archiveFile : '$(Build.ArtifactStagingDirectory)/Readarr.$(buildName).windows-core-x64.zip'
archiveType : 'zip'
includeRootFolder : false
rootFolderOrFile : $(artifactsFolder)/win-x64/net6.0
- task : ArchiveFiles@2
displayName : Create Windows x86 Core zip
displayName : Create win-x86 zip
inputs:
archiveFile : '$(Build.ArtifactStagingDirectory)/Readarr.$(buildName).windows-core-x86.zip'
archiveType : 'zip'
includeRootFolder : false
rootFolderOrFile : $(artifactsFolder)/win-x86/net6.0
- task : ArchiveFiles@2
displayName : Create MacOS x64 Core app
displayName : Create osx-x64 app
inputs:
archiveFile : '$(Build.ArtifactStagingDirectory)/Readarr.$(buildName).osx-app-core-x64.zip'
archiveType : 'zip'
includeRootFolder : false
rootFolderOrFile : $(artifactsFolder)/osx-x64-app/net6.0
- task : ArchiveFiles@2
displayName : Create MacOS x64 Core tar
displayName : Create osx-x64 tar
inputs:
archiveFile : '$(Build.ArtifactStagingDirectory)/Readarr.$(buildName).osx-core-x64.tar.gz'
archiveType : 'tar'
@ -298,14 +297,14 @@ stages:
includeRootFolder : false
rootFolderOrFile : $(artifactsFolder)/osx-x64/net6.0
- task : ArchiveFiles@2
displayName : Create MacOS arm64 Core app
displayName : Create osx-arm64 app
inputs:
archiveFile : '$(Build.ArtifactStagingDirectory)/Readarr.$(buildName).osx-app-core-arm64.zip'
archiveType : 'zip'
includeRootFolder : false
rootFolderOrFile : $(artifactsFolder)/osx-arm64-app/net6.0
- task : ArchiveFiles@2
displayName : Create MacOS arm64 Core tar
displayName : Create osx-arm64 tar
inputs:
archiveFile : '$(Build.ArtifactStagingDirectory)/Readarr.$(buildName).osx-core-arm64.tar.gz'
archiveType : 'tar'
@ -313,7 +312,7 @@ stages:
includeRootFolder : false
rootFolderOrFile : $(artifactsFolder)/osx-arm64/net6.0
- task : ArchiveFiles@2
displayName : Create Linux Core tar
displayName : Create linux-x64 tar
inputs:
archiveFile : '$(Build.ArtifactStagingDirectory)/Readarr.$(buildName).linux-core-x64.tar.gz'
archiveType : 'tar'
@ -321,7 +320,7 @@ stages:
includeRootFolder : false
rootFolderOrFile : $(artifactsFolder)/linux-x64/net6.0
- task : ArchiveFiles@2
displayName : Create Linux Musl Core tar
displayName : Create linux-musl-x64 tar
inputs:
archiveFile : '$(Build.ArtifactStagingDirectory)/Readarr.$(buildName).linux-musl-core-x64.tar.gz'
archiveType : 'tar'
@ -329,7 +328,15 @@ stages:
includeRootFolder : false
rootFolderOrFile : $(artifactsFolder)/linux-musl-x64/net6.0
- task : ArchiveFiles@2
displayName : Create ARM32 Linux Core tar
displayName : Create linux-x86 tar
inputs:
archiveFile : '$(Build.ArtifactStagingDirectory)/Readarr.$(buildName).linux-core-x86.tar.gz'
archiveType : 'tar'
tarCompression : 'gz'
includeRootFolder : false
rootFolderOrFile : $(artifactsFolder)/linux-x86/net6.0
- task : ArchiveFiles@2
displayName : Create linux-arm tar
inputs:
archiveFile : '$(Build.ArtifactStagingDirectory)/Readarr.$(buildName).linux-core-arm.tar.gz'
archiveType : 'tar'
@ -337,7 +344,7 @@ stages:
includeRootFolder : false
rootFolderOrFile : $(artifactsFolder)/linux-arm/net6.0
- task : ArchiveFiles@2
displayName : Create ARM32 Linux Musl Core tar
displayName : Create linux-musl-arm tar
inputs:
archiveFile : '$(Build.ArtifactStagingDirectory)/Readarr.$(buildName).linux-musl-core-arm.tar.gz'
archiveType : 'tar'
@ -345,7 +352,7 @@ stages:
includeRootFolder : false
rootFolderOrFile : $(artifactsFolder)/linux-musl-arm/net6.0
- task : ArchiveFiles@2
displayName : Create Linux arm64 Core tar
displayName : Create linux-arm64 tar
inputs:
archiveFile : '$(Build.ArtifactStagingDirectory)/Readarr.$(buildName).linux-core-arm64.tar.gz'
archiveType : 'tar'
@ -353,7 +360,7 @@ stages:
includeRootFolder : false
rootFolderOrFile : $(artifactsFolder)/linux-arm64/net6.0
- task : ArchiveFiles@2
displayName : Create ARM64 Linux Musl Core tar
displayName : Create linux-musl-arm64 tar
inputs:
archiveFile : '$(Build.ArtifactStagingDirectory)/Readarr.$(buildName).linux-musl-core-arm64.tar.gz'
archiveType : 'tar'
@ -361,7 +368,7 @@ stages:
includeRootFolder : false
rootFolderOrFile : $(artifactsFolder)/linux-musl-arm64/net6.0
- task : ArchiveFiles@2
displayName : Create FreeBSD Core Core tar
displayName : Create freebsd-x64 tar
inputs:
archiveFile : '$(Build.ArtifactStagingDirectory)/Readarr.$(buildName).freebsd-core-x64.tar.gz'
archiveType : 'tar'
@ -413,22 +420,22 @@ stages:
matrix:
MacCore:
osName : 'Mac'
testName : ' MacCore '
testName : ' osx-x64 '
poolName : 'Azure Pipelines'
imageName : ${{ variables.macImage }}
WindowsCore:
osName : 'Windows'
testName : ' WindowsCore '
testName : ' win-x64 '
poolName : 'Azure Pipelines'
imageName : ${{ variables.windowsImage }}
LinuxCore:
osName : 'Linux'
testName : ' LinuxCore '
testName : ' linux-x64 '
poolName : 'Azure Pipelines'
imageName : ${{ variables.linuxImage }}
FreebsdCore:
osName : 'Linux'
testName : ' FreebsdCore '
testName : ' freebsd-x64 '
poolName : 'FreeBSD'
imageName:
@ -447,7 +454,7 @@ stages:
displayName : Download Test Artifact
inputs:
buildType : 'current'
artifactName : '$(testName) T ests'
artifactName : '$(testName) -t ests'
targetPath : $(testsFolder)
- powershell : Set-Service SCardSvr -StartupType Manual
displayName : Enable Windows Test Service
@ -475,8 +482,12 @@ stages:
matrix:
alpine:
testName : 'Musl Net Core'
artifactName : LinuxMuslCoreT ests
artifactName : linux-musl-x64-t ests
containerImage : ghcr.io/servarr/testimages:alpine
linux-x86:
testName : 'linux-x86'
artifactName : linux-x86-tests
containerImage : ghcr.io/servarr/testimages:linux-x86
pool:
vmImage : ${{ variables.linuxImage }}
@ -487,9 +498,15 @@ stages:
steps:
- task : UseDotNet@2
displayName : 'Install . net core '
displayName : 'Install . NET '
inputs:
version : $(dotnetVersion)
condition : and(succeeded(), ne(variables['testName'], 'linux-x86'))
- bash : |
SDKURL=$(curl -s https://api.github.com/repos/Servarr/dotnet-linux-x86/releases | jq -rc '.[].assets[].browser_download_url' | grep sdk-${DOTNETVERSION}.*gz$)
curl -fsSL $SDKURL | tar xzf - -C /opt/dotnet
displayName : 'Install .NET'
condition : and(succeeded(), eq(variables['testName'], 'linux-x86'))
- checkout : none
- task : DownloadPipelineArtifact@2
displayName : Download Test Artifact
@ -523,17 +540,17 @@ stages:
matrix:
MacCore:
osName : 'Mac'
testName : ' MacCore '
testName : ' osx-x64 '
imageName : ${{ variables.macImage }}
pattern : 'Readarr.*.osx-core-x64.tar.gz'
WindowsCore:
osName : 'Windows'
testName : ' WindowsCore '
testName : ' win-x64 '
imageName : ${{ variables.windowsImage }}
pattern : 'Readarr.*.windows-core-x64.zip'
LinuxCore:
osName : 'Linux'
testName : ' LinuxCore '
testName : ' linux-x64 '
imageName : ${{ variables.linuxImage }}
pattern : 'Readarr.*.linux-core-x64.tar.gz'
@ -550,7 +567,7 @@ stages:
displayName : Download Test Artifact
inputs:
buildType : 'current'
artifactName : '$(testName) T ests'
artifactName : '$(testName) -t ests'
targetPath : $(testsFolder)
- task : DownloadPipelineArtifact@2
displayName : Download Build Artifact
@ -595,7 +612,7 @@ stages:
displayName : Download Test Artifact
inputs:
buildType : 'current'
artifactName : ' FreebsdCoreT ests'
artifactName : ' freebsd-x64-t ests'
targetPath : $(testsFolder)
- task : DownloadPipelineArtifact@2
displayName : Download Build Artifact
@ -629,11 +646,15 @@ stages:
strategy:
matrix:
alpine:
testName : ' Musl Net Core '
artifactName : LinuxMuslCoreT ests
testName : ' linux-musl-x64 '
artifactName : linux-musl-x64-t ests
containerImage : ghcr.io/servarr/testimages:alpine
pattern : 'Readarr.*.linux-musl-core-x64.tar.gz'
linux-x86:
testName : 'linux-x86'
artifactName : linux-x86-tests
containerImage : ghcr.io/servarr/testimages:linux-x86
pattern : 'Readarr.*.linux-core-x86.tar.gz'
pool:
vmImage : ${{ variables.linuxImage }}
@ -643,9 +664,15 @@ stages:
steps:
- task : UseDotNet@2
displayName : 'Install . net core '
displayName : 'Install . NET '
inputs:
version : $(dotnetVersion)
condition : and(succeeded(), ne(variables['testName'], 'linux-x86'))
- bash : |
SDKURL=$(curl -s https://api.github.com/repos/Servarr/dotnet-linux-x86/releases | jq -rc '.[].assets[].browser_download_url' | grep sdk-${DOTNETVERSION}.*gz$)
curl -fsSL $SDKURL | tar xzf - -C /opt/dotnet
displayName : 'Install .NET'
condition : and(succeeded(), eq(variables['testName'], 'linux-x86'))
- checkout : none
- task : DownloadPipelineArtifact@2
displayName : Download Test Artifact
@ -691,14 +718,17 @@ stages:
matrix:
Linux:
osName : 'Linux'
artifactName : 'linux-x64'
imageName : ${{ variables.linuxImage }}
pattern : 'Readarr.*.linux-core-x64.tar.gz'
Mac:
osName : 'Mac'
artifactName : 'osx-x64'
imageName : ${{ variables.macImage }}
pattern : 'Readarr.*.osx-core-x64.tar.gz'
Windows:
osName : 'Windows'
artifactName : 'win-x64'
imageName : ${{ variables.windowsImage }}
pattern : 'Readarr.*.windows-core-x64.zip'
@ -715,7 +745,7 @@ stages:
displayName : Download Test Artifact
inputs:
buildType : 'current'
artifactName : '$( osName)CoreT ests'
artifactName : '$( artifactName)-t ests'
targetPath : $(testsFolder)
- task : DownloadPipelineArtifact@2
displayName : Download Build Artifact