diff --git a/.github/workflows/nonunity-build.yml b/.github/workflows/nonunity-build.yml new file mode 100644 index 0000000000..54812af79b --- /dev/null +++ b/.github/workflows/nonunity-build.yml @@ -0,0 +1,72 @@ +name: 'Non-Unity build' + +on: + push: + branches: + - '**' + paths: + - '.github/workflows/**' + - 'gamedata/**' + - 'sdk/**' + - 'src/**' + - '**/CMakeLists.txt' + - '**/*.ltx' + - '**/*.json' + pull_request: + branches: + - '**' + paths: + - '.github/workflows/**' + - 'gamedata/**' + - 'sdk/**' + - 'src/**' + - '**/CMakeLists.txt' + - '**/*.ltx' + - '**/*.json' + +defaults: + run: + shell: pwsh + +jobs: + build-engine: + name: 'Build engine' + + strategy: + matrix: + system: + - windows-2022 + preset: + - Engine + platform: + - x86 + - x64 + config: + - Debug + - RelWithDebInfo + - Release + + runs-on: ${{ matrix.system }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Cache dependencies + uses: actions/cache@v4 + with: + key: ${{ matrix.preset }}-NuGet- + restore-keys: | + ${{ matrix.preset }}-NuGet- + path: | + ~/.nuget/packages + + - name: Configure engine + run: | + cmake --preset ${{ matrix.preset }}-${{ matrix.platform }}-NonUnity + + - name: Build engine + run: | + cmake --build --preset ${{ matrix.preset }}-${{ matrix.platform }}-NonUnity-${{ matrix.config }} diff --git a/CMakePresets.json b/CMakePresets.json index e5af52ef07..35a539b0f8 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -19,7 +19,8 @@ "IXRAY_PLUGIN_LW": "OFF", "IXRAY_ASAN": "OFF", "IXRAY_USE_R1": "ON", - "IXRAY_USE_R2": "ON" + "IXRAY_USE_R2": "ON", + "IXRAY_UNITYBUILD": "ON" } }, { @@ -45,6 +46,46 @@ } }, + { + "name": "Engine-Base-NonUnity", + "displayName": "Engine-Base-NonUnity", + "hidden": true, + "generator": "Visual Studio 17 2022", + "cacheVariables": { + "IXRAY_UTILS": "OFF", + "IXRAY_MP": "OFF", + "IXRAY_COMPRESSOR_ONLY": "OFF", + "IXRAY_PLUGIN_MAX": "OFF", + "IXRAY_PLUGIN_LW": "OFF", + "IXRAY_ASAN": "OFF", + "IXRAY_USE_R1": "ON", + "IXRAY_USE_R2": "ON", + "IXRAY_UNITYBUILD": "OFF" + } + }, + { + "name": "Engine-x86-NonUnity", + "displayName": "Engine-x86-NonUnity", + "inherits": "Engine-Base-NonUnity", + "binaryDir": "build/x86/Engine-NonUnity", + "vendor": { + "microsoft.com/VisualStudioSettings/CMake/1.0": { + "intelliSenseMode": "windows-msvc-x86" + } + } + }, + { + "name": "Engine-x64-NonUnity", + "displayName": "Engine-x64-NonUnity", + "inherits": "Engine-Base-NonUnity", + "binaryDir": "build/x64/Engine-NonUnity", + "vendor": { + "microsoft.com/VisualStudioSettings/CMake/1.0": { + "intelliSenseMode": "windows-msvc-x64" + } + } + }, + { "name": "Server-Base", "displayName": "Server-Base", @@ -58,7 +99,8 @@ "IXRAY_PLUGIN_LW": "OFF", "IXRAY_ASAN": "OFF", "IXRAY_USE_R1": "ON", - "IXRAY_USE_R2": "ON" + "IXRAY_USE_R2": "ON", + "IXRAY_UNITYBUILD": "ON" } }, { @@ -256,6 +298,43 @@ "configuration": "Release" }, + { + "name": "Engine-x86-NonUnity-Debug", + "displayName": "Engine-x86-NonUnity-Debug", + "configurePreset": "Engine-x86-NonUnity", + "configuration": "Debug" + }, + { + "name": "Engine-x86-NonUnity-RelWithDebInfo", + "displayName": "Engine-x86-NonUnity-RelWithDebInfo", + "configurePreset": "Engine-x86-NonUnity", + "configuration": "RelWithDebInfo" + }, + { + "name": "Engine-x86-NonUnity-Release", + "displayName": "Engine-x86-NonUnity-Release", + "configurePreset": "Engine-x86-NonUnity", + "configuration": "Release" + }, + { + "name": "Engine-x64-NonUnity-Debug", + "displayName": "Engine-x64-NonUnity-Debug", + "configurePreset": "Engine-x64-NonUnity", + "configuration": "Debug" + }, + { + "name": "Engine-x64-NonUnity-RelWithDebInfo", + "displayName": "Engine-x64-NonUnity-RelWithDebInfo", + "configurePreset": "Engine-x64-NonUnity", + "configuration": "RelWithDebInfo" + }, + { + "name": "Engine-x64-NonUnity-Release", + "displayName": "Engine-x64-NonUnity-Release", + "configurePreset": "Engine-x64-NonUnity", + "configuration": "Release" + }, + { "name": "Server-x86-Debug", "displayName": "Server-x86-Debug", diff --git a/CMakeSettings.json b/CMakeSettings.json index 5e91e9e73d..636d70910f 100644 --- a/CMakeSettings.json +++ b/CMakeSettings.json @@ -47,6 +47,11 @@ "name": "IXRAY_USE_R2", "value": "True", "type": "BOOL" + }, + { + "name": "IXRAY_UNITYBUILD", + "value": "True", + "type": "BOOL" } ] }, @@ -97,6 +102,11 @@ "name": "IXRAY_USE_R2", "value": "True", "type": "BOOL" + }, + { + "name": "IXRAY_UNITYBUILD", + "value": "True", + "type": "BOOL" } ] }, @@ -147,6 +157,11 @@ "name": "IXRAY_USE_R2", "value": "True", "type": "BOOL" + }, + { + "name": "IXRAY_UNITYBUILD", + "value": "True", + "type": "BOOL" } ] }, @@ -197,6 +212,11 @@ "name": "IXRAY_USE_R2", "value": "True", "type": "BOOL" + }, + { + "name": "IXRAY_UNITYBUILD", + "value": "True", + "type": "BOOL" } ] }, @@ -247,6 +267,11 @@ "name": "IXRAY_USE_R2", "value": "True", "type": "BOOL" + }, + { + "name": "IXRAY_UNITYBUILD", + "value": "True", + "type": "BOOL" } ] }, @@ -297,6 +322,341 @@ "name": "IXRAY_USE_R2", "value": "True", "type": "BOOL" + }, + { + "name": "IXRAY_UNITYBUILD", + "value": "True", + "type": "BOOL" + } + ] + }, + { + "name": "Engine-x86-NonUnity-Debug", + "generator": "Visual Studio 17 2022", + "configurationType": "Debug", + "inheritEnvironments": [ "msvc_x86_x64" ], + "buildRoot": "${projectDir}\\build\\Win32\\Engine-NonUnity", + "installRoot": "${projectDir}\\install\\Win32\\Engine-NonUnity", + "variables": [ + { + "name": "IXRAY_UTILS", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_MP", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_COMPRESSOR_ONLY", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_PLUGIN_MAX", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_PLUGIN_LW", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_ASAN", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_USE_R1", + "value": "True", + "type": "BOOL" + }, + { + "name": "IXRAY_USE_R2", + "value": "True", + "type": "BOOL" + }, + { + "name": "IXRAY_UNITYBUILD", + "value": "False", + "type": "BOOL" + } + ] + }, + { + "name": "Engine-x86-NonUnity-Mixed", + "generator": "Visual Studio 17 2022", + "configurationType": "RelWithDebInfo", + "inheritEnvironments": [ "msvc_x86_x64" ], + "buildRoot": "${projectDir}\\build\\Win32\\Engine-NonUnity", + "installRoot": "${projectDir}\\install\\Win32\\Engine-NonUnity", + "variables": [ + { + "name": "IXRAY_UTILS", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_MP", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_COMPRESSOR_ONLY", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_PLUGIN_MAX", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_PLUGIN_LW", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_ASAN", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_USE_R1", + "value": "True", + "type": "BOOL" + }, + { + "name": "IXRAY_USE_R2", + "value": "True", + "type": "BOOL" + }, + { + "name": "IXRAY_UNITYBUILD", + "value": "False", + "type": "BOOL" + } + ] + }, + { + "name": "Engine-x86-NonUnity-Release", + "generator": "Visual Studio 17 2022", + "configurationType": "Release", + "inheritEnvironments": [ "msvc_x86_x64" ], + "buildRoot": "${projectDir}\\build\\Win32\\Engine-NonUnity", + "installRoot": "${projectDir}\\install\\Win32\\Engine-NonUnity", + "variables": [ + { + "name": "IXRAY_UTILS", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_MP", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_COMPRESSOR_ONLY", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_PLUGIN_MAX", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_PLUGIN_LW", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_ASAN", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_USE_R1", + "value": "True", + "type": "BOOL" + }, + { + "name": "IXRAY_USE_R2", + "value": "True", + "type": "BOOL" + }, + { + "name": "IXRAY_UNITYBUILD", + "value": "False", + "type": "BOOL" + } + ] + }, + { + "name": "Engine-x64-NonUnity-Debug", + "generator": "Visual Studio 17 2022 Win64", + "configurationType": "Debug", + "inheritEnvironments": [ "msvc_x64_x64" ], + "buildRoot": "${projectDir}\\build\\x64\\Engine-NonUnity", + "installRoot": "${projectDir}\\install\\x64\\Engine-NonUnity", + "variables": [ + { + "name": "IXRAY_UTILS", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_MP", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_COMPRESSOR_ONLY", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_PLUGIN_MAX", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_PLUGIN_LW", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_ASAN", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_USE_R1", + "value": "True", + "type": "BOOL" + }, + { + "name": "IXRAY_USE_R2", + "value": "True", + "type": "BOOL" + }, + { + "name": "IXRAY_UNITYBUILD", + "value": "False", + "type": "BOOL" + } + ] + }, + { + "name": "Engine-x64-NonUnity-Mixed", + "generator": "Visual Studio 17 2022 Win64", + "configurationType": "RelWithDebInfo", + "inheritEnvironments": [ "msvc_x64_x64" ], + "buildRoot": "${projectDir}\\build\\x64\\Engine-NonUnity", + "installRoot": "${projectDir}\\install\\x64\\Engine-NonUnity", + "variables": [ + { + "name": "IXRAY_UTILS", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_MP", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_COMPRESSOR_ONLY", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_PLUGIN_MAX", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_PLUGIN_LW", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_ASAN", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_USE_R1", + "value": "True", + "type": "BOOL" + }, + { + "name": "IXRAY_USE_R2", + "value": "True", + "type": "BOOL" + }, + { + "name": "IXRAY_UNITYBUILD", + "value": "False", + "type": "BOOL" + } + ] + }, + { + "name": "Engine-x64-NonUnity-Release", + "generator": "Visual Studio 17 2022 Win64", + "configurationType": "Release", + "inheritEnvironments": [ "msvc_x64_x64" ], + "buildRoot": "${projectDir}\\build\\x64\\Engine-NonUnity", + "installRoot": "${projectDir}\\install\\x64\\Engine-NonUnity", + "variables": [ + { + "name": "IXRAY_UTILS", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_MP", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_COMPRESSOR_ONLY", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_PLUGIN_MAX", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_PLUGIN_LW", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_ASAN", + "value": "False", + "type": "BOOL" + }, + { + "name": "IXRAY_USE_R1", + "value": "True", + "type": "BOOL" + }, + { + "name": "IXRAY_USE_R2", + "value": "True", + "type": "BOOL" + }, + { + "name": "IXRAY_UNITYBUILD", + "value": "False", + "type": "BOOL" } ] }, @@ -347,6 +707,11 @@ "name": "IXRAY_USE_R2", "value": "True", "type": "BOOL" + }, + { + "name": "IXRAY_UNITYBUILD", + "value": "True", + "type": "BOOL" } ] }, @@ -397,6 +762,11 @@ "name": "IXRAY_USE_R2", "value": "True", "type": "BOOL" + }, + { + "name": "IXRAY_UNITYBUILD", + "value": "True", + "type": "BOOL" } ] }, @@ -447,6 +817,11 @@ "name": "IXRAY_USE_R2", "value": "True", "type": "BOOL" + }, + { + "name": "IXRAY_UNITYBUILD", + "value": "True", + "type": "BOOL" } ] }, @@ -497,6 +872,11 @@ "name": "IXRAY_USE_R2", "value": "True", "type": "BOOL" + }, + { + "name": "IXRAY_UNITYBUILD", + "value": "True", + "type": "BOOL" } ] }, @@ -547,6 +927,11 @@ "name": "IXRAY_USE_R2", "value": "True", "type": "BOOL" + }, + { + "name": "IXRAY_UNITYBUILD", + "value": "True", + "type": "BOOL" } ] }, @@ -597,6 +982,11 @@ "name": "IXRAY_USE_R2", "value": "True", "type": "BOOL" + }, + { + "name": "IXRAY_UNITYBUILD", + "value": "True", + "type": "BOOL" } ] },