Cache nuget packages

pull/1032/head
ta264 4 years ago
parent 8864b6b2c8
commit a146f6d223

@ -15,6 +15,7 @@ variables:
sentryUrl: 'https://sentry.servarr.com'
dotnetVersion: '5.0.201'
yarnCacheFolder: $(Pipeline.Workspace)/.yarn
nugetCacheFolder: $(Pipeline.Workspace)/.nuget/packages
trigger:
branches:
@ -93,15 +94,18 @@ stages:
sed -i.ORI 's/osx-x64/osx-x64;freebsd-x64/' $BUNDLEDVERSIONS
fi
displayName: Enable FreeBSD Support
- task: Cache@2
inputs:
key: 'nuget | "$(Agent.OS)" | $(Build.SourcesDirectory)/src/Directory.Packages.props'
restoreKeys: |
nuget | "$(Agent.OS)"
nuget
path: $(nugetCacheFolder)
displayName: Cache NuGet packages
- bash: ./build.sh --backend --enable-bsd
displayName: Build Readarr Backend
- 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'))
env:
NUGET_PACKAGES: $(nugetCacheFolder)
- publish: $(outputFolder)
artifact: '$(osName)Backend'
displayName: Publish Backend
@ -835,6 +839,15 @@ stages:
version: $(dotnetVersion)
- checkout: self # Need history for Sonar analysis
submodules: true
- task: Cache@2
inputs:
key: 'nuget | "$(Agent.OS)" | $(Build.SourcesDirectory)/src/Directory.Packages.props'
restoreKeys: |
nuget | "$(Agent.OS)"
nuget
path: $(nugetCacheFolder)
displayName: Cache NuGet packages
- task: SonarCloudPrepare@1
condition: eq(variables['System.PullRequest.IsFork'], 'False')
inputs:
@ -853,6 +866,8 @@ stages:
./build.sh --backend -f net5.0 -r linux-x64
TEST_DIR=_tests/net5.0/linux-x64/publish/ ./test.sh Linux Unit Coverage
displayName: Coverage Unit Tests
env:
NUGET_PACKAGES: $(nugetCacheFolder)
- task: SonarCloudAnalyze@1
condition: eq(variables['System.PullRequest.IsFork'], 'False')
displayName: Publish SonarCloud Results

@ -2,6 +2,7 @@
<!-- Common to all Readarr Projects -->
<PropertyGroup>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<PlatformTarget>AnyCPU</PlatformTarget>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
@ -42,7 +43,7 @@
<OutputPath Condition="'$(ReadarrOutputType)'=='Update'">$(ReadarrRootDir)_output\Readarr.Update\</OutputPath>
<!-- Paths relative to project file for better readability -->
<EnableBaseIntermediateOutputPathMismatchWarning>false</EnableBaseIntermediateOutputPathMismatchWarning>
<EnableBaseIntermediateOutputPathMismatchWarning>false</EnableBaseIntermediateOutputPathMismatchWarning>
<BaseIntermediateOutputPath>$([MSBuild]::MakeRelative('$(MSBuildProjectDirectory)', '$(BaseIntermediateOutputPath)'))</BaseIntermediateOutputPath>
<IntermediateOutputPath>$([MSBuild]::MakeRelative('$(MSBuildProjectDirectory)', '$(IntermediateOutputPath)'))</IntermediateOutputPath>
<OutputPath>$([MSBuild]::MakeRelative('$(MSBuildProjectDirectory)', '$(OutputPath)'))</OutputPath>
@ -89,17 +90,17 @@
<!-- Standard testing packages -->
<ItemGroup Condition="'$(TestProject)'=='true'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
<PackageReference Include="NUnit" Version="3.13.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
<PackageReference Include="NunitXml.TestLogger" Version="3.0.97" />
<PackageReference Include="coverlet.collector" Version="1.2.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="NUnit" />
<PackageReference Include="NUnit3TestAdapter" />
<PackageReference Include="NunitXml.TestLogger" />
<PackageReference Include="coverlet.collector" PrivateAssets="all" />
</ItemGroup>
<!-- Set up stylecop -->
<ItemGroup Condition="'$(ReadarrProject)'=='true' and '$(EnableAnalyzers)'!='false'">
<!-- StyleCop analysis -->
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PackageReference Include="StyleCop.Analyzers" >
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>

