14
14
- name : Clone tritonserver
15
15
run : |
16
16
git clone --single-branch --depth 1 --branch r24.08 https://github.com/triton-inference-server/core
17
- git clone --single-branch --depth 1 --branch r24.08 https://github.com/triton-inference-server/developer_tools
17
+ # git clone --single-branch --depth 1 --branch r24.08 https://github.com/triton-inference-server/developer_tools
18
18
19
19
- name : Clone and build CppSharp
20
20
run : |
@@ -29,40 +29,39 @@ jobs:
29
29
run : |
30
30
./CppSharp/bin/Release_x64/CppSharp.CLI -m tritonserver -g csharp -p linux -a x64 -o ./variant1/ -I=core/include core/include/triton/core/tritonserver.h core/include/triton/core/tritonbackend.h core/include/triton/core/tritoncache.h core/include/triton/core/tritonrepoagent.h
31
31
32
- ./CppSharp/bin/Release_x64/CppSharp.CLI -m tritondevelopertoolsserver -g csharp -p linux -a x64 -o ./variant3/ -I=developer_tools/server/include -I=core/include -I=developer_tools/server/include/triton/developer_tools developer_tools/server/include/triton/developer_tools/server_wrapper.h developer_tools/server/include/triton/developer_tools/generic_server_wrapper.h developer_tools/server/include/triton/developer_tools/common.h
32
+ # ./CppSharp/bin/Release_x64/CppSharp.CLI -m tritondevelopertoolsserver -g csharp -p linux -a x64 -o ./variant3/ -I=developer_tools/server/include -I=core/include -I=developer_tools/server/include/triton/developer_tools developer_tools/server/include/triton/developer_tools/server_wrapper.h developer_tools/server/include/triton/developer_tools/generic_server_wrapper.h developer_tools/server/include/triton/developer_tools/common.h
33
33
34
- # - name: Variant 2
35
- # run: |
36
- # echo '<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup><RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory><OutputType>Exe</OutputType><TargetFramework>net8.0</TargetFramework><EnableDefaultItems>false</EnableDefaultItems></PropertyGroup><ItemGroup><Compile Remove="**/*.cs"/><Compile Include="tritonservercppsharp.cs"/><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Runtime.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.AST.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Generator.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.CLI.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Parser.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Parser.CSharp.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Parser.Bootstrap.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Parser.Gen.dll</HintPath></Reference></ItemGroup></Project>' > tritonservercppsharp.csproj
37
- # tee tritonservercppsharp.cs <<EOF
38
- # namespace CppSharpTransformer { public class DllDemoGenerator : CppSharp.ILibrary {
39
- # public static void Main(string[] args) { CppSharp.ConsoleDriver.Run(new DllDemoGenerator()); }
40
- # public void SetupPasses(CppSharp.Driver driver) { }
41
- # public void Preprocess(CppSharp.Driver driver, CppSharp.AST.ASTContext ctx) { }
42
- # public void Postprocess(CppSharp.Driver driver, CppSharp.AST.ASTContext ctx) { }
43
- # public void Setup(CppSharp.Driver driver) {
44
- # var options = driver.Options;
45
- # options.GeneratorKind = CppSharp.Generators.GeneratorKind.CSharp;
46
- # var module = options.AddModule("tritonserver");
47
- # options.OutputDir = "variant2";
48
- # module.IncludeDirs.Add(".");
49
- # module.IncludeDirs.Add("core/include");
50
- # module.Headers.Add("core/include/triton/core/tritonserver.h");
51
- # module.Headers.Add("core/include/triton/core/tritonbackend.h");
52
- # module.Headers.Add("core/include/triton/core/tritoncache.h");
53
- # module.Headers.Add("core/include/triton/core/tritonrepoagent.h");
54
- # //module.LibraryDirs.Add("/path/to/triton/server.so");
55
- # //module.Libraries.Add("tritonserver.so");
56
- # } } }
57
- # EOF
58
- #
59
- # mkdir -p bin/x64/Release/$FRAMEWORKDOT && cp -r ./CppSharp/bin/Release_x64/lib bin/x64/Release/$FRAMEWORKDOT/lib
60
- # LD_PRELOAD=$PWD/CppSharp/bin/Release_x64/libCppSharp.CppParser.so:$PWD/CppSharp/bin/Release_x64/libStd-symbols.so dotnet run -c Release
61
- #
62
- #
63
- # - uses: actions/upload-artifact@v4
64
- # with:
65
- # path: |
66
- # variant1/
67
- # variant2/
68
- # variant3/
34
+ - name : Variant 2
35
+ run : |
36
+ echo '<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup><RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory><OutputType>Exe</OutputType><TargetFramework>net8.0</TargetFramework><EnableDefaultItems>false</EnableDefaultItems></PropertyGroup><ItemGroup><Compile Remove="**/*.cs"/><Compile Include="tritonservercppsharp.cs"/><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Runtime.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.AST.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Generator.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.CLI.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Parser.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Parser.CSharp.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Parser.Bootstrap.dll</HintPath></Reference><Reference Include="MyAssembly"><HintPath>./CppSharp/bin/Release_x64/CppSharp.Parser.Gen.dll</HintPath></Reference></ItemGroup></Project>' > tritonservercppsharp.csproj
37
+ tee tritonservercppsharp.cs <<EOF
38
+ namespace CppSharpTransformer { public class DllDemoGenerator : CppSharp.ILibrary {
39
+ public static void Main(string[] args) { CppSharp.ConsoleDriver.Run(new DllDemoGenerator()); }
40
+ public void SetupPasses(CppSharp.Driver driver) { }
41
+ public void Preprocess(CppSharp.Driver driver, CppSharp.AST.ASTContext ctx) { }
42
+ public void Postprocess(CppSharp.Driver driver, CppSharp.AST.ASTContext ctx) { }
43
+ public void Setup(CppSharp.Driver driver) {
44
+ var options = driver.Options;
45
+ options.GeneratorKind = CppSharp.Generators.GeneratorKind.CSharp;
46
+ var module = options.AddModule("tritonserver");
47
+ options.OutputDir = "variant2";
48
+ module.IncludeDirs.Add(".");
49
+ module.IncludeDirs.Add("core/include");
50
+ module.Headers.Add("core/include/triton/core/tritonserver.h");
51
+ module.Headers.Add("core/include/triton/core/tritonbackend.h");
52
+ module.Headers.Add("core/include/triton/core/tritoncache.h");
53
+ module.Headers.Add("core/include/triton/core/tritonrepoagent.h");
54
+ //module.LibraryDirs.Add("/path/to/triton/server.so");
55
+ //module.Libraries.Add("tritonserver.so");
56
+ } } }
57
+ EOF
58
+
59
+ mkdir -p bin/x64/Release/$FRAMEWORKDOT && cp -r ./CppSharp/bin/Release_x64/lib bin/x64/Release/$FRAMEWORKDOT/lib
60
+ LD_PRELOAD=$PWD/CppSharp/bin/Release_x64/libCppSharp.CppParser.so:$PWD/CppSharp/bin/Release_x64/libStd-symbols.so dotnet run -c Release
61
+
62
+
63
+ - uses : actions/upload-artifact@v4
64
+ with :
65
+ path : |
66
+ variant1/
67
+ variant2/
0 commit comments