diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 0000000..a5c1abd --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,48 @@ +# This workflow will build a .NET project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net + +name: .NET + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: | + 8.0.x + 9.0.x + + - name: Restore Cache Zig Cache + uses: actions/cache/@v4 + with: + path: Jolt.Native~/zig-cache + key: ${{ runner.os }}-zig-cache + + - name: Restore dependencies + run: | + dotnet restore + dotnet tool restore + working-directory: Jolt.Native~ + + - name: Build + run: dotnet build --no-restore + # run: dotnet ClangSharpPInvokeGenerator --include-directory "/home/runner/.nuget/packages/vezel.zig.toolsets.linux-x64/0.11.0.1/tools/lib/include" -f lib/joltc/joltc.h -n Jolt -m UnsafeBindings -l joltc -o ../Jolt/Bindings/UnsafeBindings.g.cs "@clangsharp.rsp" + working-directory: Jolt.Native~ + + - uses: actions/upload-artifact@v4 + with: + name: buld + path: Jolt.Native~/out \ No newline at end of file diff --git a/Jolt.Native~/.config/dotnet-tools.json b/Jolt.Native~/.config/dotnet-tools.json new file mode 100644 index 0000000..1596ada --- /dev/null +++ b/Jolt.Native~/.config/dotnet-tools.json @@ -0,0 +1,13 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "clangsharppinvokegenerator": { + "version": "20.1.2.1", + "commands": [ + "ClangSharpPInvokeGenerator" + ], + "rollForward": false + } + } +} \ No newline at end of file diff --git a/Jolt.Native~/Jolt.Native.csproj b/Jolt.Native~/Jolt.Native.csproj index d939c53..0983e1f 100644 --- a/Jolt.Native~/Jolt.Native.csproj +++ b/Jolt.Native~/Jolt.Native.csproj @@ -15,6 +15,7 @@ + runtime; build; native; contentfiles; analyzers; buildtransitive all @@ -48,16 +49,16 @@ - - - + + + - - - - + + + + @@ -65,7 +66,7 @@ - +