Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/job-cmakebuild-macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ jobs:
uses: actions/checkout@v4

- name: CMake Build
run: .\Scripts\BuildEngine.ps1 -Configurations ${{inputs.configuration}} -RunClangFormat 0
run: .\Scripts\BuildEngine.ps1 -Configurations ${{inputs.configuration}} -Architecture ${{inputs.architecture}} -RunClangFormat 0
shell: pwsh

- name: Publish Build Artifacts
uses: actions/upload-artifact@v4
with:
name: Build-macOS-${{ inputs.architecture }}-${{inputs.configuration}}
path: |
Result.Darwin.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/osx-${{ inputs.architecture }}/publish/
Result.Darwin.x64.${{inputs.configuration}}/__externals/Vulkan-Loader/loader/${{ inputs.configuration }}/
Result.Darwin.x64.${{inputs.configuration}}/ZEngine/tests/${{inputs.configuration}}/
!Result.Darwin.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.CSharp.resources.dll
!Result.Darwin.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.CSharp.Scripting.resources.dll
!Result.Darwin.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.resources.dll
!Result.Darwin.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.Scripting.resources.dll
Result.Darwin.${{inputs.architecture}}.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/osx-${{ inputs.architecture }}/publish/
Result.Darwin.${{inputs.architecture}}.${{inputs.configuration}}/__externals/Vulkan-Loader/loader/${{ inputs.configuration }}/
Result.Darwin.${{inputs.architecture}}.${{inputs.configuration}}/ZEngine/tests/${{inputs.configuration}}/
!Result.Darwin.${{inputs.architecture}}.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.CSharp.resources.dll
!Result.Darwin.${{inputs.architecture}}.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.CSharp.Scripting.resources.dll
!Result.Darwin.${{inputs.architecture}}.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.resources.dll
!Result.Darwin.${{inputs.architecture}}.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.Scripting.resources.dll
9 changes: 4 additions & 5 deletions .github/workflows/job-cmakebuild-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ jobs:
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/createdump.exe

- name: Publish Vulkan Build Artifacts
if: ${{ inputs.configuration == 'Release'}}
uses: actions/upload-artifact@v4
with:
name: Vulkan-build-x64-release
name: Vulkan-build-x64-${{inputs.configuration}}
path: |
Result.Windows.x64.MultiConfig/__externals/Vulkan-Loader/loader/release/vulkan-1.dll
Result.Windows.x64.MultiConfig/__externals/Vulkan-Loader/loader/release/vulkan-1.exp
Result.Windows.x64.MultiConfig/__externals/Vulkan-Loader/loader/release/vulkan-1.lib
Result.Windows.x64.MultiConfig/__externals/Vulkan-Loader/loader/${{inputs.configuration}}/vulkan-1.dll
Result.Windows.x64.MultiConfig/__externals/Vulkan-Loader/loader/${{inputs.configuration}}/vulkan-1.exp
Result.Windows.x64.MultiConfig/__externals/Vulkan-Loader/loader/${{inputs.configuration}}/vulkan-1.lib
4 changes: 2 additions & 2 deletions .github/workflows/job-deploy-macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
path: Result.Darwin.x64.${{ inputs.configuration }}
path: Result.Darwin.${{ inputs.architecture }}.${{ inputs.configuration }}
name: Build-macOS-${{ inputs.architecture }}-Release

- name: Publish Artifacts
uses: actions/upload-artifact@v4
with:
name: macOS-${{ inputs.architecture }}-${{ inputs.configuration }}
path: Result.Darwin.x64.${{ inputs.configuration }}/Panzerfaust/${{ inputs.configuration }}/${{inputs.targetFramework}}/osx-${{ inputs.architecture }}/publish/
path: Result.Darwin.${{inputs.architecture}}.${{ inputs.configuration }}/Panzerfaust/${{ inputs.configuration }}/${{inputs.targetFramework}}/osx-${{ inputs.architecture }}/publish/
6 changes: 3 additions & 3 deletions .github/workflows/job-test-macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
uses: actions/download-artifact@v4
with:
name: Build-macOS-${{ inputs.architecture }}-${{ inputs.configuration }}
path: Result.Darwin.x64.${{ inputs.configuration }}
path: Result.Darwin.${{inputs.architecture}}.${{ inputs.configuration }}

