From df64e438e4aa542dc974232ccf4e526fb8838eac Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Mon, 23 Oct 2023 11:11:33 -0400 Subject: [PATCH 01/34] Remove support for MacOS 11 --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 21f2305..2c7dba0 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -20,7 +20,7 @@ jobs: strategy: matrix: - os: [13, 12, 11] + os: [12, 13] type: [ BUILD_SHARED_LIBS=OFF, BUILD_SHARED_LIBS=ON ] cfg: [ Debug, Release ] From 99cc9d0f57ecad12ff2d483d7e26fbc388c5ea0d Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Tue, 24 Oct 2023 20:59:10 -0400 Subject: [PATCH 02/34] Attempt dynamic linking --- modules/audio | 2 +- modules/core | 2 +- modules/graphics | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/audio b/modules/audio index d21c8d8..839bc58 160000 --- a/modules/audio +++ b/modules/audio @@ -1 +1 @@ -Subproject commit d21c8d889e6eb374685b2fce6687139d823984f4 +Subproject commit 839bc5835cfa96ecc94c7eaba906b80f25f6178d diff --git a/modules/core b/modules/core index 868bfad..cfa14b4 160000 --- a/modules/core +++ b/modules/core @@ -1 +1 @@ -Subproject commit 868bfad50d722b3773d83fc09054759a94ef2204 +Subproject commit cfa14b414e6035bbaf2990fb95c4f509daed20a7 diff --git a/modules/graphics b/modules/graphics index 218a5b7..eacd23f 160000 --- a/modules/graphics +++ b/modules/graphics @@ -1 +1 @@ -Subproject commit 218a5b77d32e0f9776a03640eeef54a508ccd49a +Subproject commit eacd23f98eabcdacc295ae8272e8efcad802b637 From 685bd1b0e93696a01a88b36f3030346176d5624a Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Wed, 25 Oct 2023 14:17:24 -0400 Subject: [PATCH 03/34] (1/2) VMA Config --- modules/core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core b/modules/core index cfa14b4..c3fb7f8 160000 --- a/modules/core +++ b/modules/core @@ -1 +1 @@ -Subproject commit cfa14b414e6035bbaf2990fb95c4f509daed20a7 +Subproject commit c3fb7f8f642afa1168944fc89ff341cf47b27a99 From bbab9e3b28c32a36d5cb7dd6e480716d5d2484ce Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Wed, 25 Oct 2023 20:16:20 -0400 Subject: [PATCH 04/34] Added installing to core --- .gitignore | 3 ++- CMakeLists.txt | 17 ++++++----------- cmake/DragonEngineConfig.cmake.in | 21 +++++++++++++++++++++ cmake/install.cmake | 9 +++++++++ 4 files changed, 38 insertions(+), 12 deletions(-) create mode 100644 cmake/DragonEngineConfig.cmake.in diff --git a/.gitignore b/.gitignore index d3c12e5..069b451 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,5 @@ _deps build/ .vscode/ .vs/ -.DS_Store \ No newline at end of file +.DS_Store +install/ \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index f4a5767..3bee237 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,6 @@ cmake_minimum_required(VERSION 3.24) -# Vulkan package call has to be separated out since either GLSLC or glslangValidator -# will fufill the shader requirement of the compute engine and the graphics engine -find_package(Vulkan REQUIRED) -find_package(Vulkan COMPONENTS glslc glslangValidator) +find_package(Vulkan REQUIRED OPTIONAL_COMPONENTS glslc glslangValidator) # Check if the CMP0077 policy is set and if not, set it to NEW set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) @@ -27,14 +24,16 @@ if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR}) message(STATUS "Build started for ${PROJECT_NAME} Version ${PROJECT_VERSION}") endif() -option(Dragon_INSTALL "Toggle to optionally configure the install files for DragonEngine" OFF) -option(Dragon_PACKAGE_BUILD "Toggle to optionally configure the CPack generator files" OFF) +option(Dragon_INSTALL "Toggle to optionally configure the install files for DragonEngine" ON) +option(Dragon_PACKAGE_BUILD "Toggle to optionally configure the CPack generator files" ON) option(Dragon_BUILD_EXAMPLES "Toggle to optionally build all the examples (dginfo is always built)" ON) option(Dragon_BUILD_TESTS "Toggle to optionally not build the tests for DragonEngine" OFF) -option(Dragon_BUILD_DOCS "Toggle to optionally build the documentation (has no effect without Doxygen)" OFF) +option(Dragon_BUILD_DOCS "Toggle to optionally build the documentation (has no effect without Doxygen)" ON) option(Dragon_BUILD_DEPENDENCY_DOCS "Toggle to optionally build the documentation for Dragon's source dependencies (VkBootstrap, VMA, etc.)" OFF) option(Dragon_NO_VULKAN "Toggle to build DragonEngine without any Vulkan or VMA support" OFF) + + message(CHECK_START "Finding Dragon Submodules") unset(missingComponents) @@ -102,9 +101,5 @@ if(Dragon_BUILD_DOCS) endif() if(Dragon_INSTALL) - include(GNUInstallDirs) include(cmake/install.cmake) - if(Dragon_PACKAGE_BUILD) - include(cmake/package.cmake) - endif() endif() \ No newline at end of file diff --git a/cmake/DragonEngineConfig.cmake.in b/cmake/DragonEngineConfig.cmake.in new file mode 100644 index 0000000..8964355 --- /dev/null +++ b/cmake/DragonEngineConfig.cmake.in @@ -0,0 +1,21 @@ +@PACKAGE_INIT@ + +include(CMakeFindDependencyMacro) + +find_dependency(Vulkan) +find_dependency(GLFW) +find_dependency(fmt) + +set(_supported_comps Audio Compute Core Graphics Particle Physics Raytrace) + +foreach(comp ${DragonEngine_FIND_COMPONENTS}) + if(NOT ";${_supported_comps};" MATCHES ";${_comp};") + set(DragonEngine_FOUND False) + set(DragonEngine_NOT_FOUND_MESSAGE "Unsupported component: ${_comp}") + endif() + + include(${CMAKE_CURRENT_LIST_DIR}/DragonEngine_${comp}Targets.cmake) +endforeach() + +include(${CMAKE_CURRENT_LIST_DIR}/DragonEngineTargets.cmake) +unset(_supported_comps) \ No newline at end of file diff --git a/cmake/install.cmake b/cmake/install.cmake index e69de29..8d593b5 100644 --- a/cmake/install.cmake +++ b/cmake/install.cmake @@ -0,0 +1,9 @@ +include(CMakePackageConfigHelpers) +include(GNUInstallDirs) + +configure_package_config_file( + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/DragonEngineConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/cmake/DragonEngineConfig.cmake + INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/dragon +) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cmake/DragonEngineConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/dragon) \ No newline at end of file From 1b8ad3240126f612cff9e46fce258056914759a2 Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Wed, 25 Oct 2023 20:19:00 -0400 Subject: [PATCH 05/34] Add Install scripts --- modules/core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core b/modules/core index c3fb7f8..bbcd603 160000 --- a/modules/core +++ b/modules/core @@ -1 +1 @@ -Subproject commit c3fb7f8f642afa1168944fc89ff341cf47b27a99 +Subproject commit bbcd60355064afd31841e2bc86fa0094c0b0e435 From c5e21ddecbf084df9f9532bae0dcfb0ca677fe40 Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Fri, 27 Oct 2023 10:14:44 -0400 Subject: [PATCH 06/34] Swapchain works (kind of) --- CMakeLists.txt | 2 +- docs | 2 +- examples/window_test.cpp | 7 +------ modules/audio | 2 +- modules/core | 2 +- modules/graphics | 2 +- tests/CMakeLists.txt | 0 7 files changed, 6 insertions(+), 11 deletions(-) create mode 100644 tests/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 3bee237..68d024e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,7 @@ endif() option(Dragon_INSTALL "Toggle to optionally configure the install files for DragonEngine" ON) option(Dragon_PACKAGE_BUILD "Toggle to optionally configure the CPack generator files" ON) option(Dragon_BUILD_EXAMPLES "Toggle to optionally build all the examples (dginfo is always built)" ON) -option(Dragon_BUILD_TESTS "Toggle to optionally not build the tests for DragonEngine" OFF) +option(Dragon_BUILD_TESTS "Toggle to optionally not build the tests for DragonEngine" ON) option(Dragon_BUILD_DOCS "Toggle to optionally build the documentation (has no effect without Doxygen)" ON) option(Dragon_BUILD_DEPENDENCY_DOCS "Toggle to optionally build the documentation for Dragon's source dependencies (VkBootstrap, VMA, etc.)" OFF) option(Dragon_NO_VULKAN "Toggle to build DragonEngine without any Vulkan or VMA support" OFF) diff --git a/docs b/docs index 8847036..f292add 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 884703691e14df5ae35752609aca8a5de01db068 +Subproject commit f292add95ecfb0c1ba409366509215b9645f1c52 diff --git a/examples/window_test.cpp b/examples/window_test.cpp index b442b45..3168cc3 100644 --- a/examples/window_test.cpp +++ b/examples/window_test.cpp @@ -12,15 +12,10 @@ int main(void) { Engine* engine = new Engine(); Graphics::Engine* graphicsEngine = new Graphics::Engine(); engine->addSubmodule(dynamic_cast(graphicsEngine)); + Graphics::Window* window = graphicsEngine->createWindow(800, 400, "Window Test"); try { engine->init(createInfo); - // Initial window created by default - Graphics::Window* window = graphicsEngine->getWindow(0); - - window->setWindowSize(800, 400); - window->setWindowTitle("Window Test"); - while(graphicsEngine->areWindowsOpen()) { engine->update(); } diff --git a/modules/audio b/modules/audio index 839bc58..fcd0a0e 160000 --- a/modules/audio +++ b/modules/audio @@ -1 +1 @@ -Subproject commit 839bc5835cfa96ecc94c7eaba906b80f25f6178d +Subproject commit fcd0a0e3173a0f67dd3d668500f8b808cb3571dc diff --git a/modules/core b/modules/core index bbcd603..dfa446b 160000 --- a/modules/core +++ b/modules/core @@ -1 +1 @@ -Subproject commit bbcd60355064afd31841e2bc86fa0094c0b0e435 +Subproject commit dfa446be0efacb4fdeccf5a14b3b99779af39440 diff --git a/modules/graphics b/modules/graphics index eacd23f..7736fdf 160000 --- a/modules/graphics +++ b/modules/graphics @@ -1 +1 @@ -Subproject commit eacd23f98eabcdacc295ae8272e8efcad802b637 +Subproject commit 7736fdfad4729d18ab569a52aa932930970e3a31 diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000..e69de29 From 4ebf08e353a81eda7e1f855b59ae264389b03fae Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Fri, 27 Oct 2023 14:33:54 -0400 Subject: [PATCH 07/34] Add some other submodules --- .gitmodules | 6 ++ CMakeLists.txt | 104 ++++++++++++++++++++++-------- cmake/DragonEngineConfig.cmake.in | 3 +- examples/CMakeLists.txt | 11 +++- examples/audio_wav.cpp | 0 examples/window_test.cpp | 22 +++++-- modules/audio | 2 +- modules/core | 2 +- modules/graphics | 2 +- modules/particle | 1 + modules/raytrace | 1 + 11 files changed, 116 insertions(+), 38 deletions(-) create mode 100644 examples/audio_wav.cpp create mode 160000 modules/particle create mode 160000 modules/raytrace diff --git a/.gitmodules b/.gitmodules index 6bc9f4c..da522a9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,9 @@ [submodule "docs"] path = docs url = ../DragonDocs +[submodule "modules/particle"] + path = modules/particle + url = ../DragonParticle +[submodule "modules/raytrace"] + path = modules/raytrace + url = ../DragonRaytrace diff --git a/CMakeLists.txt b/CMakeLists.txt index 68d024e..de4fda0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,18 +32,44 @@ option(Dragon_BUILD_DOCS "Toggle to optionally build the documentation (has no e option(Dragon_BUILD_DEPENDENCY_DOCS "Toggle to optionally build the documentation for Dragon's source dependencies (VkBootstrap, VMA, etc.)" OFF) option(Dragon_NO_VULKAN "Toggle to build DragonEngine without any Vulkan or VMA support" OFF) - - message(CHECK_START "Finding Dragon Submodules") unset(missingComponents) +message(CHECK_START "Finding Dragon::Audio") +if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/audio/CMakeLists.txt) + set(DragonAudio_FOUND CACHE BOOL "" ON) + message(CHECK_PASS "found sources") + add_subdirectory(modules/audio) +else() + find_package(DragonEngine COMPONENTS Audio QUIET) + if(DragonAudio_FOUND) + message(CHECK_PASS "found binaries") + else() + message(CHECK_FAIL "not found") + endif() +endif() + +message(CHECK_START "Finding Dragon::Compute") +if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/compute/CMakeLists.txt) + set(DragonCompute_FOUND CACHE BOOL "" ON) + message(CHECK_PASS "found sources") + add_subdirectory(modules/compute) +else() + find_package(DragonEngine COMPONENTS Compute QUIET) + if(DragonCompute_FOUND) + message(CHECK_PASS "found binaries") + else() + message(CHECK_FAIL "not found") + endif() +endif() + message(CHECK_START "Finding Dragon::Core") if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/core/CMakeLists.txt) set(DragonCore_FOUND CACHE BOOL "" ON) message(CHECK_PASS "found sources") add_subdirectory(modules/core) else() - find_package(DragonCore) + find_package(DragonEngine COMPONENTS Core QUIET) if(DragonCore_FOUND) message(CHECK_PASS "found binaries") else() @@ -51,33 +77,59 @@ else() endif() endif() -if(DragonCore_FOUND) - message(CHECK_START "Finding Dragon::Graphics") - if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/graphics/CMakeLists.txt) - set(DragonGraphics_FOUND CACHE BOOL "" ON) - message(CHECK_PASS "found sources") - add_subdirectory(modules/graphics) +message(CHECK_START "Finding Dragon::Graphics") +if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/graphics/CMakeLists.txt) + set(DragonGraphics_FOUND CACHE BOOL "" ON) + message(CHECK_PASS "found sources") + add_subdirectory(modules/graphics) +else() + find_package(DragonEngine COMPONENTS Graphics QUIET) + if(DragonGraphics_FOUND) + message(CHECK_PASS "found binaries") else() - find_package(DragonGraphics) - if(DragonGraphics_FOUND) - message(CHECK_PASS "found binaries") - else() - message(CHECK_FAIL "not found") - endif() + message(CHECK_FAIL "not found") endif() +endif() - message(CHECK_START "Finding Dragon::Compute") - if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/compute/CMakeLists.txt) - set(DragonCompute_FOUND CACHE BOOL "" ON) - message(CHECK_PASS "found sources") - add_subdirectory(modules/compute) +message(CHECK_START "Finding Dragon::Particle") +if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/particle/CMakeLists.txt) + set(DragonParticle_FOUND CACHE BOOL "" ON) + message(CHECK_PASS "found sources") + add_subdirectory(modules/particle) +else() + find_package(DragonEngine COMPONENTS Particle QUIET) + if(DragonParticle_FOUND) + message(CHECK_PASS "found binaries") else() - find_package(DragonCompute) - if(DragonCompute_FOUND) - message(CHECK_PASS "found binaries") - else() - message(CHECK_FAIL "not found") - endif() + message(CHECK_FAIL "not found") + endif() +endif() + +message(CHECK_START "Finding Dragon::Physics") +if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/physics/CMakeLists.txt) + set(DragonPhysics_FOUND CACHE BOOL "" ON) + message(CHECK_PASS "found sources") + add_subdirectory(modules/physics) +else() + find_package(DragonEngine COMPONENTS Physics QUIET) + if(DragonPhysics_FOUND) + message(CHECK_PASS "found binaries") + else() + message(CHECK_FAIL "not found") + endif() +endif() + +message(CHECK_START "Finding Dragon::Raytrace") +if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/modules/raytrace/CMakeLists.txt) + set(DragonRaytrace_FOUND CACHE BOOL "" ON) + message(CHECK_PASS "found sources") + add_subdirectory(modules/raytrace) +else() + find_package(DragonEngine COMPONENTS Raytrace QUIET) + if(DragonRaytrace_FOUND) + message(CHECK_PASS "found binaries") + else() + message(CHECK_FAIL "not found") endif() endif() diff --git a/cmake/DragonEngineConfig.cmake.in b/cmake/DragonEngineConfig.cmake.in index 8964355..e2dc165 100644 --- a/cmake/DragonEngineConfig.cmake.in +++ b/cmake/DragonEngineConfig.cmake.in @@ -8,6 +8,8 @@ find_dependency(fmt) set(_supported_comps Audio Compute Core Graphics Particle Physics Raytrace) +include(${CMAKE_CURRENT_LIST_DIR}/DragonEngine_CoreTargets.cmake) + foreach(comp ${DragonEngine_FIND_COMPONENTS}) if(NOT ";${_supported_comps};" MATCHES ";${_comp};") set(DragonEngine_FOUND False) @@ -17,5 +19,4 @@ foreach(comp ${DragonEngine_FIND_COMPONENTS}) include(${CMAKE_CURRENT_LIST_DIR}/DragonEngine_${comp}Targets.cmake) endforeach() -include(${CMAKE_CURRENT_LIST_DIR}/DragonEngineTargets.cmake) unset(_supported_comps) \ No newline at end of file diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 3a882af..f7a1eb8 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,2 +1,11 @@ add_executable(dgwindowtest window_test.cpp) -target_link_libraries(dgwindowtest PUBLIC Dragon::Core Dragon::Graphics) \ No newline at end of file +target_link_libraries(dgwindowtest PUBLIC Dragon::Core Dragon::Graphics) + +if(Dragon_INSTALL) + include(GNUInstallDirs) + install(TARGETS dgwindowtest + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) +endif() \ No newline at end of file diff --git a/examples/audio_wav.cpp b/examples/audio_wav.cpp new file mode 100644 index 0000000..e69de29 diff --git a/examples/window_test.cpp b/examples/window_test.cpp index 3168cc3..dee8a5e 100644 --- a/examples/window_test.cpp +++ b/examples/window_test.cpp @@ -5,15 +5,23 @@ using namespace Dragon; -int main(void) { - EngineCreateInfo createInfo; - createInfo.appName = "Window Test"; +const std::vector vertices = { + {{0.0f, -0.5f}, {1.0f, 0.0f, 0.0f, 1.0f}}, + {{0.5f, 0.5f}, {0.0f, 1.0f, 0.0f, 1.0f}}, + {{-0.5f, 0.5f}, {0.0f, 0.0f, 1.0f, 1.0f}} +}; - Engine* engine = new Engine(); - Graphics::Engine* graphicsEngine = new Graphics::Engine(); - engine->addSubmodule(dynamic_cast(graphicsEngine)); - Graphics::Window* window = graphicsEngine->createWindow(800, 400, "Window Test"); +int main(void) { try { + EngineCreateInfo createInfo; + createInfo.appName = "Window Test"; + + Engine* engine = new Engine(); + Graphics::Engine* graphicsEngine = new Graphics::Engine(); + engine->addSubmodule(dynamic_cast(graphicsEngine)); + + Graphics::Window* window = graphicsEngine->createWindow(800, 400, "Window Test"); + engine->init(createInfo); while(graphicsEngine->areWindowsOpen()) { diff --git a/modules/audio b/modules/audio index fcd0a0e..b322fe1 160000 --- a/modules/audio +++ b/modules/audio @@ -1 +1 @@ -Subproject commit fcd0a0e3173a0f67dd3d668500f8b808cb3571dc +Subproject commit b322fe1b13ed75bd55adb73405bd4384c653ce5f diff --git a/modules/core b/modules/core index dfa446b..3d362a5 160000 --- a/modules/core +++ b/modules/core @@ -1 +1 @@ -Subproject commit dfa446be0efacb4fdeccf5a14b3b99779af39440 +Subproject commit 3d362a57649681ee633015be1b98a021f3d4f4f4 diff --git a/modules/graphics b/modules/graphics index 7736fdf..dac6100 160000 --- a/modules/graphics +++ b/modules/graphics @@ -1 +1 @@ -Subproject commit 7736fdfad4729d18ab569a52aa932930970e3a31 +Subproject commit dac610042ef8de8b043d2fa6678a0e5a328c6070 diff --git a/modules/particle b/modules/particle new file mode 160000 index 0000000..efd0029 --- /dev/null +++ b/modules/particle @@ -0,0 +1 @@ +Subproject commit efd00298fa67c62f0c981fda845071668293106d diff --git a/modules/raytrace b/modules/raytrace new file mode 160000 index 0000000..a3fcbf5 --- /dev/null +++ b/modules/raytrace @@ -0,0 +1 @@ +Subproject commit a3fcbf5b3887f3c9752e06c4215a952a5fcfc2c0 From 2616193663e383e3e096d918f8ccf482d6cd8501 Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Fri, 3 Nov 2023 22:05:39 -0400 Subject: [PATCH 08/34] Potentially might have fixed it --- cmake/DragonEngineConfig.cmake.in | 2 ++ docs | 2 +- modules/audio | 2 +- modules/core | 2 +- modules/graphics | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cmake/DragonEngineConfig.cmake.in b/cmake/DragonEngineConfig.cmake.in index e2dc165..d6581af 100644 --- a/cmake/DragonEngineConfig.cmake.in +++ b/cmake/DragonEngineConfig.cmake.in @@ -2,6 +2,8 @@ include(CMakeFindDependencyMacro) +set(DragonEngine_VERSION @DragonEngine_VERSION@) + find_dependency(Vulkan) find_dependency(GLFW) find_dependency(fmt) diff --git a/docs b/docs index f292add..35b4114 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit f292add95ecfb0c1ba409366509215b9645f1c52 +Subproject commit 35b41141d21ef75a851fc9095cfb893f4d3d99bb diff --git a/modules/audio b/modules/audio index b322fe1..14dbfdc 160000 --- a/modules/audio +++ b/modules/audio @@ -1 +1 @@ -Subproject commit b322fe1b13ed75bd55adb73405bd4384c653ce5f +Subproject commit 14dbfdc1d4c8207298927e3b0c6ba8c423149c34 diff --git a/modules/core b/modules/core index 3d362a5..14fdff3 160000 --- a/modules/core +++ b/modules/core @@ -1 +1 @@ -Subproject commit 3d362a57649681ee633015be1b98a021f3d4f4f4 +Subproject commit 14fdff3f6c7359d212e5410f6bf6f18cc5d8d0ec diff --git a/modules/graphics b/modules/graphics index dac6100..87ab397 160000 --- a/modules/graphics +++ b/modules/graphics @@ -1 +1 @@ -Subproject commit dac610042ef8de8b043d2fa6678a0e5a328c6070 +Subproject commit 87ab39715614aeb64fc13c925827872a42192d39 From 2132002109b11f935a64588f82219332b41a919e Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Fri, 3 Nov 2023 22:11:34 -0400 Subject: [PATCH 09/34] Update GH actions since SPIRV-Tools is required --- .github/workflows/android.yml | 2 +- .github/workflows/codeql.yml | 2 +- .github/workflows/ios.yml | 2 +- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index da9d98e..3646825 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -36,7 +36,7 @@ jobs: - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: vulkan-query-version: latest - vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang + vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true - run: | cmake . -B build -D${{ matrix.type }} --install-prefix ${{ github.workspace }}/install -DCMAKE_INSTALL_DIR=${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 8e6212d..1494486 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -67,7 +67,7 @@ jobs: - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: vulkan-query-version: latest - vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang + vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true - run: | cmake . -B build --install-prefix ${{ github.workspace }}/install -DCMAKE_INSTALL_DIR=${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index c7e2f11..32aee0e 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -38,7 +38,7 @@ jobs: - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: vulkan-query-version: latest - vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang + vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true - run: | cmake . -B build -D${{ matrix.type }} --install-prefix ${{ github.workspace }}/install -DCMAKE_INSTALL_DIR=${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index c18ab66..6a8d325 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -37,7 +37,7 @@ jobs: - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: vulkan-query-version: latest - vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang + vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true - run: | cmake . -B build -D${{ matrix.type }} --install-prefix ${{ github.workspace }}/install -DCMAKE_INSTALL_DIR=${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 2c7dba0..dde93a4 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -36,7 +36,7 @@ jobs: - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: vulkan-query-version: latest - vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang + vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true - run: | cmake . -B build -D${{ matrix.type }} --install-prefix ${{ github.workspace }}/install -DCMAKE_INSTALL_DIR=${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 0c89a09..4c0d0b0 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -36,7 +36,7 @@ jobs: - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: vulkan-query-version: latest - vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang + vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true - run: | cmake . -B build -D${{ matrix.type }} --install-prefix ${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE From 3f9f1eb6025dc2cb1e7b31c493f8b39f3aaf8f5a Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Fri, 3 Nov 2023 22:46:21 -0400 Subject: [PATCH 10/34] Update core --- modules/core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core b/modules/core index 14fdff3..8896a6c 160000 --- a/modules/core +++ b/modules/core @@ -1 +1 @@ -Subproject commit 14fdff3f6c7359d212e5410f6bf6f18cc5d8d0ec +Subproject commit 8896a6c97508b511957c1585adfc2a3091593d52 From 49a1a0b447c4ce02c3045e9b1dfb80143306b5ed Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Fri, 3 Nov 2023 22:53:06 -0400 Subject: [PATCH 11/34] -fPIC needs to be in link options --- modules/core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core b/modules/core index 8896a6c..ae29d62 160000 --- a/modules/core +++ b/modules/core @@ -1 +1 @@ -Subproject commit 8896a6c97508b511957c1585adfc2a3091593d52 +Subproject commit ae29d62a483f4b2587e95d104db8657da9a30aae From 124c20c06d6f876b9130af64d28b3693e8434c4d Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Fri, 3 Nov 2023 23:15:07 -0400 Subject: [PATCH 12/34] Update Linux-based systems to try to fix the error with GLIBCXX_3.4.29 --- .github/workflows/android.yml | 4 +++- .github/workflows/codeql.yml | 3 ++- .github/workflows/linux.yml | 8 +++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 3646825..79a1275 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -32,7 +32,9 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: submodules: recursive - - run: sudo apt update && sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libc6-dev + + - run: sudo apt update && sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libc6-dev gc-4.9 && sudo apt upgrade libstdc++6 && sudo apt-get dist-upgrade + - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: vulkan-query-version: latest diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 1494486..d535c7e 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -62,8 +62,9 @@ jobs: # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. + + - run: sudo apt update && sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libc6-dev gc-4.9 && sudo apt upgrade libstdc++6 && sudo apt-get dist-upgrade - - run: sudo apt update && sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libc6-dev - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: vulkan-query-version: latest diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 6a8d325..b3bc1f5 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -33,13 +33,15 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: submodules: recursive - - run: sudo apt update && sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libc6-dev + + - run: sudo apt update && sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libc6-dev gc-4.9 && sudo apt upgrade libstdc++6 && sudo apt-get dist-upgrade + - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: vulkan-query-version: latest vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true - run: | - cmake . -B build -D${{ matrix.type }} --install-prefix ${{ github.workspace }}/install -DCMAKE_INSTALL_DIR=${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE - cmake --build ${{ github.workspace }}/build --config ${{ matrix.cfg }} + cmake . -B build -D${{ matrix.type }} --install-prefix ${{ github.workspace }}/install -DCMAKE_INSTALL_DIR=${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE && \ + cmake --build ${{ github.workspace }}/build --config ${{ matrix.cfg }} && \ cmake --install ${{ github.workspace }}/build --config ${{ matrix.cfg }} \ No newline at end of file From caa311f8e6920cd034bf88000c86bf4fe96b03ba Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Fri, 3 Nov 2023 23:17:56 -0400 Subject: [PATCH 13/34] Try a different fix --- .github/workflows/android.yml | 4 ++-- .github/workflows/codeql.yml | 2 +- .github/workflows/linux.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 79a1275..ac24191 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -32,9 +32,9 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: submodules: recursive + + - run: sudo apt update && sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libc6-dev && export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH - - run: sudo apt update && sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libc6-dev gc-4.9 && sudo apt upgrade libstdc++6 && sudo apt-get dist-upgrade - - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: vulkan-query-version: latest diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index d535c7e..88acb25 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -63,7 +63,7 @@ jobs: # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. - - run: sudo apt update && sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libc6-dev gc-4.9 && sudo apt upgrade libstdc++6 && sudo apt-get dist-upgrade + - run: sudo apt update && sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libc6-dev && export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index b3bc1f5..2aa466b 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -33,8 +33,8 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: submodules: recursive - - - run: sudo apt update && sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libc6-dev gc-4.9 && sudo apt upgrade libstdc++6 && sudo apt-get dist-upgrade + + - run: sudo apt update && sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libc6-dev && export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: From 10fab09793ae98fa6df8939bf198d6fde9dadc86 Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Fri, 3 Nov 2023 23:23:03 -0400 Subject: [PATCH 14/34] Attempt with forced action Vk version --- .github/workflows/android.yml | 4 ++-- .github/workflows/codeql.yml | 2 +- .github/workflows/ios.yml | 2 +- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index ac24191..6f7a745 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -32,12 +32,12 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: submodules: recursive - + - run: sudo apt update && sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libc6-dev && export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: - vulkan-query-version: latest + vulkan-query-version: 1.3.204.0 vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true - run: | diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 88acb25..c4788e5 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -67,7 +67,7 @@ jobs: - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: - vulkan-query-version: latest + vulkan-query-version: 1.3.204.0 vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true - run: | diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 32aee0e..186c761 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -37,7 +37,7 @@ jobs: xcode-version: latest-stable - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: - vulkan-query-version: latest + vulkan-query-version: 1.3.204.0 vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true - run: | diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 2aa466b..e717340 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -38,7 +38,7 @@ jobs: - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: - vulkan-query-version: latest + vulkan-query-version: 1.3.204.0 vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true - run: | diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index dde93a4..8ed1e22 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -35,7 +35,7 @@ jobs: submodules: recursive - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: - vulkan-query-version: latest + vulkan-query-version: 1.3.204.0 vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true - run: | diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 4c0d0b0..618c44f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -35,7 +35,7 @@ jobs: submodules: recursive - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: - vulkan-query-version: latest + vulkan-query-version: 1.3.204.0 vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true - run: | From 5c8442ae72113e7ada50b439702ab9961643c30c Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Sat, 4 Nov 2023 22:47:37 -0400 Subject: [PATCH 15/34] Update to dynamically create string VkEnum functions --- CMakeLists.txt | 1 + modules/core | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index de4fda0..22a5eb3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,7 @@ cmake_minimum_required(VERSION 3.24) find_package(Vulkan REQUIRED OPTIONAL_COMPONENTS glslc glslangValidator) +find_package(Python3 REQUIRED COMPONENTS Interpreter) # Check if the CMP0077 policy is set and if not, set it to NEW set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) diff --git a/modules/core b/modules/core index ae29d62..8abcadb 160000 --- a/modules/core +++ b/modules/core @@ -1 +1 @@ -Subproject commit ae29d62a483f4b2587e95d104db8657da9a30aae +Subproject commit 8abcadbe1aa2c843dfd42fc2e72ef6856fc6240e From 4798460d84b5e66c99759b10d23b4ad3c502af2a Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Sat, 4 Nov 2023 23:23:24 -0400 Subject: [PATCH 16/34] I still don't know why the compile options fail --- modules/core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core b/modules/core index 8abcadb..f555daf 160000 --- a/modules/core +++ b/modules/core @@ -1 +1 @@ -Subproject commit 8abcadbe1aa2c843dfd42fc2e72ef6856fc6240e +Subproject commit f555daf7374415d950cc22061188236cf55e591b From 2147e59f0fad1200c941d48e2f794f3ccc1b8e42 Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Sat, 4 Nov 2023 23:34:45 -0400 Subject: [PATCH 17/34] Slight issue with Wall --- modules/core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core b/modules/core index f555daf..5682ea7 160000 --- a/modules/core +++ b/modules/core @@ -1 +1 @@ -Subproject commit f555daf7374415d950cc22061188236cf55e591b +Subproject commit 5682ea78734720ad8f1d30fe8f4d2afb89153949 From b46ceae358ef81a7526f474d136ecfedb20b8bea Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Sat, 4 Nov 2023 23:51:18 -0400 Subject: [PATCH 18/34] Add custom action to add shaderc to the repo --- .github/actions/get_shaderc.yml | 25 +++++++++++++++++++++++++ .github/workflows/android.yml | 2 ++ .github/workflows/codeql.yml | 3 +++ .github/workflows/ios.yml | 5 +++++ .github/workflows/linux.yml | 3 +++ .github/workflows/macos.yml | 4 ++++ .github/workflows/windows.yml | 4 ++++ 7 files changed, 46 insertions(+) create mode 100644 .github/actions/get_shaderc.yml diff --git a/.github/actions/get_shaderc.yml b/.github/actions/get_shaderc.yml new file mode 100644 index 0000000..90718bf --- /dev/null +++ b/.github/actions/get_shaderc.yml @@ -0,0 +1,25 @@ +name: 'Get Shaderc' +description: 'Builds Shaderc from source' + +inputs: + source_dir: + description: '' + required: false + default: 'SHADERC_DIR' + build_mode: + description: '' + required: false + default: Release + +runs: + using: 'composite' + steps: + - run: | + git clone https://github.com/google/shaderc ${{inputs.source_dir}} + cd ${{inputs.source_dir}} + ./utils/git-sync-deps + + - run: | + cmake ${{inputs.source_dir}} + cmake --build build/shaderc --source ${{inputs.source_dir}} + diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 6f7a745..dd9d10b 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -35,6 +35,8 @@ jobs: - run: sudo apt update && sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libc6-dev && export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH + - uses: ./.github/actions/get_shaderc.yml + - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: vulkan-query-version: 1.3.204.0 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index c4788e5..3ca1202 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -70,6 +70,9 @@ jobs: vulkan-query-version: 1.3.204.0 vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true + + - uses: ./.github/actions/get_shaderc.yml + - run: | cmake . -B build --install-prefix ${{ github.workspace }}/install -DCMAKE_INSTALL_DIR=${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE cmake --build ${{ github.workspace }}/build diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 186c761..4db406a 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -32,14 +32,19 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: submodules: recursive + - uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0 with: xcode-version: latest-stable + - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: vulkan-query-version: 1.3.204.0 vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true + + - uses: ./.github/actions/get_shaderc.yml + - run: | cmake . -B build -D${{ matrix.type }} --install-prefix ${{ github.workspace }}/install -DCMAKE_INSTALL_DIR=${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE cmake --build ${{ github.workspace }}/build --config ${{ matrix.cfg }} diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index e717340..be43406 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -41,6 +41,9 @@ jobs: vulkan-query-version: 1.3.204.0 vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true + + - uses: ./.github/actions/get_shaderc.yml + - run: | cmake . -B build -D${{ matrix.type }} --install-prefix ${{ github.workspace }}/install -DCMAKE_INSTALL_DIR=${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE && \ cmake --build ${{ github.workspace }}/build --config ${{ matrix.cfg }} && \ diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 8ed1e22..3b1d5ed 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -33,11 +33,15 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: submodules: recursive + - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: vulkan-query-version: 1.3.204.0 vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true + + - uses: ./.github/actions/get_shaderc.yml + - run: | cmake . -B build -D${{ matrix.type }} --install-prefix ${{ github.workspace }}/install -DCMAKE_INSTALL_DIR=${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE cmake --build ${{ github.workspace }}/build --config ${{ matrix.cfg }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 618c44f..0281de3 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -33,11 +33,15 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: submodules: recursive + - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: vulkan-query-version: 1.3.204.0 vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true + + - uses: ./.github/actions/get_shaderc.yml + - run: | cmake . -B build -D${{ matrix.type }} --install-prefix ${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE cmake --build ${{ github.workspace }}/build --config ${{ matrix.cfg }} From 184e326dc725adebf2a19b01717631edd2adf451 Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Sat, 4 Nov 2023 23:52:48 -0400 Subject: [PATCH 19/34] Has to be this way instead --- .github/actions/{get_shaderc.yml => get_shaderc/action.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/actions/{get_shaderc.yml => get_shaderc/action.yml} (100%) diff --git a/.github/actions/get_shaderc.yml b/.github/actions/get_shaderc/action.yml similarity index 100% rename from .github/actions/get_shaderc.yml rename to .github/actions/get_shaderc/action.yml From eb04d243f8a07dc675c2755bb5b34c62764aed49 Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Sat, 4 Nov 2023 23:54:58 -0400 Subject: [PATCH 20/34] Forgot to change the name in the actual actions --- .github/workflows/android.yml | 5 +++-- .github/workflows/codeql.yml | 4 ++-- .github/workflows/ios.yml | 2 +- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 4 ++-- .github/workflows/windows.yml | 4 ++-- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index dd9d10b..d75490f 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -35,13 +35,14 @@ jobs: - run: sudo apt update && sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libc6-dev && export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH - - uses: ./.github/actions/get_shaderc.yml - - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: vulkan-query-version: 1.3.204.0 vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true + + - uses: ./.github/actions/get_shaderc + - run: | cmake . -B build -D${{ matrix.type }} --install-prefix ${{ github.workspace }}/install -DCMAKE_INSTALL_DIR=${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE cmake --build ${{ github.workspace }}/build --config ${{ matrix.cfg }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 3ca1202..81422ec 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -71,8 +71,8 @@ jobs: vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true - - uses: ./.github/actions/get_shaderc.yml - + - uses: ./.github/actions/get_shaderc + - run: | cmake . -B build --install-prefix ${{ github.workspace }}/install -DCMAKE_INSTALL_DIR=${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE cmake --build ${{ github.workspace }}/build diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 4db406a..d24240f 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -43,7 +43,7 @@ jobs: vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true - - uses: ./.github/actions/get_shaderc.yml + - uses: ./.github/actions/get_shaderc - run: | cmake . -B build -D${{ matrix.type }} --install-prefix ${{ github.workspace }}/install -DCMAKE_INSTALL_DIR=${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index be43406..5764cbb 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -42,7 +42,7 @@ jobs: vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true - - uses: ./.github/actions/get_shaderc.yml + - uses: ./.github/actions/get_shaderc - run: | cmake . -B build -D${{ matrix.type }} --install-prefix ${{ github.workspace }}/install -DCMAKE_INSTALL_DIR=${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE && \ diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 3b1d5ed..f8a42d8 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -33,14 +33,14 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: submodules: recursive - + - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: vulkan-query-version: 1.3.204.0 vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true - - uses: ./.github/actions/get_shaderc.yml + - uses: ./.github/actions/get_shaderc - run: | cmake . -B build -D${{ matrix.type }} --install-prefix ${{ github.workspace }}/install -DCMAKE_INSTALL_DIR=${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 0281de3..d1459e5 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -33,14 +33,14 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: submodules: recursive - + - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 with: vulkan-query-version: 1.3.204.0 vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true - - uses: ./.github/actions/get_shaderc.yml + - uses: ./.github/actions/get_shaderc - run: | cmake . -B build -D${{ matrix.type }} --install-prefix ${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE From 4d64031f0197fc02fb7ad651c706cc8bfbe41c8a Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Sat, 4 Nov 2023 23:57:09 -0400 Subject: [PATCH 21/34] Add shell naming to action run --- .github/actions/get_shaderc/action.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/actions/get_shaderc/action.yml b/.github/actions/get_shaderc/action.yml index 90718bf..a8ba418 100644 --- a/.github/actions/get_shaderc/action.yml +++ b/.github/actions/get_shaderc/action.yml @@ -14,12 +14,14 @@ inputs: runs: using: 'composite' steps: - - run: | + - shell: bash + run: | git clone https://github.com/google/shaderc ${{inputs.source_dir}} cd ${{inputs.source_dir}} ./utils/git-sync-deps - - run: | + - shell: bash + run: | cmake ${{inputs.source_dir}} cmake --build build/shaderc --source ${{inputs.source_dir}} From f8552ca36736ba9939e4e876b8086e44ef8ce87c Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Sun, 5 Nov 2023 00:01:06 -0400 Subject: [PATCH 22/34] Fix action (again) --- .github/actions/get_shaderc/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/get_shaderc/action.yml b/.github/actions/get_shaderc/action.yml index a8ba418..29e4c4b 100644 --- a/.github/actions/get_shaderc/action.yml +++ b/.github/actions/get_shaderc/action.yml @@ -22,6 +22,6 @@ runs: - shell: bash run: | - cmake ${{inputs.source_dir}} - cmake --build build/shaderc --source ${{inputs.source_dir}} + cmake ${{inputs.source_dir}} -Bbuild/shaderc + cmake --build build/shaderc From 7fdd05153f0be4a822e9c338ea73af0f7a7a09a6 Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Sun, 5 Nov 2023 19:51:43 -0500 Subject: [PATCH 23/34] Don't get dependencies in build_shaderc and add build action --- .github/actions/build/action.yml | 30 ++++++++++++++++++++++++++ .github/actions/get_shaderc/action.yml | 1 - .github/workflows/android.yml | 8 +++---- .github/workflows/codeql.yml | 8 +++---- .github/workflows/ios.yml | 8 +++---- .github/workflows/linux.yml | 8 +++---- .github/workflows/macos.yml | 8 +++---- .github/workflows/windows.yml | 8 +++---- .gitignore | 1 + 9 files changed, 55 insertions(+), 25 deletions(-) create mode 100644 .github/actions/build/action.yml diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml new file mode 100644 index 0000000..ea62fee --- /dev/null +++ b/.github/actions/build/action.yml @@ -0,0 +1,30 @@ +name: Build DragonEngine +description: Runs the commands to build DragonEngine from source and installs it + +inputs: + type: + required: false + description: Whether or not to build shared libs + default: BUILD_SHARED_LIBS:BOOL=ON + config: + required: false + description: The CMake configuration to build (Debug, Release, MinSizeRel, or RelWithDebInfo) + default: Release + install_dir: + required: false + description: The directory to install this into + default: install + build_dir: + required: false + description: The directory to build the files into + default: build + +runs: + using: 'composite' + steps: + - shell: bash + run: | + - run: | + cmake . -B ${{ inputs.build_dir }} -D${{ inputs.type }} --install-prefix ${{ inputs.install_dir }} -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE + cmake --build ${{ inputs.build_dir }} --config ${{ inputs.config }} + cmake --install ${{ inputs.build_dir }} --config ${{ inputs.config }} diff --git a/.github/actions/get_shaderc/action.yml b/.github/actions/get_shaderc/action.yml index 29e4c4b..8bbf0f1 100644 --- a/.github/actions/get_shaderc/action.yml +++ b/.github/actions/get_shaderc/action.yml @@ -18,7 +18,6 @@ runs: run: | git clone https://github.com/google/shaderc ${{inputs.source_dir}} cd ${{inputs.source_dir}} - ./utils/git-sync-deps - shell: bash run: | diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index d75490f..3b081d1 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -43,7 +43,7 @@ jobs: - uses: ./.github/actions/get_shaderc - - run: | - cmake . -B build -D${{ matrix.type }} --install-prefix ${{ github.workspace }}/install -DCMAKE_INSTALL_DIR=${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE - cmake --build ${{ github.workspace }}/build --config ${{ matrix.cfg }} - cmake --install ${{ github.workspace }}/build --config ${{ matrix.cfg }} \ No newline at end of file + - uses: ./.github/actions/build + with: + type: ${{ matrix.type }} + config: ${{ matrix.cfg }} \ No newline at end of file diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 81422ec..dd8edf4 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -73,10 +73,10 @@ jobs: - uses: ./.github/actions/get_shaderc - - run: | - cmake . -B build --install-prefix ${{ github.workspace }}/install -DCMAKE_INSTALL_DIR=${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE - cmake --build ${{ github.workspace }}/build - cmake --install ${{ github.workspace }}/build + - uses: ./.github/actions/build + with: + type: -DBUILD_SHARED_LIBS:BOOL=OFF + config: Release - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@0116bc2df50751f9724a2e35ef1f24d22f90e4e1 # v2.22.3 diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index d24240f..1b689e7 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -45,7 +45,7 @@ jobs: - uses: ./.github/actions/get_shaderc - - run: | - cmake . -B build -D${{ matrix.type }} --install-prefix ${{ github.workspace }}/install -DCMAKE_INSTALL_DIR=${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE - cmake --build ${{ github.workspace }}/build --config ${{ matrix.cfg }} - cmake --install ${{ github.workspace }}/build --config ${{ matrix.cfg }} + - uses: ./.github/actions/build + with: + type: ${{ matrix.type }} + config: ${{ matrix.cfg }} diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 5764cbb..5a21c49 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -44,7 +44,7 @@ jobs: - uses: ./.github/actions/get_shaderc - - run: | - cmake . -B build -D${{ matrix.type }} --install-prefix ${{ github.workspace }}/install -DCMAKE_INSTALL_DIR=${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE && \ - cmake --build ${{ github.workspace }}/build --config ${{ matrix.cfg }} && \ - cmake --install ${{ github.workspace }}/build --config ${{ matrix.cfg }} \ No newline at end of file + - uses: ./.github/actions/build + with: + type: ${{ matrix.type }} + config: ${{ matrix.cfg }} \ No newline at end of file diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index f8a42d8..cc92798 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -42,7 +42,7 @@ jobs: - uses: ./.github/actions/get_shaderc - - run: | - cmake . -B build -D${{ matrix.type }} --install-prefix ${{ github.workspace }}/install -DCMAKE_INSTALL_DIR=${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE - cmake --build ${{ github.workspace }}/build --config ${{ matrix.cfg }} - cmake --install ${{ github.workspace }}/build --config ${{ matrix.cfg }} \ No newline at end of file + - uses: ./.github/actions/build + with: + type: ${{ matrix.type }} + config: ${{ matrix.cfg }} \ No newline at end of file diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index d1459e5..1d4b3fd 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -42,7 +42,7 @@ jobs: - uses: ./.github/actions/get_shaderc - - run: | - cmake . -B build -D${{ matrix.type }} --install-prefix ${{ github.workspace }}/install -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE - cmake --build ${{ github.workspace }}/build --config ${{ matrix.cfg }} - cmake --install ${{ github.workspace }}/build --config ${{ matrix.cfg }} \ No newline at end of file + - uses: ./.github/actions/build + with: + type: ${{ matrix.type }} + config: ${{ matrix.cfg }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 069b451..b31f4c6 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ compile_commands.json CTestTestfile.cmake _deps build/ +!.github/actions/build/ .vscode/ .vs/ .DS_Store From 1f9479f59b86bc5df54d6b9aeca7ed32eee50240 Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Sun, 5 Nov 2023 19:56:43 -0500 Subject: [PATCH 24/34] Add some useful arguments to get_shaderc --- .github/actions/get_shaderc/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/get_shaderc/action.yml b/.github/actions/get_shaderc/action.yml index 8bbf0f1..a58eb1a 100644 --- a/.github/actions/get_shaderc/action.yml +++ b/.github/actions/get_shaderc/action.yml @@ -21,6 +21,6 @@ runs: - shell: bash run: | - cmake ${{inputs.source_dir}} -Bbuild/shaderc + cmake ${{inputs.source_dir}} -Bbuild/shaderc -DSHADERC_SKIP_TESTS:BOOL=OFF -DSHADERC_SKIP_EXAMPLES:BOOL=OFF -Wno-dev cmake --build build/shaderc From c546bfd3751350b38ae72e49f14c65ad51a70b13 Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Sun, 5 Nov 2023 20:13:48 -0500 Subject: [PATCH 25/34] add caching --- .github/actions/get_shaderc/action.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/actions/get_shaderc/action.yml b/.github/actions/get_shaderc/action.yml index a58eb1a..ae56c45 100644 --- a/.github/actions/get_shaderc/action.yml +++ b/.github/actions/get_shaderc/action.yml @@ -5,7 +5,11 @@ inputs: source_dir: description: '' required: false - default: 'SHADERC_DIR' + default: SHADERC_DIR + build_dir: + description: "" + required: false + default: build/shaderc build_mode: description: '' required: false @@ -14,13 +18,25 @@ inputs: runs: using: 'composite' steps: + - shell: bash run: | git clone https://github.com/google/shaderc ${{inputs.source_dir}} - cd ${{inputs.source_dir}} + + - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + id: cache-check + with: + key: ${{github.os}}-shaderc-${{ hashFiles('${{inputs.source_dir}}/.git/ORIG_HEAD')}} + path: | + ${{inputs.build_dir}} + ${{inputs.install_dir}} - shell: bash + if: steps.cache-check.outputs.cache-hit != 'true' run: | - cmake ${{inputs.source_dir}} -Bbuild/shaderc -DSHADERC_SKIP_TESTS:BOOL=OFF -DSHADERC_SKIP_EXAMPLES:BOOL=OFF -Wno-dev - cmake --build build/shaderc + cd ${{inputs.source_dir}} && \ + cmake ${{inputs.source_dir}} -B${{inputs.build_dir}} -DSHADERC_SKIP_TESTS:BOOL=OFF -DSHADERC_SKIP_EXAMPLES:BOOL=OFF -Wno-dev && \ + cmake --build ${{inputs.build_dir}} && \ + cd ${{inputs.build_dir}} && \ + cmake --install From 089560f0108a049f47f36aa686b6c4e9fed2cc33 Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Sun, 5 Nov 2023 20:29:13 -0500 Subject: [PATCH 26/34] Use actions/checkout --- .github/actions/get_shaderc/action.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/actions/get_shaderc/action.yml b/.github/actions/get_shaderc/action.yml index ae56c45..8c2e6fd 100644 --- a/.github/actions/get_shaderc/action.yml +++ b/.github/actions/get_shaderc/action.yml @@ -19,9 +19,10 @@ runs: using: 'composite' steps: - - shell: bash - run: | - git clone https://github.com/google/shaderc ${{inputs.source_dir}} + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + path: ${{ inputs.source_dir }} + repository: google/shaderc - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 id: cache-check From e3e54f0da09d3571fee312c8ca27fdcc88111cc4 Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Sun, 5 Nov 2023 21:08:53 -0500 Subject: [PATCH 27/34] Slight issues with get_shaderc --- .github/actions/get_shaderc/action.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/actions/get_shaderc/action.yml b/.github/actions/get_shaderc/action.yml index 8c2e6fd..ac1e914 100644 --- a/.github/actions/get_shaderc/action.yml +++ b/.github/actions/get_shaderc/action.yml @@ -24,10 +24,16 @@ runs: path: ${{ inputs.source_dir }} repository: google/shaderc + - id: ref-check + run: | + cd ${{inputs.source_dir}} + echo "ref=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT + cd .. + - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 id: cache-check with: - key: ${{github.os}}-shaderc-${{ hashFiles('${{inputs.source_dir}}/.git/ORIG_HEAD')}} + key: ${{github.os}}-shaderc-${{ hashFiles('${{steps.ref-check.outputs.ref}}')}} path: | ${{inputs.build_dir}} ${{inputs.install_dir}} @@ -35,7 +41,6 @@ runs: - shell: bash if: steps.cache-check.outputs.cache-hit != 'true' run: | - cd ${{inputs.source_dir}} && \ cmake ${{inputs.source_dir}} -B${{inputs.build_dir}} -DSHADERC_SKIP_TESTS:BOOL=OFF -DSHADERC_SKIP_EXAMPLES:BOOL=OFF -Wno-dev && \ cmake --build ${{inputs.build_dir}} && \ cd ${{inputs.build_dir}} && \ From 30b9805c807e563fc0f98b7d377d576f32545649 Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Sun, 5 Nov 2023 21:10:53 -0500 Subject: [PATCH 28/34] add shell --- .github/actions/get_shaderc/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/get_shaderc/action.yml b/.github/actions/get_shaderc/action.yml index ac1e914..60cfc62 100644 --- a/.github/actions/get_shaderc/action.yml +++ b/.github/actions/get_shaderc/action.yml @@ -25,6 +25,7 @@ runs: repository: google/shaderc - id: ref-check + shell: bash run: | cd ${{inputs.source_dir}} echo "ref=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT From c4b991ce0a30a5cec5f11718235eee9c0ac46975 Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Sun, 5 Nov 2023 21:15:43 -0500 Subject: [PATCH 29/34] Don't know why I set the skips to off --- .github/actions/get_shaderc/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/get_shaderc/action.yml b/.github/actions/get_shaderc/action.yml index 60cfc62..dbd0c8f 100644 --- a/.github/actions/get_shaderc/action.yml +++ b/.github/actions/get_shaderc/action.yml @@ -42,7 +42,7 @@ runs: - shell: bash if: steps.cache-check.outputs.cache-hit != 'true' run: | - cmake ${{inputs.source_dir}} -B${{inputs.build_dir}} -DSHADERC_SKIP_TESTS:BOOL=OFF -DSHADERC_SKIP_EXAMPLES:BOOL=OFF -Wno-dev && \ + cmake ${{inputs.source_dir}} -B${{inputs.build_dir}} -DSHADERC_SKIP_TESTS:BOOL=ON -DSHADERC_SKIP_EXAMPLES:BOOL=ON -Wno-dev && \ cmake --build ${{inputs.build_dir}} && \ cd ${{inputs.build_dir}} && \ cmake --install From 7cbaae371b079aa574944497dac62111b576bf2e Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Sun, 5 Nov 2023 22:29:12 -0500 Subject: [PATCH 30/34] Rework everything again --- .github/actions/get_deps/action.yml | 15 ++++++++ .github/actions/get_shaderc/action.yml | 49 -------------------------- .github/workflows/android.yml | 10 +----- .github/workflows/codeql.yml | 11 +----- .github/workflows/ios.yml | 2 +- .github/workflows/linux.yml | 8 +---- .github/workflows/macos.yml | 8 +---- .github/workflows/windows.yml | 8 +---- 8 files changed, 21 insertions(+), 90 deletions(-) create mode 100644 .github/actions/get_deps/action.yml delete mode 100644 .github/actions/get_shaderc/action.yml diff --git a/.github/actions/get_deps/action.yml b/.github/actions/get_deps/action.yml new file mode 100644 index 0000000..2e0c144 --- /dev/null +++ b/.github/actions/get_deps/action.yml @@ -0,0 +1,15 @@ +name: Get Dependencies + +runs: + using: 'composite' + + steps: + - if: runner.os == 'Linux' + run: sudo apt update && sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libc6-dev && export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH + + - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 + with: + vulkan-query-version: 1.3.204.0 + vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools + vulkan-use-cache: true + diff --git a/.github/actions/get_shaderc/action.yml b/.github/actions/get_shaderc/action.yml deleted file mode 100644 index dbd0c8f..0000000 --- a/.github/actions/get_shaderc/action.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: 'Get Shaderc' -description: 'Builds Shaderc from source' - -inputs: - source_dir: - description: '' - required: false - default: SHADERC_DIR - build_dir: - description: "" - required: false - default: build/shaderc - build_mode: - description: '' - required: false - default: Release - -runs: - using: 'composite' - steps: - - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - path: ${{ inputs.source_dir }} - repository: google/shaderc - - - id: ref-check - shell: bash - run: | - cd ${{inputs.source_dir}} - echo "ref=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT - cd .. - - - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 - id: cache-check - with: - key: ${{github.os}}-shaderc-${{ hashFiles('${{steps.ref-check.outputs.ref}}')}} - path: | - ${{inputs.build_dir}} - ${{inputs.install_dir}} - - - shell: bash - if: steps.cache-check.outputs.cache-hit != 'true' - run: | - cmake ${{inputs.source_dir}} -B${{inputs.build_dir}} -DSHADERC_SKIP_TESTS:BOOL=ON -DSHADERC_SKIP_EXAMPLES:BOOL=ON -Wno-dev && \ - cmake --build ${{inputs.build_dir}} && \ - cd ${{inputs.build_dir}} && \ - cmake --install - diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 3b081d1..de79b64 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -33,15 +33,7 @@ jobs: with: submodules: recursive - - run: sudo apt update && sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libc6-dev && export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH - - - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 - with: - vulkan-query-version: 1.3.204.0 - vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools - vulkan-use-cache: true - - - uses: ./.github/actions/get_shaderc + - uses: ./.github/actions/get_deps - uses: ./.github/actions/build with: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index dd8edf4..6321830 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -62,16 +62,7 @@ jobs: # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. - - - run: sudo apt update && sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libc6-dev && export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH - - - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 - with: - vulkan-query-version: 1.3.204.0 - vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools - vulkan-use-cache: true - - - uses: ./.github/actions/get_shaderc + - uses: ./.github/actions/get_deps - uses: ./.github/actions/build with: diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 1b689e7..0a3be44 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -43,7 +43,7 @@ jobs: vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools vulkan-use-cache: true - - uses: ./.github/actions/get_shaderc + - uses: ./.github/actions/get_deps - uses: ./.github/actions/build with: diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 5a21c49..b0a7f33 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -36,13 +36,7 @@ jobs: - run: sudo apt update && sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libc6-dev && export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH - - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 - with: - vulkan-query-version: 1.3.204.0 - vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools - vulkan-use-cache: true - - - uses: ./.github/actions/get_shaderc + - uses: ./.github/actions/get_deps - uses: ./.github/actions/build with: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index cc92798..1606c07 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -34,13 +34,7 @@ jobs: with: submodules: recursive - - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 - with: - vulkan-query-version: 1.3.204.0 - vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools - vulkan-use-cache: true - - - uses: ./.github/actions/get_shaderc + - uses: ./.github/actions/get_deps - uses: ./.github/actions/build with: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 1d4b3fd..fd77ba3 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -34,13 +34,7 @@ jobs: with: submodules: recursive - - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 - with: - vulkan-query-version: 1.3.204.0 - vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang, SPIRV-Tools - vulkan-use-cache: true - - - uses: ./.github/actions/get_shaderc + - uses: ./.github/actions/get_deps - uses: ./.github/actions/build with: From c3299de682c8e3f9975358b3e0355b8f16ab3246 Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Sun, 5 Nov 2023 22:31:44 -0500 Subject: [PATCH 31/34] forgor shell again --- .github/actions/get_deps/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/get_deps/action.yml b/.github/actions/get_deps/action.yml index 2e0c144..52bcd01 100644 --- a/.github/actions/get_deps/action.yml +++ b/.github/actions/get_deps/action.yml @@ -5,6 +5,7 @@ runs: steps: - if: runner.os == 'Linux' + shell: bash run: sudo apt update && sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev libc6-dev && export LD_LIBRARY_PATH=/usr/local/lib64:$LD_LIBRARY_PATH - uses: humbletim/setup-vulkan-sdk@72eed4b9dbeac5de168f83da8e30b1d0f8ac7f14 # v1.2.0 From 465343d3373070ee3891796c700d1aaa6145ccbb Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Sun, 5 Nov 2023 22:46:54 -0500 Subject: [PATCH 32/34] Make paths absolute --- .github/actions/build/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index ea62fee..153036c 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -13,11 +13,11 @@ inputs: install_dir: required: false description: The directory to install this into - default: install + default: ${{github.workspace}}/install build_dir: required: false description: The directory to build the files into - default: build + default: ${{github.workspace}}/build runs: using: 'composite' From ca724f44f9b08c3cda9df7b78657abb324e158d3 Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Wed, 8 Nov 2023 12:05:51 -0500 Subject: [PATCH 33/34] Ensure that there's no issues with the calver --- CMakeLists.txt | 3 +++ modules/core | 2 +- modules/graphics | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 22a5eb3..bb41303 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,8 +7,11 @@ find_package(Python3 REQUIRED COMPONENTS Interpreter) set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) string(TIMESTAMP maj "%Y") +math(EXPR maj ${maj}) string(TIMESTAMP min "%m") +math(EXPR min ${min}) string(TIMESTAMP rev "%d") +math(EXPR rev ${rev}) project(DragonEngine VERSION ${maj}.${min}.${rev}.0) set(Dragon_FOUND CACHE BOOL "" ON) diff --git a/modules/core b/modules/core index 5682ea7..cf66885 160000 --- a/modules/core +++ b/modules/core @@ -1 +1 @@ -Subproject commit 5682ea78734720ad8f1d30fe8f4d2afb89153949 +Subproject commit cf66885a5f05fd0ab05e99c82d39909e042f7f84 diff --git a/modules/graphics b/modules/graphics index 87ab397..2246980 160000 --- a/modules/graphics +++ b/modules/graphics @@ -1 +1 @@ -Subproject commit 87ab39715614aeb64fc13c925827872a42192d39 +Subproject commit 2246980e2484329784cedd9d2d9f695ffc4f090a From c4778f319ab61c3e9b75fdbab0696d67b7cab94f Mon Sep 17 00:00:00 2001 From: Michael Piccirillo <70709374+Khrysys@users.noreply.github.com> Date: Wed, 20 Dec 2023 09:07:20 -0500 Subject: [PATCH 34/34] Last changes for break --- .github/actions/build/action.yml | 7 +++---- .github/workflows/windows.yml | 3 +++ CMakeLists.txt | 3 ++- modules/audio | 2 +- modules/core | 2 +- modules/graphics | 2 +- 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 153036c..d93a679 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -24,7 +24,6 @@ runs: steps: - shell: bash run: | - - run: | - cmake . -B ${{ inputs.build_dir }} -D${{ inputs.type }} --install-prefix ${{ inputs.install_dir }} -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE - cmake --build ${{ inputs.build_dir }} --config ${{ inputs.config }} - cmake --install ${{ inputs.build_dir }} --config ${{ inputs.config }} + cmake . -B ${{ inputs.build_dir }} -D${{ inputs.type }} --install-prefix ${{ inputs.install_dir }} -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE + cmake --build ${{ inputs.build_dir }} --config ${{ inputs.config }} + cmake --install ${{ inputs.build_dir }} --config ${{ inputs.config }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index fd77ba3..6280d4a 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -35,6 +35,9 @@ jobs: submodules: recursive - uses: ./.github/actions/get_deps + with: + install_dir: ${{github.workspace}}\install + build_dir: ${{github.workspace}}\build - uses: ./.github/actions/build with: diff --git a/CMakeLists.txt b/CMakeLists.txt index bb41303..6ba80db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ project(DragonEngine VERSION ${maj}.${min}.${rev}.0) set(Dragon_FOUND CACHE BOOL "" ON) if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) - set(FMT_MASTER_PROJECT ON) + set(DragonEngine_MASTER_PROJECT CACHE BOOL ON) message(STATUS "CMake version: ${CMAKE_VERSION}") endif () @@ -29,6 +29,7 @@ if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR}) endif() option(Dragon_INSTALL "Toggle to optionally configure the install files for DragonEngine" ON) +option(Dragon_INSTALL_SOURCE "Toggle to optionally install the C++ source files for DragonEngine" ${DragonEngine_MASTER_PROJECT}) option(Dragon_PACKAGE_BUILD "Toggle to optionally configure the CPack generator files" ON) option(Dragon_BUILD_EXAMPLES "Toggle to optionally build all the examples (dginfo is always built)" ON) option(Dragon_BUILD_TESTS "Toggle to optionally not build the tests for DragonEngine" ON) diff --git a/modules/audio b/modules/audio index 14dbfdc..b2b20f5 160000 --- a/modules/audio +++ b/modules/audio @@ -1 +1 @@ -Subproject commit 14dbfdc1d4c8207298927e3b0c6ba8c423149c34 +Subproject commit b2b20f513d2c9727323d627d9be8dd2f00f31299 diff --git a/modules/core b/modules/core index cf66885..0e5b735 160000 --- a/modules/core +++ b/modules/core @@ -1 +1 @@ -Subproject commit cf66885a5f05fd0ab05e99c82d39909e042f7f84 +Subproject commit 0e5b73523681ce7a07cffefbbd1bcca1837f04b2 diff --git a/modules/graphics b/modules/graphics index 2246980..4703a63 160000 --- a/modules/graphics +++ b/modules/graphics @@ -1 +1 @@ -Subproject commit 2246980e2484329784cedd9d2d9f695ffc4f090a +Subproject commit 4703a630e42c8c08d9d6e8823d910b553d96ba6f