Skip to content

Commit 8ba3830

Browse files
committed
Add deterministic build check to CI/CD
1 parent 4c90d70 commit 8ba3830

5 files changed

Lines changed: 64 additions & 0 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ jobs:
2929
- name: Build
3030
run: dotnet build -c Release --no-restore
3131

32+
- name: Deterministic build check
33+
run: |
34+
dotnet tool install --global dotnet-validate --version 0.0.1-preview.537
35+
dotnet pack Monero/Monero.csproj -c Release /p:PackageVersion=1 --no-build -o nuget-packages
36+
dotnet validate package local nuget-packages/Monero.1.0.0.nupkg
37+
3238
- name: Run unit tests
3339
run: |
3440
dotnet tool install --global JetBrains.dotCover.CommandLineTools --version 2025.1.6
@@ -46,3 +52,9 @@ jobs:
4652
with:
4753
name: coverage-report
4854
path: coverage/dotcover.xml
55+
56+
- name: Upload NuGet package
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: nuget-package-${{ github.sha }}
60+
path: nuget-packages/Monero.1.0.0.nupkg

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
.idea
44
.vs/
55
coverage
6+
nuget-packages
67
**/.AssemblyAttributes
78
monero-csharp.sln.DotSettings.user
89
.DS_Store

Monero/Monero.csproj

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,27 @@
77
<Nullable>enable</Nullable>
88
</PropertyGroup>
99

10+
<!-- Specific properties -->
11+
<PropertyGroup>
12+
<Product>Monero CSharp bindings library</Product>
13+
<Description>This library provides C# bindings for interacting with the Monero, enabling seamless payment integration.</Description>
14+
<Version>0.0.1</Version>
15+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
16+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
17+
</PropertyGroup>
18+
1019
<ItemGroup>
1120
<PackageReference Include="BouncyCastle.Cryptography" Version="2.6.1"/>
1221
<PackageReference Include="Newtonsoft.Json" Version="13.0.3"/>
1322
</ItemGroup>
1423

24+
<!-- Deterministic build -->
25+
<ItemGroup>
26+
<PackageReference Include="DotNet.ReproducibleBuilds" Version="1.2.25" PrivateAssets="All"/>
27+
<PackageReference Include="DotNet.ReproducibleBuilds.Isolated" Version="1.2.25" />
28+
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" />
29+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
30+
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
31+
</ItemGroup>
32+
1533
</Project>

Monero/Monero.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"Identifier": "Monero.Csharp",
3+
"Name": "Monero CSharp bindings library",
4+
"Version": "0.0.1",
5+
"Description": "This library provides C# bindings for interacting with the Monero, enabling seamless payment integration.",
6+
"SystemPlugin": false,
7+
"Documentation": null,
8+
"Source": null,
9+
"Author": null,
10+
"AuthorLink": null
11+
}

Monero/Monero.sln

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31903.59
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Monero.Csharp", "Monero.csproj", "{440E70AD-BA40-449C-8315-6A13D95B6ED7}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(SolutionProperties) = preSolution
14+
HideSolutionNode = FALSE
15+
EndGlobalSection
16+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
17+
{440E70AD-BA40-449C-8315-6A13D95B6ED7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
18+
{440E70AD-BA40-449C-8315-6A13D95B6ED7}.Debug|Any CPU.Build.0 = Debug|Any CPU
19+
{440E70AD-BA40-449C-8315-6A13D95B6ED7}.Release|Any CPU.ActiveCfg = Release|Any CPU
20+
{440E70AD-BA40-449C-8315-6A13D95B6ED7}.Release|Any CPU.Build.0 = Release|Any CPU
21+
EndGlobalSection
22+
EndGlobal

0 commit comments

Comments
 (0)