@ -0,0 +1,61 @@
<Project>
<ItemGroup>
<PackageVersion Include="AutoFixture" Version="4.12.0" />
<PackageVersion Include="coverlet.collector" Version="1.2.1" PrivateAssets="all" />
<PackageVersion Include="Dapper" Version="2.0.78" />
<PackageVersion Include="DotNet4.SocksProxy" Version="1.4.0.1" />
<PackageVersion Include="DryIoc.dll" Version="4.7.4" />
<PackageVersion Include="DryIoc.Microsoft.DependencyInjection" Version="5.1.0" />
<PackageVersion Include="Equ" Version="2.3.0" />
<PackageVersion Include="FluentAssertions" Version="5.10.3" />
<PackageVersion Include="FluentMigrator.Runner.SQLite" Version="4.0.0-alpha.289" />
<PackageVersion Include="FluentMigrator.Runner" Version="4.0.0-alpha.289" />
<PackageVersion Include="FluentValidation" Version="8.6.2" />
<PackageVersion Include="Ical.Net" Version="4.1.11" />
<PackageVersion Include="ImpromptuInterface" Version="7.0.1" />
<PackageVersion Include="Kveer.XmlRPC" Version="1.1.1" />
<PackageVersion Include="Microsoft.AspNetCore.SignalR.Client" Version="5.0.4" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
<PackageVersion Include="Microsoft.Extensions.Hosting.WindowsServices" Version="5.0.1" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="5.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
<PackageVersion Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageVersion Include="Mono.Posix.NETStandard" Version="5.20.1-servarr1" />
<PackageVersion Include="MonoTorrent" Version="1.0.29" />
<PackageVersion Include="Moq" Version="4.16.1" />
<PackageVersion Include="NBuilder" Version="6.1.0" />
<PackageVersion Include="Newtonsoft.Json" Version="12.0.3" />
<PackageVersion Include="NLog.Extensions.Logging" Version="1.7.1" />
<PackageVersion Include="NLog" Version="4.7.8" />
<PackageVersion Include="NUnit3TestAdapter" Version="3.17.0" />
<PackageVersion Include="NUnit" Version="3.13.1" />
<PackageVersion Include="NunitXml.TestLogger" Version="3.0.97" />
<PackageVersion Include="PdfSharpCore" Version="1.2.15" />
<PackageVersion Include="RestSharp.Serializers.SystemTextJson" Version="106.11.7" />
<PackageVersion Include="RestSharp" Version="106.11.7" />
<PackageVersion Include="Selenium.Support" Version="3.141.0" />
<PackageVersion Include="Selenium.WebDriver.ChromeDriver" Version="89.0.4389.2300" />
<PackageVersion Include="Sentry" Version="2.1.4" />
<PackageVersion Include="SharpZipLib" Version="1.3.1" />
<PackageVersion Include="SixLabors.ImageSharp" Version="1.0.3" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.1.118" />
<PackageVersion Include="System.Buffers" Version="4.5.1" />
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
<PackageVersion Include="System.Data.SQLite.Core.Servarr" Version="1.0.113.0-0" />
<PackageVersion Include="System.IO.Abstractions.TestingHelpers" Version="12.0.4" />
<PackageVersion Include="System.IO.Abstractions" Version="12.0.4" />
<PackageVersion Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
<PackageVersion Include="System.Memory" Version="4.5.4" />
<PackageVersion Include="System.Reflection.TypeExtensions" Version="4.7.0" />
<PackageVersion Include="System.Resources.Extensions" Version="5.0.0" />
<PackageVersion Include="System.Runtime.Loader" Version="4.3.0" />
<PackageVersion Include="System.Security.Principal.Windows" Version="5.0.0" />
<PackageVersion Include="System.ServiceProcess.ServiceController" Version="5.0.0" />
<PackageVersion Include="System.Text.Encoding.CodePages" Version="5.0.0" />
<PackageVersion Include="System.Text.Json" Version="5.0.1" />
<PackageVersion Include="System.ValueTuple" Version="4.5.0" />
<PackageVersion Include="TagLibSharp-Lidarr" Version="2.2.0.19" />
<PackageVersion Include="Unity" Version="5.11.10" />
</ItemGroup>
</Project>

@ -3,7 +3,7 @@
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NBuilder" Version="6.1.0" />
<PackageReference Include="NBuilder" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NzbDrone.Core\Readarr.Core.csproj" />

@ -3,8 +3,8 @@
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Selenium.Support" Version="3.141.0" />
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="89.0.4389.2300" />
<PackageReference Include="Selenium.Support" />
<PackageReference Include="Selenium.WebDriver.ChromeDriver" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NzbDrone.Test.Common\Readarr.Test.Common.csproj" />

