diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a45f6c..a39ed0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,23 @@ on: workflow_dispatch: jobs: - build: + linux-build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Build project + run: ./_build.sh + + - name: Run project + run: ./_run.sh + + windows-build: runs-on: windows-latest steps: diff --git a/Bootstrapper/build.sh b/Bootstrapper/build.sh new file mode 100755 index 0000000..e9e622b --- /dev/null +++ b/Bootstrapper/build.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +set -ex + +mkdir -p build && cd build + +cmake .. +cmake --build . --config Release diff --git a/DemoApplication/build.sh b/DemoApplication/build.sh new file mode 100755 index 0000000..df7aabd --- /dev/null +++ b/DemoApplication/build.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +set -ex +dotnet publish -c Release -r linux-x64 -p:PublishDir="$(pwd)/dist" --self-contained diff --git a/RuntimePatcher/build.sh b/RuntimePatcher/build.sh new file mode 100755 index 0000000..f7ee41a --- /dev/null +++ b/RuntimePatcher/build.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +set -ex +dotnet publish -c Release -p:PublishDir="$(pwd)/dist" diff --git a/_build.sh b/_build.sh new file mode 100755 index 0000000..e85cb1a --- /dev/null +++ b/_build.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -ex + +npm install + +cd Bootstrapper +./build.sh +cd .. + +cd DemoApplication +./build.sh +cd .. + +cd RuntimePatcher +./build.sh +cd .. diff --git a/_run.sh b/_run.sh new file mode 100755 index 0000000..d260a66 --- /dev/null +++ b/_run.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +set -ex + +sudo sysctl kernel.yama.ptrace_scope=0 +./DemoApplication/dist/DemoApplication & +npm start -- inject \ +DemoApplication \ +Bootstrapper/build/libBootstrapper.so \ +RuntimePatcher/dist/RuntimePatcher.runtimeconfig.json \ +RuntimePatcher/dist/RuntimePatcher.dll \ +"RuntimePatcher.Main, RuntimePatcher" "InitializePatches"