From 271261307df1d65f5f7fa41913f7726931e096ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20A?= Date: Sun, 5 May 2024 19:27:18 -0400 Subject: [PATCH] actions: Update dotnet.yml (#73) Add support for C/C++ in the pipeline and upload the newer igcs connector. It was necessary to create two different build scripts because for some reason when you install the msvc compiler in a github action everything Just Breaks. Then we create two different jobs to make sure they're independent instances of containers that don't mess with other's environments. --- .github/workflows/dotnet.yml | 28 +++++++++++++++++++++++++++- build.ps1 | 5 +---- build_connector.ps1 | 3 +++ 3 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 build_connector.ps1 diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index d2dca68..258b6c3 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -8,7 +8,7 @@ on: workflow_dispatch: jobs: - build: + build_dotnet: runs-on: windows-latest if: "!contains(github.event.head_commit.message, '-noci')" @@ -105,3 +105,29 @@ jobs: with: name: CinematicUnityExplorer.Editor.zip path: ./UnityEditorPackage/ + + + build_connector: + runs-on: windows-latest + if: "!contains(github.event.head_commit.message, '-noci')" + + steps: + - name: Checkout latest + uses: actions/checkout@v3 + with: + submodules: true + + - name: Setup C/C++ + uses: TheMrMilchmann/setup-msvc-dev@v3.0.0 + with: + arch: x64 + + # Run build script + - name: Build Unity IGCS Connector + run: ./build_connector.ps1 + + - name: Upload Unity IGCS Connector + uses: actions/upload-artifact@v3 + with: + name: UnityIGCSConnector.dll + path: ./Release/UnityIGCSConnector.dll diff --git a/build.ps1 b/build.ps1 index 625baf8..e151b63 100644 --- a/build.ps1 +++ b/build.ps1 @@ -2,9 +2,6 @@ cd UniverseLib .\build.ps1 cd .. -# ----------- Build UnityIGCSConnector ------------ -msbuild.exe UnityIGCSConnector/UnityIGCSConnector.sln -p:Configuration=Release - # ----------- MelonLoader IL2CPP (net6) ----------- dotnet build src/CinematicUnityExplorer.sln -c Release_ML_Cpp_net6preview $Path = "Release\CinematicUnityExplorer.MelonLoader.IL2CPP.net6preview" @@ -217,4 +214,4 @@ $Path2 = "UnityEditorPackage/Runtime" Copy-Item $Path1/CinematicUnityExplorer.STANDALONE.Mono.dll -Destination $Path2 Copy-Item $Path1/UniverseLib.Mono.dll -Destination $Path2 Remove-Item Release/CinematicUnityExplorer.Editor.zip -ErrorAction SilentlyContinue -compress-archive .\UnityEditorPackage\* Release/CinematicUnityExplorer.Editor.zip \ No newline at end of file +compress-archive .\UnityEditorPackage\* Release/CinematicUnityExplorer.Editor.zip diff --git a/build_connector.ps1 b/build_connector.ps1 new file mode 100644 index 0000000..2a7957b --- /dev/null +++ b/build_connector.ps1 @@ -0,0 +1,3 @@ +# ----------- Build UnityIGCSConnector ------------ +msbuild.exe UnityIGCSConnector/UnityIGCSConnector.sln -p:Configuration=Release +