@ -5,22 +5,22 @@
<DefineConstants Condition="'$(RuntimeIdentifier)' == 'linux-musl-x64' or '$(RuntimeIdentifier)' == 'linux-musl-arm64'">ISMUSL</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DotNet4.SocksProxy" Version="1.4.0.1" />
<PackageReference Include="DryIoc.dll" Version="4.7.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
<PackageReference Include="NLog.Extensions.Logging" Version="1.7.1" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="NLog" Version="4.7.8" />
<PackageReference Include="Sentry" Version="2.1.4" />
<PackageReference Include="SharpZipLib" Version="1.3.1" />
<PackageReference Include="System.IO.Abstractions" Version="12.0.4" />
<PackageReference Include="System.Text.Json" Version="5.0.1" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
<PackageReference Include="System.Data.SQLite.Core.Servarr" Version="1.0.113.0-0" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="5.0.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageReference Include="DotNet4.SocksProxy" />
<PackageReference Include="DryIoc.dll" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
<PackageReference Include="NLog.Extensions.Logging" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="NLog" />
<PackageReference Include="Sentry" />
<PackageReference Include="SharpZipLib" />
<PackageReference Include="System.IO.Abstractions" />
<PackageReference Include="System.Text.Json" />
<PackageReference Include="System.ValueTuple" />
<PackageReference Include="System.Data.SQLite.Core.Servarr" />
<PackageReference Include="System.Runtime.Loader" />
<PackageReference Include="System.Configuration.ConfigurationManager" />
<PackageReference Include="System.ServiceProcess.ServiceController" />
<PackageReference Include="Microsoft.Win32.Registry" />
</ItemGroup>
<ItemGroup>
<Compile Update="EnsureThat\Resources\ExceptionMessages.Designer.cs">

@ -3,10 +3,10 @@
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Buffers" Version="4.5.1" />
<PackageReference Include="NBuilder" Version="6.1.0" />
<PackageReference Include="System.IO.Abstractions.TestingHelpers" Version="12.0.4" />
<PackageReference Include="AutoFixture" Version="4.12.0" />
<PackageReference Include="System.Buffers" />
<PackageReference Include="NBuilder" />
<PackageReference Include="System.IO.Abstractions.TestingHelpers" />
<PackageReference Include="AutoFixture" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NzbDrone.Test.Common\Readarr.Test.Common.csproj" />

@ -3,26 +3,26 @@
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Dapper" Version="2.0.78" />
<PackageReference Include="System.Text.Json" Version="5.0.1" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0" />
<PackageReference Include="System.Memory" Version="4.5.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
<PackageReference Include="FluentMigrator.Runner" Version="4.0.0-alpha.289" />
<PackageReference Include="FluentMigrator.Runner.SQLite" Version="4.0.0-alpha.289" />
<PackageReference Include="FluentValidation" Version="8.6.2" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="NLog" Version="4.7.8" />
<PackageReference Include="RestSharp" Version="106.11.7" />
<PackageReference Include="System.IO.Abstractions" Version="12.0.4" />
<PackageReference Include="TagLibSharp-Lidarr" Version="2.2.0.19" />
<PackageReference Include="Kveer.XmlRPC" Version="1.1.1" />
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.3" />
<PackageReference Include="Equ" Version="2.3.0" />
<PackageReference Include="MonoTorrent" Version="1.0.29" />
<PackageReference Include="PdfSharpCore" Version="1.2.15" />
<PackageReference Include="Dapper" />
<PackageReference Include="System.Text.Json" />
<PackageReference Include="System.Text.Encoding.CodePages" />
<PackageReference Include="System.Memory" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
<PackageReference Include="Microsoft.Extensions.Logging" />
<PackageReference Include="Microsoft.Extensions.Configuration" />
<PackageReference Include="FluentMigrator.Runner" />
<PackageReference Include="FluentMigrator.Runner.SQLite" />
<PackageReference Include="FluentValidation" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="NLog" />
<PackageReference Include="RestSharp" />
<PackageReference Include="System.IO.Abstractions" />
<PackageReference Include="TagLibSharp-Lidarr" />
<PackageReference Include="Kveer.XmlRPC" />
<PackageReference Include="SixLabors.ImageSharp" />
<PackageReference Include="Equ" />
<PackageReference Include="MonoTorrent" />
<PackageReference Include="PdfSharpCore" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NzbDrone.Common\Readarr.Common.csproj" />

