Add deterministic / reproducible build with validation
This commit is contained in:
parent
ba687490b1
commit
d327426e9a
4 changed files with 27 additions and 8 deletions
21
.github/workflows/dotnet.yml
vendored
21
.github/workflows/dotnet.yml
vendored
|
|
@ -33,11 +33,16 @@ jobs:
|
|||
- name: Build projects
|
||||
run: dotnet build -c Release --no-restore
|
||||
|
||||
- name: Install JetBrains dotCover CLI
|
||||
run: dotnet tool install --global JetBrains.dotCover.CommandLineTools
|
||||
|
||||
- name: Deterministic build check
|
||||
run: |
|
||||
dotnet tool install --global dotnet-validate --version 0.0.1-preview.537
|
||||
dotnet pack Plugins/Monero/BTCPayServer.Plugins.Monero.csproj -c Release /p:PackageVersion=1 --no-build -o nuget-packages
|
||||
dotnet validate package local nuget-packages/BTCPayServer.Plugins.Monero.1.0.0.nupkg
|
||||
|
||||
- name: Run unit tests
|
||||
run: dotCover cover-dotnet --TargetArguments="test BTCPayServer.Plugins.UnitTests -c Release --no-build" --output=coverage/dotCover.UnitTests.output.dcvr --filters="-:Assembly=BTCPayServer.Plugins.UnitTests;-:Assembly=testhost;-:Assembly=BTCPayServer;-:Class=AspNetCoreGeneratedDocument.*"
|
||||
run: |
|
||||
dotnet tool install --global JetBrains.dotCover.CommandLineTools
|
||||
dotCover cover-dotnet --TargetArguments="test BTCPayServer.Plugins.UnitTests -c Release --no-build" --output=coverage/dotCover.UnitTests.output.dcvr --filters="-:Assembly=BTCPayServer.Plugins.UnitTests;-:Assembly=testhost;-:Assembly=BTCPayServer;-:Class=AspNetCoreGeneratedDocument.*"
|
||||
|
||||
- name: Run integration tests
|
||||
run: docker compose -f BTCPayServer.Plugins.IntegrationTests/docker-compose.yml run tests
|
||||
|
|
@ -50,4 +55,10 @@ jobs:
|
|||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: coverage-report
|
||||
path: coverage/dotcover.xml
|
||||
path: coverage/dotcover.xml
|
||||
|
||||
- name: Upload NuGet package
|
||||
uses: actions/upload-artifact@v4.6.2
|
||||
with:
|
||||
name: nuget-package-${{ github.sha }}
|
||||
path: nuget-packages/BTCPayServer.Plugins.Monero.1.0.0.nupkg
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -4,3 +4,4 @@
|
|||
Plugins/packed
|
||||
.vs/
|
||||
coverage
|
||||
nuget-packages
|
||||
|
|
@ -8,6 +8,7 @@
|
|||
<Product>BTCPay Server: Monero support plugin</Product>
|
||||
<Description>This plugin extends BTCPay Server to enable users to receive payments via Monero.</Description>
|
||||
<Version>1.0.2</Version>
|
||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Plugin development properties -->
|
||||
|
|
@ -15,6 +16,7 @@
|
|||
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
|
||||
<PreserveCompilationContext>false</PreserveCompilationContext>
|
||||
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
|
||||
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- This will make sure that referencing BTCPayServer doesn't put any artifact in the published directory -->
|
||||
|
|
@ -25,9 +27,14 @@
|
|||
<ExcludeAssets>runtime;native;build;buildTransitive;contentFiles</ExcludeAssets>
|
||||
</ProjectReference>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
|
||||
<!-- Deterministic build -->
|
||||
<ItemGroup>
|
||||
<InternalsVisibleTo Include="BTCPayServer.Plugins.Monero.UnitTests" />
|
||||
<PackageReference Include="DotNet.ReproducibleBuilds" Version="1.2.25" PrivateAssets="All"/>
|
||||
<PackageReference Include="DotNet.ReproducibleBuilds.Isolated" Version="1.2.25" />
|
||||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
|
||||
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
|
||||
</ItemGroup>
|
||||
|
||||
<!-- If you need Entity Framework, you can uncomment this. This will make it usable in your project without publishing assemblies
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 1602069734ff985bbeec496f4ebc65eb4e3651a9
|
||||
Subproject commit 276bb1b165279f39d2f2f7efb614949ae4c3b5b3
|
||||
Loading…
Add table
Reference in a new issue