make #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: make | |
on: workflow_dispatch | |
env: | |
PLATFORM: x64 | |
jobs: | |
make: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Test heredoc | |
run: | | |
tee myfile.cs <<EOF | |
These contents will be written to the file. | |
This line is indented. | |
EOF | |
cat myfile.cs | |
- name: Clone and build CppSharp | |
run: | | |
#wget https://dot.net/v1/dotnet-install.sh && bash dotnet-install.sh --channel 9.0 | |
git clone --single-branch --depth 1 https://github.com/mono/CppSharp | |
cd CppSharp | |
bash build/build.sh generate -configuration Release -platform $PLATFORM | |
bash build/build.sh download_llvm -platform $PLATFORM | |
bash build/build.sh restore -platform $PLATFORM | |
bash build/build.sh -platform $PLATFORM -build_only | |
find bin | |
dotnet --version | |
- name: Generating bindings | |
run: | | |
./CppSharp/bin/Release_x64/CLI.Gen | |
git clone --single-branch --depth 1 https://github.com/triton-inference-server/core | |
#"$HOME/.dotnet" | |
DOTNET_ROOT=/usr/share/dotnet | |
DOTNETSDKVER=$(dotnet --version) | |
DOTNETFWKVER=$(dotnet --list-runtimes | grep Microsoft.NETCore.App | tail -n 1 | cut -d " " -f2) | |
DOTNETLIBDIR="$DOTNET_ROOT/shared/Microsoft.NETCore.App/$DOTNETFWKVER" | |
LD_LIBRARY_PATH=CppSharp/bin/Release_x64/ dotnet "$DOTNET_ROOT/sdk/$DOTNETSDKVER/Roslyn/bincore/csc.dll" -r:CppSharp/bin/Release_x64/CppSharp.AST.dll -r:CppSharp/bin/Release_x64/CLI.Gen.dll -r:CppSharp/bin/Release_x64/CppSharp.dll -r:CppSharp/bin/Release_x64/CppSharp.Parser.dll $(find "$DOTNETLIBDIR" -name "*.dll" -printf '-r:"%p" ') -target:library -out:tritonservercppsharp.exe tritonservercppsharp.cs | |
dotnet tritonservercppsharp.exe | |
# - uses: actions/upload-artifact@v4 | |
# with: | |
# path: archive.zip |