@ -4,9 +4,9 @@
<OutputType>Library</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="5.0.1" />
<PackageReference Include="DryIoc.dll" Version="4.7.4" />
<PackageReference Include="DryIoc.Microsoft.DependencyInjection" Version="5.1.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" />
<PackageReference Include="DryIoc.dll" />
<PackageReference Include="DryIoc.Microsoft.DependencyInjection" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Readarr.Api.V1\Readarr.Api.V1.csproj" />

@ -4,7 +4,7 @@
<OutputType>Library</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="5.0.4" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Readarr.Api.V1\Readarr.Api.V1.csproj" />

@ -3,7 +3,7 @@
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Mono.Posix.NETStandard" Version="5.20.1-servarr1" />
<PackageReference Include="Mono.Posix.NETStandard" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NzbDrone.Common.Test\Readarr.Common.Test.csproj" />

@ -3,9 +3,9 @@
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NLog" Version="4.7.8" />
<PackageReference Include="System.IO.Abstractions" Version="12.0.4" />
<PackageReference Include="Mono.Posix.NETStandard" Version="5.20.1-servarr1" />
<PackageReference Include="NLog" />
<PackageReference Include="System.IO.Abstractions" />
<PackageReference Include="Mono.Posix.NETStandard" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NzbDrone.Common\Readarr.Common.csproj" />

@ -3,16 +3,16 @@
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="FluentValidation" Version="8.6.2" />
<PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="NLog" Version="4.7.8" />
<PackageReference Include="NUnit" Version="3.13.1" />
<PackageReference Include="RestSharp" Version="106.11.7" />
<PackageReference Include="RestSharp.Serializers.SystemTextJson" Version="106.11.7" />
<PackageReference Include="System.IO.Abstractions" Version="12.0.4" />
<PackageReference Include="Unity" Version="5.11.10" />
<PackageReference Include="FluentAssertions" />
<PackageReference Include="FluentValidation" />
<PackageReference Include="Moq" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="NLog" />
<PackageReference Include="NUnit" />
<PackageReference Include="RestSharp" />
<PackageReference Include="RestSharp.Serializers.SystemTextJson" />
<PackageReference Include="System.IO.Abstractions" />
<PackageReference Include="Unity" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NzbDrone.Common\Readarr.Common.csproj" />

@ -4,9 +4,9 @@
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DryIoc.dll" Version="4.7.4" />
<PackageReference Include="DryIoc.Microsoft.DependencyInjection" Version="5.1.0" />
<PackageReference Include="NLog" Version="4.7.8" />
<PackageReference Include="DryIoc.dll" />
<PackageReference Include="DryIoc.Microsoft.DependencyInjection" />
<PackageReference Include="NLog" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NzbDrone.Common\Readarr.Common.csproj" />

@ -3,8 +3,8 @@
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NLog" Version="4.7.8" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
<PackageReference Include="NLog" />
<PackageReference Include="System.IO.FileSystem.AccessControl" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NzbDrone.Common\Readarr.Common.csproj" />

@ -9,7 +9,7 @@
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Resources.Extensions" Version="5.0.0" />
<PackageReference Include="System.Resources.Extensions" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NzbDrone.Host\Readarr.Host.csproj" />

@ -9,10 +9,10 @@
<ProjectReference Include="..\NzbDrone.SignalR\Readarr.SignalR.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.7.0" />
<PackageReference Include="FluentValidation" Version="8.6.2" />
<PackageReference Include="Ical.Net" Version="4.1.11" />
<PackageReference Include="NLog" Version="4.7.8" />
<PackageReference Include="System.IO.Abstractions" Version="12.0.4" />
<PackageReference Include="System.Reflection.TypeExtensions" />
<PackageReference Include="FluentValidation" />
<PackageReference Include="Ical.Net" />
<PackageReference Include="NLog" />
<PackageReference Include="System.IO.Abstractions" />
</ItemGroup>
</Project>

@ -3,9 +3,9 @@
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentValidation" Version="8.6.2" />
<PackageReference Include="ImpromptuInterface" Version="7.0.1" />
<PackageReference Include="NLog" Version="4.7.8" />
<PackageReference Include="FluentValidation" />
<PackageReference Include="ImpromptuInterface" />
<PackageReference Include="NLog" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NzbDrone.Core\Readarr.Core.csproj" />

@ -4,6 +4,6 @@
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="System.Security.Principal.Windows" Version="5.0.0" />
<PackageReference Include="System.Security.Principal.Windows" />
</ItemGroup>
</Project>

@ -4,6 +4,6 @@
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="System.Security.Principal.Windows" Version="5.0.0" />
<PackageReference Include="System.Security.Principal.Windows" />
</ItemGroup>
</Project>

Loading…
Cancel
Save