Skip to content

Commit

Permalink
Update dependencies, CI and some base class
Browse files Browse the repository at this point in the history
  • Loading branch information
xoofx committed Sep 13, 2024
1 parent e2bc6eb commit 6a93fe2
Show file tree
Hide file tree
Showing 21 changed files with 1,447 additions and 1,487 deletions.
21 changes: 4 additions & 17 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,8 @@ on:
jobs:
build:
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0

- name: Install .NET 8.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'

- name: Build, Test, Pack, Publish
shell: bash
run: |
dotnet tool install -g dotnet-releaser --configfile .github/workflows/nuget_org_only.config
dotnet-releaser run --nuget-token "${{secrets.NUGET_TOKEN}}" --github-token "${{secrets.GITHUB_TOKEN}}" src/dotnet-releaser.toml
- name: "Build, Test, Pack and Publish"
uses: xoofx/.github/.github/actions/dotnet-releaser-action@main
with:
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
3 changes: 2 additions & 1 deletion src/LibObjectFile.CodeGen/LibObjectFile.CodeGen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == '' AND '$(PackAsTool)' != 'true'">$(NETCoreSdkRuntimeIdentifier)</RuntimeIdentifier>
</PropertyGroup>

<ItemGroup>
Expand All @@ -11,7 +12,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CppAst.CodeGen" Version="0.11.3" />
<PackageReference Include="CppAst.CodeGen" Version="0.20.0" />
<Content Include="dwarf.h">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Expand Down
11 changes: 6 additions & 5 deletions src/LibObjectFile.CodeGen/Program.Dwarf.cs
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,11 @@ private static void GenerateDwarfDIE(CSharpNamespace ns)
currentDIE.BaseTypes.Add(new CSharpFreeType("DwarfDIE"));
ns.Members.Add(currentDIE);

var csConstructor = new CSharpMethod();
csConstructor.IsConstructor = true;
csConstructor.Body = (writer, element) => writer.WriteLine($"this.Tag = (DwarfTag)DwarfNative.{fullTagName};");
var csConstructor = new CSharpMethod(string.Empty)
{
Kind = CSharpMethodKind.Constructor,
Body = (writer, element) => writer.WriteLine($"this.Tag = (DwarfTag)DwarfNative.{fullTagName};")
};
currentDIE.Members.Add(csConstructor);

dieClasses.Add(currentDIE);
Expand Down Expand Up @@ -461,9 +463,8 @@ private static void GenerateDwarfDIE(CSharpNamespace ns)
Visibility = CSharpVisibility.Internal
};
ns.Members.Add(dieHelperClass);
var dieHelperMethod = new CSharpMethod()
var dieHelperMethod = new CSharpMethod("ConvertTagToDwarfDIE")
{
Name = "ConvertTagToDwarfDIE",
Modifiers = CSharpModifiers.Static,
Visibility = CSharpVisibility.Public
};
Expand Down
5 changes: 2 additions & 3 deletions src/LibObjectFile.CodeGen/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace LibObjectFile.CodeGen
{
partial class Program
{
private const string SrcFolderRelative = @"..\..\..\..";
private const string SrcFolderRelative = @"..\..\..\..\..";

static void Main(string[] args)
{
Expand Down Expand Up @@ -255,9 +255,8 @@ private static void ProcessEnum(CSharpConverterOptions cppOptions, CSharpCompila
}
}

var toStringInternal = new CSharpMethod()
var toStringInternal = new CSharpMethod("ToStringInternal")
{
Name = "ToStringInternal",
Visibility = CSharpVisibility.Private,
ReturnType = CSharpPrimitiveType.String()
};
Expand Down
6 changes: 3 additions & 3 deletions src/LibObjectFile.Tests/LibObjectFile.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="nunit" Version="4.0.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="nunit" Version="4.2.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit 6a93fe2

Please sign in to comment.