- name: Update access permission of ZEngineTests
run: chmod +x ./Result.Darwin.x64.${{ inputs.configuration }}/ZEngine/tests/${{ inputs.configuration }}/ZEngineTests
run: chmod +x ./Result.Darwin.${{inputs.architecture}}.${{ inputs.configuration }}/ZEngine/tests/${{ inputs.configuration }}/ZEngineTests

- name: Run Tests
run: .\Scripts\RunTests.ps1 -Configurations ${{ inputs.configuration }}
run: .\Scripts\RunTests.ps1 -Configurations ${{ inputs.configuration }} -Architecture ${{ inputs.architecture }}
shell: pwsh
2 changes: 1 addition & 1 deletion .github/workflows/job-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: actions/download-artifact@v4
with:
path: vulkan-build
name: Vulkan-build-x64-release
name: Vulkan-build-x64-${{inputs.configuration}}

- name: Run Tests
shell: pwsh
Expand Down
18 changes: 8 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ endif()
# Externals dependencies
#
if (NOT LAUNCHER_ONLY)
add_subdirectory (${EXTERNAL_DIR}/Vulkan-Headers)
add_subdirectory (${EXTERNAL_DIR}/Vulkan-Loader)
add_subdirectory (${EXTERNAL_DIR}/fmt)
add_subdirectory (${EXTERNAL_DIR}/imgui)
add_subdirectory (${EXTERNAL_DIR}/glfw)
Expand All @@ -59,12 +61,8 @@ if (NOT LAUNCHER_ONLY)
add_subdirectory (${EXTERNAL_DIR}/tlsf)
add_subdirectory (${EXTERNAL_DIR}/rapidhash)
add_subdirectory (${EXTERNAL_DIR}/CLI11)
add_subdirectory (${EXTERNAL_DIR}/nlohmann_json)

set (CMAKE_PREFIX_PATH
${CMAKE_PREFIX_PATH}
${EXTERNAL_DIR}/Vulkan-Headers/build/install/share/cmake
)
add_subdirectory (${EXTERNAL_DIR}/Vulkan-Loader)

# Core engine lib is here
#
Expand All @@ -91,20 +89,20 @@ endif ()
#
set (SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set (SYSTEM_ARCHITECTURE "win-x64")
set (SYSTEM_ARCHITECTURE "x64")
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set (SYSTEM_ARCHITECTURE "linux-x64")
set (SYSTEM_ARCHITECTURE "x64")
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
if (MACOSX_ARCHITECTURE_ARM64)
set (SYSTEM_ARCHITECTURE "osx-arm64")
set (SYSTEM_ARCHITECTURE "arm64")
else ()
set (SYSTEM_ARCHITECTURE "osx-x64")
set (SYSTEM_ARCHITECTURE "x64")
endif ()
endif ()

add_custom_target (AssembleContent ALL
COMMENT "Copying assets and resources contents"
COMMAND pwsh ${CMAKE_CURRENT_SOURCE_DIR}/Scripts/PostBuild.ps1 -SystemName ${SYSTEM_NAME} -Architectures ${SYSTEM_ARCHITECTURE} -Configurations $<IF:$<CONFIG:Debug>,Debug,Release> $<$<BOOL:${LAUNCHER_ONLY}>:-LauncherOnly>
COMMAND pwsh ${CMAKE_CURRENT_SOURCE_DIR}/Scripts/PostBuild.ps1 -SystemName ${SYSTEM_NAME} -Architecture ${SYSTEM_ARCHITECTURE} -Configurations $<IF:$<CONFIG:Debug>,Debug,Release> $<$<BOOL:${LAUNCHER_ONLY}>:-LauncherOnly>
)

if (NOT LAUNCHER_ONLY)
Expand Down
180 changes: 180 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
{
"version": 10,
"cmakeMinimumRequired": {
"major": 3,
"minor": 23,
"patch": 0
},
"configurePresets":[
{
"name": "BaseOptions",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",

"VULKAN_HEADERS_ENABLE_INSTALL": "ON",
"ENTT_INCLUDE_HEADERS": "ON",

"SPDLOG_BUILD_SHARED": "OFF",
"SPDLOG_FMT_EXTERNAL": "ON",
"SPDLOG_FMT_EXTERNAL_HO": "OFF",

"GLFW_BUILD_DOCS": "OFF",
"GLFW_BUILD_EXAMPLES": "OFF",
"GLFW_INSTALL": "OFF",

"ASSIMP_BUILD_TESTS": "OFF",
"ASSIMP_INSTALL": "OFF",
"ASSIMP_BUILD_SAMPLES": "OFF",
"ASSIMP_BUILD_ASSIMP_TOOLS": "OFF",
"ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT": "OFF",
"ASSIMP_BUILD_OBJ_IMPORTER": "ON",
"ASSIMP_BUILD_ALL_EXPORTERS_BY_DEFAULT": "OFF",
"ASSIMP_BUILD_OBJ_EXPORTER": "ON",

"UUID_BUILD_TESTS": "OFF",
"UUID_USING_CXX20_SPAN": "ON",
"UUID_SYSTEM_GENERATOR": "OFF",

"YAML_CPP_BUILD_TOOLS": "OFF",
"YAML_CPP_BUILD_TESTS": "OFF",
"YAML_CPP_FORMAT_SOURCE": "OFF",
"YAML_BUILD_SHARED_LIBS": "OFF",

"USE_MASM": "OFF",
"USE_GAS": "OFF",

"SPIRV_SKIP_EXECUTABLES": "ON",
"SPIRV_SKIP_TESTS": "ON",
"GLSLANG_ENABLE_INSTALL": "ON",
"ALLOW_EXTERNAL_SPIRV_TOOLS": "OFF",

"SPIRV_CROSS_ENABLE_TESTS": "OFF",
"CMAKE_POLICY_VERSION_MINIMUM": "3.5"
}
},
{
"name": "Windows_x64_Debug",
"inherits": "BaseOptions",
"displayName": "Windows Visual Studio Debug",
"generator": "Visual Studio 17 2022",
"binaryDir": "Result.Windows.x64.MultiConfig",
"architecture": "x64",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_CONFIGURATION_TYPES": "Debug"
}

},
{
"name": "Windows_x64_Release",
"displayName": "Windows Visual Studio Release",
"inherits": "Windows_x64_Debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_CONFIGURATION_TYPES": "Release"
}
},

