Skip to content

Commit 6a93fe2

Browse files
committed
Update dependencies, CI and some base class
1 parent e2bc6eb commit 6a93fe2

21 files changed

+1447
-1487
lines changed

.github/workflows/CI.yml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,8 @@ on:
1111
jobs:
1212
build:
1313
runs-on: ubuntu-22.04
14-
1514
steps:
16-
- name: Checkout
17-
uses: actions/checkout@v3
18-
with:
19-
submodules: true
20-
fetch-depth: 0
21-
22-
- name: Install .NET 8.0
23-
uses: actions/setup-dotnet@v3
24-
with:
25-
dotnet-version: '8.0.x'
26-
27-
- name: Build, Test, Pack, Publish
28-
shell: bash
29-
run: |
30-
dotnet tool install -g dotnet-releaser --configfile .github/workflows/nuget_org_only.config
31-
dotnet-releaser run --nuget-token "${{secrets.NUGET_TOKEN}}" --github-token "${{secrets.GITHUB_TOKEN}}" src/dotnet-releaser.toml
15+
- name: "Build, Test, Pack and Publish"
16+
uses: xoofx/.github/.github/actions/dotnet-releaser-action@main
17+
with:
18+
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}

src/LibObjectFile.CodeGen/LibObjectFile.CodeGen.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<TargetFramework>net8.0</TargetFramework>
44
<OutputType>Exe</OutputType>
55
<IsPackable>false</IsPackable>
6+
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == '' AND '$(PackAsTool)' != 'true'">$(NETCoreSdkRuntimeIdentifier)</RuntimeIdentifier>
67
</PropertyGroup>
78

89
<ItemGroup>
@@ -11,7 +12,7 @@
1112
</ItemGroup>
1213

1314
<ItemGroup>
14-
<PackageReference Include="CppAst.CodeGen" Version="0.11.3" />
15+
<PackageReference Include="CppAst.CodeGen" Version="0.20.0" />
1516
<Content Include="dwarf.h">
1617
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
1718
</Content>

src/LibObjectFile.CodeGen/Program.Dwarf.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -420,9 +420,11 @@ private static void GenerateDwarfDIE(CSharpNamespace ns)
420420
currentDIE.BaseTypes.Add(new CSharpFreeType("DwarfDIE"));
421421
ns.Members.Add(currentDIE);
422422

423-
var csConstructor = new CSharpMethod();
424-
csConstructor.IsConstructor = true;
425-
csConstructor.Body = (writer, element) => writer.WriteLine($"this.Tag = (DwarfTag)DwarfNative.{fullTagName};");
423+
var csConstructor = new CSharpMethod(string.Empty)
424+
{
425+
Kind = CSharpMethodKind.Constructor,
426+
Body = (writer, element) => writer.WriteLine($"this.Tag = (DwarfTag)DwarfNative.{fullTagName};")
427+
};
426428
currentDIE.Members.Add(csConstructor);
427429

428430
dieClasses.Add(currentDIE);
@@ -461,9 +463,8 @@ private static void GenerateDwarfDIE(CSharpNamespace ns)
461463
Visibility = CSharpVisibility.Internal
462464
};
463465
ns.Members.Add(dieHelperClass);
464-
var dieHelperMethod = new CSharpMethod()
466+
var dieHelperMethod = new CSharpMethod("ConvertTagToDwarfDIE")
465467
{
466-
Name = "ConvertTagToDwarfDIE",
467468
Modifiers = CSharpModifiers.Static,
468469
Visibility = CSharpVisibility.Public
469470
};

src/LibObjectFile.CodeGen/Program.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace LibObjectFile.CodeGen
1414
{
1515
partial class Program
1616
{
17-
private const string SrcFolderRelative = @"..\..\..\..";
17+
private const string SrcFolderRelative = @"..\..\..\..\..";
1818

1919
static void Main(string[] args)
2020
{
@@ -255,9 +255,8 @@ private static void ProcessEnum(CSharpConverterOptions cppOptions, CSharpCompila
255255
}
256256
}
257257

258-
var toStringInternal = new CSharpMethod()
258+
var toStringInternal = new CSharpMethod("ToStringInternal")
259259
{
260-
Name = "ToStringInternal",
261260
Visibility = CSharpVisibility.Private,
262261
ReturnType = CSharpPrimitiveType.String()
263262
};

src/LibObjectFile.Tests/LibObjectFile.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
</ItemGroup>
3838

3939
<ItemGroup>
40-
<PackageReference Include="nunit" Version="4.0.1" />
41-
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
42-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
40+
<PackageReference Include="nunit" Version="4.2.2" />
41+
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
42+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
4343
</ItemGroup>
4444

4545
<ItemGroup>

0 commit comments

Comments
 (0)