Skip to content
Draft
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
18 changes: 7 additions & 11 deletions .github/workflows/job-cmakebuild-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ jobs:
chmod +x llvm.sh
sudo ./llvm.sh 20

- name: Update the list of packages
- name: Update the list of packages after we added packages.microsoft.com
run: sudo apt-get update

- name: Install Dependencies
run: sudo apt-get install libasound2-dev libgl1-mesa-dev libpulse-dev libdbus-1-dev libx11-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxrandr-dev libxss-dev libxt-dev libxxf86vm-dev cmake apt-transport-https software-properties-common gcc g++ powershell clang-format-20 glslang-tools libwayland-dev libxkbcommon-dev
- name: Install development library
run: sudo apt-get install libasound2-dev libgl1-mesa-dev libpulse-dev libdbus-1-dev libx11-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxrandr-dev libxss-dev libxt-dev libxxf86vm-dev cmake apt-transport-https software-properties-common gcc g++ powershell clang-format-20 libwayland-dev libxkbcommon-dev dotnet-sdk-8.0

- name: CMake Build
run: .\Scripts\BuildEngine.ps1 -Configurations ${{inputs.configuration}}
Expand All @@ -45,11 +44,8 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Build-linux-${{inputs.configuration}}
if-no-files-found: error
path: |
Result.Linux.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/publish/
Result.Linux.x64.${{inputs.configuration}}/__externals/Vulkan-Loader/loader/
Result.Linux.x64.${{inputs.configuration}}/ZEngine/tests/ZEngineTests
Result.Linux.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.CSharp.resources.dll
!Result.Linux.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.CSharp.Scripting.resources.dll
!Result.Linux.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.resources.dll
!Result.Linux.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.Scripting.resources.dll
Result.Linux.x64.${{inputs.configuration}}/bin
Result.Linux.x64.${{inputs.configuration}}/lib/*vulkan*
Result.Linux.x64.${{inputs.configuration}}/tests
11 changes: 4 additions & 7 deletions .github/workflows/job-cmakebuild-macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,8 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Build-macOS-${{ inputs.architecture }}-${{inputs.configuration}}
if-no-files-found: error
path: |
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
Result.Darwin.${{inputs.architecture}}.${{inputs.configuration}}/bin/
Result.Darwin.${{inputs.architecture}}.${{inputs.configuration}}/lib/*vulkan*
Result.Darwin.${{inputs.architecture}}.${{inputs.configuration}}/tests
23 changes: 7 additions & 16 deletions .github/workflows/job-cmakebuild-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#
name: Windows Build Workflow

permissions:
packages: write

on:
workflow_call:
inputs:
Expand All @@ -28,20 +31,8 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Build-Windows-x64-${{inputs.configuration}}
if-no-files-found: error
path: |
Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/win-x64/publish/
Result.Windows.x64.MultiConfig/ZEngine/tests/${{inputs.configuration}}/
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.CSharp.resources.dll
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.CSharp.Scripting.resources.dll
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.resources.dll
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.Scripting.resources.dll
!Result.Windows.x64.MultiConfig/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/createdump.exe

- name: Publish Vulkan Build Artifacts
uses: actions/upload-artifact@v4
with:
name: Vulkan-build-x64-${{inputs.configuration}}
path: |
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
Result.Windows.x64.MultiConfig/bin/
Result.Windows.x64.MultiConfig/lib/*vulkan*
Result.Windows.x64.MultiConfig/tests/ZEngineTests.exe
7 changes: 5 additions & 2 deletions .github/workflows/job-deploy-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
path: Result.Linux.x64.${{ inputs.configuration }}
name: Build-linux-Release
path: Result.Linux.x64.${{ inputs.configuration }}

- name: Publish Artifacts
uses: actions/upload-artifact@v4
with:
name: linux-${{ inputs.configuration }}
path: Result.Linux.x64.${{inputs.configuration}}/Panzerfaust/${{ inputs.configuration }}/${{inputs.targetFramework}}/publish/
if-no-files-found: error
path: |
Result.Linux.x64.${{inputs.configuration}}/bin
Result.Linux.x64.${{inputs.configuration}}/lib
5 changes: 4 additions & 1 deletion .github/workflows/job-deploy-macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: macOS-${{ inputs.architecture }}-${{ inputs.configuration }}
path: Result.Darwin.${{inputs.architecture}}.${{ inputs.configuration }}/Panzerfaust/${{ inputs.configuration }}/${{inputs.targetFramework}}/osx-${{ inputs.architecture }}/publish/
if-no-files-found: error
path: |
Result.Darwin.${{inputs.architecture}}.${{ inputs.configuration }}/bin/
Result.Darwin.${{inputs.architecture}}.${{ inputs.configuration }}/lib/
4 changes: 3 additions & 1 deletion .github/workflows/job-deploy-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: Windows-x64-${{ inputs.configuration }}
path: Result.Windows.x64.MultiConfig/Panzerfaust/${{ inputs.configuration }}/${{inputs.targetFramework}}/win-x64/publish/
if-no-files-found: error
path: |
Result.Windows.x64.MultiConfig/bin
14 changes: 7 additions & 7 deletions .github/workflows/job-test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ on:
configuration:
type: string
default: 'Debug'
architecture:
type: string
default: 'x64'

jobs:
test:
name: test-linux-${{ inputs.configuration }}
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: Build-linux-${{ inputs.configuration }}
path: Result.Linux.x64.${{ inputs.configuration }}

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

- name: Run Tests
run: .\Scripts\RunTests.ps1 -Configurations ${{ inputs.configuration }}
shell: pwsh
env:
LD_LIBRARY_PATH: ${{github.workspace}}/lib
run: ${{github.workspace}}/tests/ZEngineTests
11 changes: 4 additions & 7 deletions .github/workflows/job-test-macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,15 @@ jobs:
name: test-macOS-${{ inputs.architecture }}-${{ inputs.configuration }}
runs-on: ${{ inputs.architecture == 'x64' && 'macos-15-intel' || 'macos-latest' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: Build-macOS-${{ inputs.architecture }}-${{ inputs.configuration }}
path: Result.Darwin.${{inputs.architecture}}.${{ inputs.configuration }}

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

- name: Run Tests
run: .\Scripts\RunTests.ps1 -Configurations ${{ inputs.configuration }} -Architecture ${{ inputs.architecture }}
shell: pwsh
env:
DYLD_LIBRARY_PATH: ${{github.workspace}}/lib
run: ${{github.workspace}}/tests/ZEngineTests
16 changes: 3 additions & 13 deletions .github/workflows/job-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,13 @@ jobs:
name: test-windows-${{ inputs.configuration }}
runs-on: windows-2022
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download All Artifacts
uses: actions/download-artifact@v4
with:
path: Result.Windows.x64.MultiConfig
name: Build-Windows-x64-${{ inputs.configuration }}

- name: Download Vulkan Artifacts
uses: actions/download-artifact@v4
with:
path: vulkan-build
name: Vulkan-build-x64-${{inputs.configuration}}

- name: Run Tests
shell: pwsh
run: |
$env:PATH = ".\vulkan-build\;$env:PATH"
.\Scripts\RunTests.ps1 -Configurations ${{ inputs.configuration }}
env:
PATH: ${{github.workspace}}\lib
run: ${{github.workspace}}\tests\ZEngineTests.exe
7 changes: 2 additions & 5 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,13 @@ jobs:

test:
needs: cmake-build
strategy:
matrix:
testConfiguration: [Debug, Release]
uses: ./.github/workflows/job-test-windows.yml
with:
configuration: ${{matrix.testConfiguration}}
configuration: Release

deploy:
needs: test
uses: ./.github/workflows/job-deploy-windows.yml
with:
configuration: Release
targetFramework: ${{inputs.targetFramework}}
targetFramework: ${{inputs.targetFramework}}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -424,3 +424,6 @@ CMakeSettings.json

# MacOS files
.DS_Store

# Vcpkg Install Directory
vcpkg_installed/
66 changes: 0 additions & 66 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,66 +0,0 @@
[submodule "__externals/fmt"]
path = __externals/fmt
url = https://github.com/fmtlib/fmt
[submodule "__externals/stb"]
path = __externals/stb
url = https://github.com/nothings/stb
[submodule "__externals/imgui/src"]
path = __externals/imgui/src
url = https://github.com/ocornut/imgui
[submodule "__externals/spdlog"]
path = __externals/spdlog
url = https://github.com/gabime/spdlog
[submodule "__externals/glfw"]
path = __externals/glfw
url = https://github.com/glfw/glfw
[submodule "__externals/entt"]
path = __externals/entt
url = https://github.com/skypjack/entt
[submodule "__externals/assimp"]
path = __externals/assimp
url = https://github.com/assimp/assimp
[submodule "__externals/stduuid"]
path = __externals/stduuid
url = https://github.com/mariusbancila/stduuid
[submodule "__externals/yaml-cpp"]
path = __externals/yaml-cpp
url = https://github.com/jbeder/yaml-cpp
[submodule "__externals/ImGuizmo"]
path = __externals/ImGuizmo
url = https://github.com/CedricGuillemet/ImGuizmo
[submodule "__externals/SPIRV-Cross"]
path = __externals/SPIRV-Cross
url = https://github.com/KhronosGroup/SPIRV-Cross
[submodule "__externals/gtest"]
path = __externals/gtest
url = https://github.com/google/googletest
[submodule "__externals/VulkanMemoryAllocator"]
path = __externals/VulkanMemoryAllocator
url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
[submodule "__externals/nlohmann_json"]
path = __externals/nlohmann_json
url = https://github.com/nlohmann/json
[submodule "__externals/glslang"]
path = __externals/glslang
url = https://github.com/khronosGroup/glslang.git
[submodule "__externals/SPIRV-headers"]
path = __externals/SPIRV-headers
url = https://github.com/khronosGroup/SPIRV-headers.git
[submodule "__externals/SPIRV-Tools"]
path = __externals/SPIRV-Tools
url = https://github.com/khronosGroup/SPIRV-Tools
[submodule "__externals/Vulkan-Loader"]
path = __externals/Vulkan-Loader
url = https://github.com/KhronosGroup/Vulkan-Loader
[submodule "__externals/Vulkan-Headers"]
path = __externals/Vulkan-Headers
url = https://github.com/KhronosGroup/Vulkan-Headers
[submodule "__externals/tlsf/src"]
path = __externals/tlsf/src
url = https://github.com/mattconte/tlsf
[submodule "__externals/CLI11"]
path = __externals/CLI11
url = https://github.com/CLIUtils/CLI11
[submodule "__externals/rapidhash/src"]
path = __externals/rapidhash/src
url = https://github.com/Nicoshev/rapidhash
63 changes: 7 additions & 56 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,9 @@ set_property (GLOBAL PROPERTY USE_FOLDERS ON)

# Core invariants
#
get_filename_component (ENLISTMENT_ROOT "." ABSOLUTE CACHE)
get_filename_component (EXTERNAL_DIR "${ENLISTMENT_ROOT}/__externals" ABSOLUTE CACHE)
get_filename_component (EXTERNAL_NUGET_DIR "${ENLISTMENT_ROOT}/__externals/nuget" ABSOLUTE CACHE)

include(${ENLISTMENT_ROOT}/Scripts/CMake/NuGet.cmake)
include(${ENLISTMENT_ROOT}/Scripts/CMake/CppWinRT.cmake)
include(${ENLISTMENT_ROOT}/dependencies.cmake)

include(Scripts/CMake/NuGet.cmake)
include(Scripts/CMake/CppWinRT.cmake)

option (COPY_EXAMPLE_PROJECT "Copy example projects that show how to use Launcher" ON)
option (LAUNCHER_ONLY "Build Launcher only" OFF)
Expand All @@ -39,30 +34,14 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
add_compile_definitions(_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING) # Fix Warning from VS 2022 +
endif()

list( APPEND CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib )

# 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)
add_subdirectory (${EXTERNAL_DIR}/spdlog)
add_subdirectory (${EXTERNAL_DIR}/entt)
add_subdirectory (${EXTERNAL_DIR}/assimp)
add_subdirectory (${EXTERNAL_DIR}/stduuid)
add_subdirectory (${EXTERNAL_DIR}/yaml-cpp)
add_subdirectory (${EXTERNAL_DIR}/SPIRV-headers)
add_subdirectory (${EXTERNAL_DIR}/SPIRV-Tools)
add_subdirectory (${EXTERNAL_DIR}/glslang)
add_subdirectory (${EXTERNAL_DIR}/SPIRV-Cross)
add_subdirectory (${EXTERNAL_DIR}/gtest)
add_subdirectory (${EXTERNAL_DIR}/VulkanMemoryAllocator)
add_subdirectory (${EXTERNAL_DIR}/tlsf)
add_subdirectory (${EXTERNAL_DIR}/rapidhash)
add_subdirectory (${EXTERNAL_DIR}/CLI11)
add_subdirectory (${EXTERNAL_DIR}/nlohmann_json)

## Setup Dependencies
include(dependencies.cmake)

# Core engine lib is here
#
Expand All @@ -85,32 +64,4 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set_property (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT Panzerfaust)
endif ()

# Post build operation
#
set (SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set (SYSTEM_ARCHITECTURE "x64")
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set (SYSTEM_ARCHITECTURE "x64")
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
if (MACOSX_ARCHITECTURE_ARM64)
set (SYSTEM_ARCHITECTURE "arm64")
else ()
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} -Architecture ${SYSTEM_ARCHITECTURE} -Configurations $<IF:$<CONFIG:Debug>,Debug,Release> $<$<BOOL:${LAUNCHER_ONLY}>:-LauncherOnly>
)

if (NOT LAUNCHER_ONLY)
add_dependencies(AssembleContent zEngineLib tetragrama Obelisk)
endif ()

if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
add_dependencies(AssembleContent Panzerfaust-WinBuild)
else ()
add_dependencies(AssembleContent Panzerfaust)
endif ()
include(CPack)
Loading