{
"name": "Darwin_x64_Debug",
"inherits": "BaseOptions",
"displayName": "Darwin XCode Debug",
"binaryDir": "Result.Darwin.x64.Debug",
"generator": "Xcode",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

architecture missing ?

"cacheVariables": {
"BUILD_FRAMEWORK": "ON"
}
},
{
"name": "Darwin_x64_Release",
"inherits": "Darwin_x64_Debug",
"displayName": "Darwin XCode Release",
"binaryDir": "Result.Darwin.x64.Release",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},

{
"name": "Darwin_arm64_Debug",
"inherits": "Darwin_x64_Debug",
"binaryDir": "Result.Darwin.arm64.Debug",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

architecture missing ?

"displayName": "Darwin ARM XCode Debug"
},

{
"name": "Darwin_arm64_Release",
"inherits": "Darwin_x64_Release",
"binaryDir": "Result.Darwin.arm64.Release",
"displayName": "Darwin ARM XCode Release"
},

{
"name": "Linux_x64_Debug",
"inherits": "BaseOptions",
"displayName": "Linux Ninja Debug",
"binaryDir": "Result.Linux.x64.Debug",
"generator": "Ninja"
},
{
"name": "Linux_x64_Release",
"inherits": "Linux_x64_Debug",
"displayName": "Linux Ninja Release",
"binaryDir": "Result.Linux.x64.Release",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
}
],

"buildPresets": [
{
"name": "Windows_x64_Debug",
"configurePreset": "Windows_x64_Debug",
"configuration": "Debug",
"nativeToolOptions": [
"-nodeReuse:false"
]
},
{
"name": "Windows_x64_Release",
"configurePreset": "Windows_x64_Release",
"configuration": "Release",
"nativeToolOptions": [
"-nodeReuse:false"
]
},

{
"name": "Darwin_x64_Debug",
"configuration": "Debug",
"configurePreset": "Darwin_x64_Debug"
},
{
"name": "Darwin_x64_Release",
"configuration": "Release",
"configurePreset": "Darwin_x64_Release"
},

{
"name": "Darwin_arm64_Debug",
"configuration": "Debug",
"configurePreset": "Darwin_arm64_Debug"
},
{
"name": "Darwin_arm64_Release",
"configuration": "Release",
"configurePreset": "Darwin_arm64_Release"
},

{
"name": "Linux_x64_Debug",
"configurePreset": "Linux_x64_Debug"
},
{
"name": "Linux_x64_Release",
"configurePreset": "Linux_x64_Release"
}
]
}
Loading
Loading