From e59b3b8d3a09a4509c61007655c4f9be83a97ac4 Mon Sep 17 00:00:00 2001 From: light7734 Date: Sun, 20 Jul 2025 05:59:54 +0330 Subject: [PATCH 01/23] ci: add ls --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index be38818..c08d634 100644 --- a/.drone.yml +++ b/.drone.yml @@ -18,6 +18,7 @@ steps: - name: greeting commands: - echo 'Hello from Windows 10! :D' + - ls --- kind: pipeline -- 2.45.3 From 306b65df949eeee97037413e175559a3bd7355d6 Mon Sep 17 00:00:00 2001 From: light7734 Date: Sun, 20 Jul 2025 06:01:36 +0330 Subject: [PATCH 02/23] ci: re-enable clone --- .drone.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index c08d634..559a92e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -9,12 +9,7 @@ platform: os: windows arch: amd64 -clone: - disable: true steps: -- name: clone - environment: - HOME: C:\Users\username\ - name: greeting commands: - echo 'Hello from Windows 10! :D' -- 2.45.3 From b1bca72f6ffb0e1c79514bf5d3c3dbbea9a201d8 Mon Sep 17 00:00:00 2001 From: light7734 Date: Sun, 20 Jul 2025 06:02:53 +0330 Subject: [PATCH 03/23] ci: check conan version --- .drone.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 559a92e..67b7bbe 100644 --- a/.drone.yml +++ b/.drone.yml @@ -12,8 +12,7 @@ platform: steps: - name: greeting commands: - - echo 'Hello from Windows 10! :D' - - ls + - conan --version --- kind: pipeline -- 2.45.3 From 034a6c7537025315d99d3d50e10243aed3cddd32 Mon Sep 17 00:00:00 2001 From: light7734 Date: Sun, 20 Jul 2025 06:06:31 +0330 Subject: [PATCH 04/23] ci: wip --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 67b7bbe..8b7e2be 100644 --- a/.drone.yml +++ b/.drone.yml @@ -12,7 +12,7 @@ platform: steps: - name: greeting commands: - - conan --version + - conan.exe --version --- kind: pipeline -- 2.45.3 From 8df6e7967f9b9722c40aa23eab3e69b8f2e75ad3 Mon Sep 17 00:00:00 2001 From: light7734 Date: Sun, 20 Jul 2025 06:10:27 +0330 Subject: [PATCH 05/23] ci: wip --- .drone.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.drone.yml b/.drone.yml index 8b7e2be..acc9a82 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,7 +11,9 @@ platform: steps: - name: greeting + shell: powershell commands: + - echo $Env:PATH - conan.exe --version --- -- 2.45.3 From 1bdfa1fac02b1bea123d080773dcd7a25eaba241 Mon Sep 17 00:00:00 2001 From: light7734 Date: Sun, 20 Jul 2025 06:16:06 +0330 Subject: [PATCH 06/23] ci: wip --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index acc9a82..0d2da16 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,7 +1,7 @@ --- kind: pipeline type: exec -name: macrohard doors +name: build msvc amd64 trigger: branch: - main @@ -14,7 +14,7 @@ steps: shell: powershell commands: - echo $Env:PATH - - conan.exe --version + - conan --version --- kind: pipeline -- 2.45.3 From 48bf9eb0336fb0a0d7b3b3b12fb9eada4efe0792 Mon Sep 17 00:00:00 2001 From: light7734 Date: Sun, 20 Jul 2025 06:20:54 +0330 Subject: [PATCH 07/23] ci: wip --- .drone.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0d2da16..d403e36 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,8 +13,15 @@ steps: - name: greeting shell: powershell commands: - - echo $Env:PATH - - conan --version + - | + echo $Env:PATH + conan build . \ + -c tools.system.package_manager:mode=install \ + -c tools.cmake.cmaketoolchain:generator=Ninja \ + -s build_type=Release \ + -o enable_tests=True \ + --build=missing + --- kind: pipeline -- 2.45.3 From bcfbc5c1c1786c445de7ba74c6529c54f5f422e6 Mon Sep 17 00:00:00 2001 From: light7734 Date: Sun, 20 Jul 2025 06:22:02 +0330 Subject: [PATCH 08/23] ci: wip --- .drone.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index d403e36..76be235 100644 --- a/.drone.yml +++ b/.drone.yml @@ -15,12 +15,7 @@ steps: commands: - | echo $Env:PATH - conan build . \ - -c tools.system.package_manager:mode=install \ - -c tools.cmake.cmaketoolchain:generator=Ninja \ - -s build_type=Release \ - -o enable_tests=True \ - --build=missing + conan build . -c tools.system.package_manager:mode=install -c tools.cmake.cmaketoolchain:generator=Ninja -s build_type=Release -o enable_tests=True --build=missing --- -- 2.45.3 From d1caf1df5b1dcc8ca303683e64c12106a8816c93 Mon Sep 17 00:00:00 2001 From: light7734 Date: Sun, 20 Jul 2025 06:22:51 +0330 Subject: [PATCH 09/23] ci: wip --- .drone.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 76be235..9bd23e0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -14,7 +14,6 @@ steps: shell: powershell commands: - | - echo $Env:PATH conan build . -c tools.system.package_manager:mode=install -c tools.cmake.cmaketoolchain:generator=Ninja -s build_type=Release -o enable_tests=True --build=missing -- 2.45.3 From f21e6450cd6f29756f08637361bcb3b97cfea853 Mon Sep 17 00:00:00 2001 From: light7734 Date: Sun, 20 Jul 2025 06:32:24 +0330 Subject: [PATCH 10/23] ci: wip --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index 9bd23e0..2b7cc76 100644 --- a/.drone.yml +++ b/.drone.yml @@ -14,6 +14,7 @@ steps: shell: powershell commands: - | + $Env:PYTHONUNBUFFERED = "1" conan build . -c tools.system.package_manager:mode=install -c tools.cmake.cmaketoolchain:generator=Ninja -s build_type=Release -o enable_tests=True --build=missing -- 2.45.3 From bf2bf1e1a1a9afbb7ec63a26dbbfdfe7ac52f382 Mon Sep 17 00:00:00 2001 From: light7734 Date: Sun, 20 Jul 2025 06:33:21 +0330 Subject: [PATCH 11/23] ci: wip --- .drone.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 2b7cc76..9ab5dd2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,10 +13,7 @@ steps: - name: greeting shell: powershell commands: - - | - $Env:PYTHONUNBUFFERED = "1" - conan build . -c tools.system.package_manager:mode=install -c tools.cmake.cmaketoolchain:generator=Ninja -s build_type=Release -o enable_tests=True --build=missing - + - python -u "$(Get-Command conan | Select-Object -ExpandProperty Source)" --version --- kind: pipeline -- 2.45.3 From 253a8216a2da3ec13705c81e5a77ec2aabab3454 Mon Sep 17 00:00:00 2001 From: light7734 Date: Sun, 20 Jul 2025 06:34:22 +0330 Subject: [PATCH 12/23] ci: wip --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 9ab5dd2..76068e6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,7 +13,7 @@ steps: - name: greeting shell: powershell commands: - - python -u "$(Get-Command conan | Select-Object -ExpandProperty Source)" --version + - python.exe -u "$(Get-Command conan | Select-Object -ExpandProperty Source)" --version --- kind: pipeline -- 2.45.3 From cb5b97dddb2cbb67f2f00e196d2dd95c8f853945 Mon Sep 17 00:00:00 2001 From: light7734 Date: Sun, 20 Jul 2025 06:49:12 +0330 Subject: [PATCH 13/23] ci: wip --- .drone.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 76068e6..3f31c66 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,7 +13,7 @@ steps: - name: greeting shell: powershell commands: - - python.exe -u "$(Get-Command conan | Select-Object -ExpandProperty Source)" --version + - conan build . -s build_type=Release --- kind: pipeline @@ -35,7 +35,6 @@ steps: -c tools.system.package_manager:mode=install \ -c tools.cmake.cmaketoolchain:generator=Ninja \ -s build_type=Release \ - -o enable_static_analysis=False \ -o enable_tests=True \ -o use_mold=True \ --build=missing @@ -65,7 +64,6 @@ steps: -c tools.system.package_manager:mode=install \ -c tools.cmake.cmaketoolchain:generator=Ninja \ -s build_type=Release \ - -o enable_static_analysis=False \ -o enable_tests=True \ -o use_mold=True \ --build=missing -- 2.45.3 From 8f12d76401ebc62aa3fdd8a6e9c039649ac76ea0 Mon Sep 17 00:00:00 2001 From: light7734 Date: Sun, 20 Jul 2025 06:51:01 +0330 Subject: [PATCH 14/23] ci: wip --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index 3f31c66..5cf4e96 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,6 +13,7 @@ steps: - name: greeting shell: powershell commands: + - conan profile detect - conan build . -s build_type=Release --- -- 2.45.3 From 9662f97095de4bd18c37fa62304f7181f49d3f5c Mon Sep 17 00:00:00 2001 From: light7734 Date: Sun, 20 Jul 2025 06:56:20 +0330 Subject: [PATCH 15/23] ci: wip --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 5cf4e96..dd25681 100644 --- a/.drone.yml +++ b/.drone.yml @@ -14,7 +14,7 @@ steps: shell: powershell commands: - conan profile detect - - conan build . -s build_type=Release + - conan build . -s compiler.cppstd=20 -s build_type=Release --- kind: pipeline -- 2.45.3 From 90a1a06bbe7394efda8518d46afb241ed20b1bf7 Mon Sep 17 00:00:00 2001 From: light7734 Date: Sun, 20 Jul 2025 07:10:08 +0330 Subject: [PATCH 16/23] build: fix build on windows --- modules/mirror/private/panels/asset_browser.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/mirror/private/panels/asset_browser.cpp b/modules/mirror/private/panels/asset_browser.cpp index cd04799..9f58c5e 100644 --- a/modules/mirror/private/panels/asset_browser.cpp +++ b/modules/mirror/private/panels/asset_browser.cpp @@ -82,14 +82,15 @@ void AssetBrowserPanel::on_user_interface_update() } // Button + const auto path_str = path.string(); ImGui::TableNextColumn(); - ImGui::PushID(path.c_str()); + ImGui::PushID(path_str.c_str()); switch (asset_type) { // Directory case AssetType::directory: if (ImGui::ImageButton( - path.c_str(), + path_str.c_str(), m_directory_texture->get_texture(), ImVec2(m_file_size, m_file_size) )) @@ -101,7 +102,7 @@ void AssetBrowserPanel::on_user_interface_update() // Scene case AssetType::scene: if (ImGui::ImageButton( - path.c_str(), + path_str.c_str(), m_scene_texture->get_texture(), ImVec2(m_file_size, m_file_size) )) @@ -115,7 +116,7 @@ void AssetBrowserPanel::on_user_interface_update() // Image case AssetType::image: if (ImGui::ImageButton( - path.c_str(), + path_str.c_str(), m_image_texture->get_texture(), ImVec2(m_file_size, m_file_size) )) @@ -126,7 +127,7 @@ void AssetBrowserPanel::on_user_interface_update() // Text case AssetType::text: if (ImGui::ImageButton( - path.c_str(), + path_str.c_str(), m_text_texture->get_texture(), ImVec2(m_file_size, m_file_size) )) -- 2.45.3 From 57031ee44e4b6879ce8b438c3663c02bf5b56571 Mon Sep 17 00:00:00 2001 From: light7734 Date: Sun, 20 Jul 2025 07:28:21 +0330 Subject: [PATCH 17/23] ci: update .drone.yml --- .drone.yml | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/.drone.yml b/.drone.yml index dd25681..4f1afeb 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,7 +1,7 @@ --- kind: pipeline type: exec -name: build msvc amd64 +name: amd64_msvc — tests trigger: branch: - main @@ -10,22 +10,37 @@ platform: arch: amd64 steps: -- name: greeting +- name: tests shell: powershell commands: - - conan profile detect - - conan build . -s compiler.cppstd=20 -s build_type=Release + - | + conan profile detect + + conan build . -s compiler.cppstd=20 -s build_type=Release + + $tests = Get-ChildItem -Path "./build" -Recurse -File | Where-Object { + $_.Name -like "*_tests.exe" + } + + foreach ($test in $tests) { + Write-Host "Running $($test.FullName)" + & $test.FullName + if ($LASTEXITCODE -ne 0) { + Write-Error "Test $($test.Name) failed! T_T" + exit $LASTEXITCODE + } + } --- kind: pipeline type: docker -name: unit tests +name: amd64_gcc — tests trigger: branch: - main steps: -- name: unit tests +- name: tests image: unit_tests:latest pull: if-not-exists commands: @@ -48,7 +63,7 @@ steps: --- kind: pipeline type: docker -name: valgrind +name: amd64_gcc — valgrind trigger: branch: - main @@ -74,7 +89,7 @@ steps: --- kind: pipeline type: docker -name: leak sanitizer +name: amd64_clang — sanitizer — leak trigger: branch: - main @@ -133,7 +148,7 @@ steps: --- kind: pipeline type: docker -name: clang format +name: style trigger: branch: - main -- 2.45.3 From 3520ae36a6f2485978df93e50ce70a623e348b6b Mon Sep 17 00:00:00 2001 From: light7734 Date: Sun, 20 Jul 2025 07:30:59 +0330 Subject: [PATCH 18/23] ci: update .drone.yml --- .drone.yml | 152 +++++++++++++++++++++++++---------------------------- 1 file changed, 72 insertions(+), 80 deletions(-) diff --git a/.drone.yml b/.drone.yml index 4f1afeb..0835ece 100644 --- a/.drone.yml +++ b/.drone.yml @@ -12,24 +12,23 @@ platform: steps: - name: tests shell: powershell - commands: - - | - conan profile detect + commands: | + conan profile detect - conan build . -s compiler.cppstd=20 -s build_type=Release + conan build . -s compiler.cppstd=20 -s build_type=Release - $tests = Get-ChildItem -Path "./build" -Recurse -File | Where-Object { - $_.Name -like "*_tests.exe" - } + $tests = Get-ChildItem -Path "./build" -Recurse -File | Where-Object { + $_.Name -like "*_tests.exe" + } - foreach ($test in $tests) { - Write-Host "Running $($test.FullName)" - & $test.FullName - if ($LASTEXITCODE -ne 0) { - Write-Error "Test $($test.Name) failed! T_T" - exit $LASTEXITCODE - } - } + foreach ($test in $tests) { + Write-Host "Running $($test.FullName)" + & $test.FullName + if ($LASTEXITCODE -ne 0) { + Write-Error "Test $($test.Name) failed! T_T" + exit $LASTEXITCODE + } + } --- kind: pipeline @@ -43,22 +42,20 @@ steps: - name: tests image: unit_tests:latest pull: if-not-exists - commands: - - | - set -e + commands: | + set -e + conan build . \ + -c tools.system.package_manager:mode=install \ + -c tools.cmake.cmaketoolchain:generator=Ninja \ + -s build_type=Release \ + -o enable_tests=True \ + -o use_mold=True \ + --build=missing - conan build . \ - -c tools.system.package_manager:mode=install \ - -c tools.cmake.cmaketoolchain:generator=Ninja \ - -s build_type=Release \ - -o enable_tests=True \ - -o use_mold=True \ - --build=missing - - for test in $(find ./build -type f -name '*_tests' -executable); do - echo "Running $test" - "$test" - done + for test in $(find ./build -type f -name '*_tests' -executable); do + echo "Running $test" + "$test" + done --- kind: pipeline @@ -72,19 +69,17 @@ steps: - name: valgrind image: valgrind:latest pull: if-not-exists - commands: - - | - set -e + commands: | + set -e + conan build . \ + -c tools.system.package_manager:mode=install \ + -c tools.cmake.cmaketoolchain:generator=Ninja \ + -s build_type=Release \ + -o enable_tests=True \ + -o use_mold=True \ + --build=missing - conan build . \ - -c tools.system.package_manager:mode=install \ - -c tools.cmake.cmaketoolchain:generator=Ninja \ - -s build_type=Release \ - -o enable_tests=True \ - -o use_mold=True \ - --build=missing - - find ./build -type f -name "*_tests" -executable | xargs -I {} bash -c 'valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --error-exitcode=255 {}' || exit 1 + find ./build -type f -name "*_tests" -executable | xargs -I {} bash -c 'valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --error-exitcode=255 {}' || exit 1 --- kind: pipeline @@ -98,28 +93,26 @@ steps: - name: leak sanitizer image: leak_sanitizer:latest pull: if-not-exists - commands: - - | - set -e - - conan build . \ - -c tools.system.package_manager:mode=install \ - -c tools.cmake.cmaketoolchain:generator=Ninja \ - -c tools.build:cxxflags='["-g", "-fno-omit-frame-pointer", "-nostdinc++", "-isystem", "/libcxx_lsan/include/c++/v1/", "-fsanitize=leak"]' \ - -c tools.build:sharedlinkflags='["-L/libcxx_lsan/lib", "-Wl,-rpath,/libcxx_lsan/lib", "-lc++", "-lc++abi", "-fsanitize=leak"]' \ - -c tools.build:exelinkflags='["-L/libcxx_lsan/lib", "-Wl,-rpath,/libcxx_lsan/lib", "-lc++", "-lc++abi", "-fsanitize=leak"]' \ - -c tools.info.package_id:confs='["tools.build:cxxflags","tools.build:sharedlinkflags","tools.build:exelinkflags"]' \ - -c tools.build:compiler_executables='{"c": "clang", "cpp": "clang++"}' \ - -s build_type=Release \ - -s compiler=clang \ - -s compiler.version=20 \ - -s compiler.libcxx=libc++ \ - -o use_mold=True \ - --build=missing - for test in $(find ./build -type f -name '*_tests' -executable); do - echo "Running $test" - "$test" - done + commands: | + set -e + conan build . \ + -c tools.system.package_manager:mode=install \ + -c tools.cmake.cmaketoolchain:generator=Ninja \ + -c tools.build:cxxflags='["-g", "-fno-omit-frame-pointer", "-nostdinc++", "-isystem", "/libcxx_lsan/include/c++/v1/", "-fsanitize=leak"]' \ + -c tools.build:sharedlinkflags='["-L/libcxx_lsan/lib", "-Wl,-rpath,/libcxx_lsan/lib", "-lc++", "-lc++abi", "-fsanitize=leak"]' \ + -c tools.build:exelinkflags='["-L/libcxx_lsan/lib", "-Wl,-rpath,/libcxx_lsan/lib", "-lc++", "-lc++abi", "-fsanitize=leak"]' \ + -c tools.info.package_id:confs='["tools.build:cxxflags","tools.build:sharedlinkflags","tools.build:exelinkflags"]' \ + -c tools.build:compiler_executables='{"c": "clang", "cpp": "clang++"}' \ + -s build_type=Release \ + -s compiler=clang \ + -s compiler.version=20 \ + -s compiler.libcxx=libc++ \ + -o use_mold=True \ + --build=missing + for test in $(find ./build -type f -name '*_tests' -executable); do + echo "Running $test" + "$test" + done --- kind: pipeline @@ -157,22 +150,21 @@ steps: - name: clang format image: clang_format:latest pull: if-not-exists - commands: - - | - set -e - clang-format --version - has_fomatting_issues=0 + commands: | + set -e + clang-format --version + has_fomatting_issues=0 - for file in $(find ./modules -name '*.?pp'); do - echo "Checking format for $file" - if ! clang-format --dry-run --Werror "$file"; then - echo "❌ Formatting issue detected in $file" - has_fomatting_issues=1 - fi - done - - if [ "$has_fomatting_issues" -eq 0 ]; then - echo "✅ All files are properly formatted! Well done! ^~^" + for file in $(find ./modules -name '*.?pp'); do + echo "Checking format for $file" + if ! clang-format --dry-run --Werror "$file"; then + echo "❌ Formatting issue detected in $file" + has_fomatting_issues=1 fi + done - exit ${has_fomatting_issues} + if [ "$has_fomatting_issues" -eq 0 ]; then + echo "✅ All files are properly formatted! Well done! ^~^" + fi + + exit ${has_fomatting_issues} -- 2.45.3 From 144ca1aa4faf7d7fbe0f2d4245fa47be77bec302 Mon Sep 17 00:00:00 2001 From: light7734 Date: Sun, 20 Jul 2025 07:38:46 +0330 Subject: [PATCH 19/23] refactor: extract shell commands from .drone.yml to separate script files --- .drone.yml | 96 ++------------------ tools/ci/steps/amd64_clang_sanitizer_leak.sh | 23 +++++ tools/ci/steps/amd64_gcc_tests.sh | 16 ++++ tools/ci/steps/amd64_gcc_valgrind.sh | 12 +++ tools/ci/steps/amd64_msvc_tests.ps1 | 16 ++++ tools/ci/steps/static_analysis.sh | 12 +++ tools/ci/steps/style.sh | 18 ++++ 7 files changed, 103 insertions(+), 90 deletions(-) create mode 100755 tools/ci/steps/amd64_clang_sanitizer_leak.sh create mode 100755 tools/ci/steps/amd64_gcc_tests.sh create mode 100755 tools/ci/steps/amd64_gcc_valgrind.sh create mode 100644 tools/ci/steps/amd64_msvc_tests.ps1 create mode 100755 tools/ci/steps/static_analysis.sh create mode 100755 tools/ci/steps/style.sh diff --git a/.drone.yml b/.drone.yml index 0835ece..1c2e327 100644 --- a/.drone.yml +++ b/.drone.yml @@ -12,23 +12,7 @@ platform: steps: - name: tests shell: powershell - commands: | - conan profile detect - - conan build . -s compiler.cppstd=20 -s build_type=Release - - $tests = Get-ChildItem -Path "./build" -Recurse -File | Where-Object { - $_.Name -like "*_tests.exe" - } - - foreach ($test in $tests) { - Write-Host "Running $($test.FullName)" - & $test.FullName - if ($LASTEXITCODE -ne 0) { - Write-Error "Test $($test.Name) failed! T_T" - exit $LASTEXITCODE - } - } + commands: ./tools/ci/steps/amd64_msvc_tests.ps1 --- kind: pipeline @@ -42,20 +26,7 @@ steps: - name: tests image: unit_tests:latest pull: if-not-exists - commands: | - set -e - conan build . \ - -c tools.system.package_manager:mode=install \ - -c tools.cmake.cmaketoolchain:generator=Ninja \ - -s build_type=Release \ - -o enable_tests=True \ - -o use_mold=True \ - --build=missing - - for test in $(find ./build -type f -name '*_tests' -executable); do - echo "Running $test" - "$test" - done + commands: ./tools/ci/steps/amd64_gcc_tests.sh --- kind: pipeline @@ -69,17 +40,7 @@ steps: - name: valgrind image: valgrind:latest pull: if-not-exists - commands: | - set -e - conan build . \ - -c tools.system.package_manager:mode=install \ - -c tools.cmake.cmaketoolchain:generator=Ninja \ - -s build_type=Release \ - -o enable_tests=True \ - -o use_mold=True \ - --build=missing - - find ./build -type f -name "*_tests" -executable | xargs -I {} bash -c 'valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --error-exitcode=255 {}' || exit 1 + commands: ./tools/ci/steps/amd64_gcc_valgrind.sh --- kind: pipeline @@ -93,26 +54,7 @@ steps: - name: leak sanitizer image: leak_sanitizer:latest pull: if-not-exists - commands: | - set -e - conan build . \ - -c tools.system.package_manager:mode=install \ - -c tools.cmake.cmaketoolchain:generator=Ninja \ - -c tools.build:cxxflags='["-g", "-fno-omit-frame-pointer", "-nostdinc++", "-isystem", "/libcxx_lsan/include/c++/v1/", "-fsanitize=leak"]' \ - -c tools.build:sharedlinkflags='["-L/libcxx_lsan/lib", "-Wl,-rpath,/libcxx_lsan/lib", "-lc++", "-lc++abi", "-fsanitize=leak"]' \ - -c tools.build:exelinkflags='["-L/libcxx_lsan/lib", "-Wl,-rpath,/libcxx_lsan/lib", "-lc++", "-lc++abi", "-fsanitize=leak"]' \ - -c tools.info.package_id:confs='["tools.build:cxxflags","tools.build:sharedlinkflags","tools.build:exelinkflags"]' \ - -c tools.build:compiler_executables='{"c": "clang", "cpp": "clang++"}' \ - -s build_type=Release \ - -s compiler=clang \ - -s compiler.version=20 \ - -s compiler.libcxx=libc++ \ - -o use_mold=True \ - --build=missing - for test in $(find ./build -type f -name '*_tests' -executable); do - echo "Running $test" - "$test" - done + commands: ./tools/ci/steps/amd64_clang_sanitizer_leak.sh --- kind: pipeline @@ -127,16 +69,7 @@ steps: image: static_analysis:latest pull: if-not-exists privileged: true - commands: - - | - conan build . \ - -c tools.system.package_manager:mode=install \ - -c tools.cmake.cmaketoolchain:generator=Ninja \ - -s build_type=Release \ - -o enable_static_analysis=True \ - -o enable_tests=True \ - -o use_mold=True \ - --build=missing + commands: ./tools/ci/steps/static_analysis.sh --- kind: pipeline @@ -150,21 +83,4 @@ steps: - name: clang format image: clang_format:latest pull: if-not-exists - commands: | - set -e - clang-format --version - has_fomatting_issues=0 - - for file in $(find ./modules -name '*.?pp'); do - echo "Checking format for $file" - if ! clang-format --dry-run --Werror "$file"; then - echo "❌ Formatting issue detected in $file" - has_fomatting_issues=1 - fi - done - - if [ "$has_fomatting_issues" -eq 0 ]; then - echo "✅ All files are properly formatted! Well done! ^~^" - fi - - exit ${has_fomatting_issues} + commands: ./tools/ci/steps/style.sh diff --git a/tools/ci/steps/amd64_clang_sanitizer_leak.sh b/tools/ci/steps/amd64_clang_sanitizer_leak.sh new file mode 100755 index 0000000..4a6871f --- /dev/null +++ b/tools/ci/steps/amd64_clang_sanitizer_leak.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +set -e + +conan build . \ + -c tools.system.package_manager:mode=install \ + -c tools.cmake.cmaketoolchain:generator=Ninja \ + -c tools.build:cxxflags='["-g", "-fno-omit-frame-pointer", "-nostdinc++", "-isystem", "/libcxx_lsan/include/c++/v1/", "-fsanitize=leak"]' \ + -c tools.build:sharedlinkflags='["-L/libcxx_lsan/lib", "-Wl,-rpath,/libcxx_lsan/lib", "-lc++", "-lc++abi", "-fsanitize=leak"]' \ + -c tools.build:exelinkflags='["-L/libcxx_lsan/lib", "-Wl,-rpath,/libcxx_lsan/lib", "-lc++", "-lc++abi", "-fsanitize=leak"]' \ + -c tools.info.package_id:confs='["tools.build:cxxflags","tools.build:sharedlinkflags","tools.build:exelinkflags"]' \ + -c tools.build:compiler_executables='{"c": "clang", "cpp": "clang++"}' \ + -s build_type=Release \ + -s compiler=clang \ + -s compiler.version=20 \ + -s compiler.libcxx=libc++ \ + -o use_mold=True \ + --build=missing + +for test in $(find ./build -type f -name '*_tests' -executable); do + echo "Running $test" + "$test" +done diff --git a/tools/ci/steps/amd64_gcc_tests.sh b/tools/ci/steps/amd64_gcc_tests.sh new file mode 100755 index 0000000..208ee8d --- /dev/null +++ b/tools/ci/steps/amd64_gcc_tests.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -e + +conan build . \ + -c tools.system.package_manager:mode=install \ + -c tools.cmake.cmaketoolchain:generator=Ninja \ + -s build_type=Release \ + -o enable_tests=True \ + -o use_mold=True \ + --build=missing + +for test in $(find ./build -type f -name '*_tests' -executable); do + echo "Running $test" + "$test" +done diff --git a/tools/ci/steps/amd64_gcc_valgrind.sh b/tools/ci/steps/amd64_gcc_valgrind.sh new file mode 100755 index 0000000..cba4ed7 --- /dev/null +++ b/tools/ci/steps/amd64_gcc_valgrind.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e +conan build . \ + -c tools.system.package_manager:mode=install \ + -c tools.cmake.cmaketoolchain:generator=Ninja \ + -s build_type=Release \ + -o enable_tests=True \ + -o use_mold=True \ + --build=missing + +find ./build -type f -name "*_tests" -executable | xargs -I {} bash -c 'valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --error-exitcode=255 {}' || exit 1 diff --git a/tools/ci/steps/amd64_msvc_tests.ps1 b/tools/ci/steps/amd64_msvc_tests.ps1 new file mode 100644 index 0000000..fd603bb --- /dev/null +++ b/tools/ci/steps/amd64_msvc_tests.ps1 @@ -0,0 +1,16 @@ +conan profile detect +conan build . -s compiler.cppstd=20 -s build_type=Release + +$tests = Get-ChildItem -Path "./build" -Recurse -File | Where-Object { + $_.Name -like "*_tests.exe" +} + +foreach ($test in $tests) { + Write-Host "Running $($test.FullName)" + & $test.FullName + if ($LASTEXITCODE -ne 0) { + Write-Error "Test $($test.Name) failed! T_T" + exit $LASTEXITCODE + } +} + diff --git a/tools/ci/steps/static_analysis.sh b/tools/ci/steps/static_analysis.sh new file mode 100755 index 0000000..c44974a --- /dev/null +++ b/tools/ci/steps/static_analysis.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +conan build . \ +-c tools.system.package_manager:mode=install \ +-c tools.cmake.cmaketoolchain:generator=Ninja \ +-s build_type=Release \ +-o enable_static_analysis=True \ +-o enable_tests=True \ +-o use_mold=True \ +--build=missing diff --git a/tools/ci/steps/style.sh b/tools/ci/steps/style.sh new file mode 100755 index 0000000..6c1aa46 --- /dev/null +++ b/tools/ci/steps/style.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -e + +has_fomatting_issues=0 +for file in $(find ./modules -name '*.?pp'); do + echo "Checking format for $file" + if ! clang-format --dry-run --Werror "$file"; then + echo "❌ Formatting issue detected in $file" + has_fomatting_issues=1 + fi +done + +if [ "$has_fomatting_issues" -eq 0 ]; then + echo "✅ All files are properly formatted! Well done! ^~^" +fi + +exit ${has_fomatting_issues} -- 2.45.3 From 6ecb2681961bb757ba55953ade01b86e1509058e Mon Sep 17 00:00:00 2001 From: light7734 Date: Sun, 20 Jul 2025 07:39:56 +0330 Subject: [PATCH 20/23] fix: formatting issues --- .drone.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index 1c2e327..94ab086 100644 --- a/.drone.yml +++ b/.drone.yml @@ -12,7 +12,8 @@ platform: steps: - name: tests shell: powershell - commands: ./tools/ci/steps/amd64_msvc_tests.ps1 + commands: + - ./tools/ci/steps/amd64_msvc_tests.ps1 --- kind: pipeline @@ -26,7 +27,8 @@ steps: - name: tests image: unit_tests:latest pull: if-not-exists - commands: ./tools/ci/steps/amd64_gcc_tests.sh + commands: + - ./tools/ci/steps/amd64_gcc_tests.sh --- kind: pipeline @@ -40,7 +42,8 @@ steps: - name: valgrind image: valgrind:latest pull: if-not-exists - commands: ./tools/ci/steps/amd64_gcc_valgrind.sh + commands: + - ./tools/ci/steps/amd64_gcc_valgrind.sh --- kind: pipeline @@ -54,7 +57,8 @@ steps: - name: leak sanitizer image: leak_sanitizer:latest pull: if-not-exists - commands: ./tools/ci/steps/amd64_clang_sanitizer_leak.sh + commands: + - ./tools/ci/steps/amd64_clang_sanitizer_leak.sh --- kind: pipeline @@ -69,7 +73,8 @@ steps: image: static_analysis:latest pull: if-not-exists privileged: true - commands: ./tools/ci/steps/static_analysis.sh + commands: + - ./tools/ci/steps/static_analysis.sh --- kind: pipeline @@ -83,4 +88,5 @@ steps: - name: clang format image: clang_format:latest pull: if-not-exists - commands: ./tools/ci/steps/style.sh + commands: + - ./tools/ci/steps/style.sh -- 2.45.3 From 9909f5c430b991ca476368715d9b43278432faf4 Mon Sep 17 00:00:00 2001 From: light7734 Date: Sun, 20 Jul 2025 07:58:41 +0330 Subject: [PATCH 21/23] ci: refactors --- .drone.yml | 25 ++++++------------- .../clang/lsan.sh} | 2 ++ .../gcc/unit-tests.sh} | 2 ++ .../gcc/valgrind.sh} | 3 +++ .../{ => amd64/msvc}/amd64_msvc_tests.ps1 | 0 tools/ci/steps/static_analysis.sh | 2 ++ tools/ci/steps/style.sh | 1 + tools/scripts/build_ci_images.sh | 4 +++ 8 files changed, 22 insertions(+), 17 deletions(-) rename tools/ci/steps/{amd64_clang_sanitizer_leak.sh => amd64/clang/lsan.sh} (94%) rename tools/ci/steps/{amd64_gcc_tests.sh => amd64/gcc/unit-tests.sh} (86%) rename tools/ci/steps/{amd64_gcc_valgrind.sh => amd64/gcc/valgrind.sh} (88%) rename tools/ci/steps/{ => amd64/msvc}/amd64_msvc_tests.ps1 (100%) diff --git a/.drone.yml b/.drone.yml index 94ab086..aee059d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,7 +1,7 @@ --- kind: pipeline type: exec -name: amd64_msvc — tests +name: amd64 — msvc trigger: branch: - main @@ -10,7 +10,7 @@ platform: arch: amd64 steps: -- name: tests +- name: unit tests shell: powershell commands: - ./tools/ci/steps/amd64_msvc_tests.ps1 @@ -18,37 +18,28 @@ steps: --- kind: pipeline type: docker -name: amd64_gcc — tests +name: amd64 — gcc trigger: branch: - main steps: -- name: tests +- name: unit tests image: unit_tests:latest pull: if-not-exists commands: - - ./tools/ci/steps/amd64_gcc_tests.sh + - ./tools/ci/steps/amd64/gcc/unit-tests.sh ---- -kind: pipeline -type: docker -name: amd64_gcc — valgrind -trigger: - branch: - - main - -steps: - name: valgrind image: valgrind:latest pull: if-not-exists commands: - - ./tools/ci/steps/amd64_gcc_valgrind.sh + - ./tools/ci/steps/amd64/gcc/valgrind.sh --- kind: pipeline type: docker -name: amd64_clang — sanitizer — leak +name: amd64 — clang trigger: branch: - main @@ -58,7 +49,7 @@ steps: image: leak_sanitizer:latest pull: if-not-exists commands: - - ./tools/ci/steps/amd64_clang_sanitizer_leak.sh + - ./tools/ci/steps/amd64/clang/lsan.sh --- kind: pipeline diff --git a/tools/ci/steps/amd64_clang_sanitizer_leak.sh b/tools/ci/steps/amd64/clang/lsan.sh similarity index 94% rename from tools/ci/steps/amd64_clang_sanitizer_leak.sh rename to tools/ci/steps/amd64/clang/lsan.sh index 4a6871f..636f384 100755 --- a/tools/ci/steps/amd64_clang_sanitizer_leak.sh +++ b/tools/ci/steps/amd64/clang/lsan.sh @@ -1,6 +1,8 @@ #!/bin/bash set -e +cd $(git rev-parse --show-toplevel)/ +rm -rf ./build conan build . \ -c tools.system.package_manager:mode=install \ diff --git a/tools/ci/steps/amd64_gcc_tests.sh b/tools/ci/steps/amd64/gcc/unit-tests.sh similarity index 86% rename from tools/ci/steps/amd64_gcc_tests.sh rename to tools/ci/steps/amd64/gcc/unit-tests.sh index 208ee8d..a23b555 100755 --- a/tools/ci/steps/amd64_gcc_tests.sh +++ b/tools/ci/steps/amd64/gcc/unit-tests.sh @@ -1,6 +1,8 @@ #!/bin/bash set -e +cd $(git rev-parse --show-toplevel)/ +rm -rf ./build conan build . \ -c tools.system.package_manager:mode=install \ diff --git a/tools/ci/steps/amd64_gcc_valgrind.sh b/tools/ci/steps/amd64/gcc/valgrind.sh similarity index 88% rename from tools/ci/steps/amd64_gcc_valgrind.sh rename to tools/ci/steps/amd64/gcc/valgrind.sh index cba4ed7..453f8aa 100755 --- a/tools/ci/steps/amd64_gcc_valgrind.sh +++ b/tools/ci/steps/amd64/gcc/valgrind.sh @@ -1,6 +1,9 @@ #!/bin/bash set -e +cd $(git rev-parse --show-toplevel)/ +rm -rf ./build + conan build . \ -c tools.system.package_manager:mode=install \ -c tools.cmake.cmaketoolchain:generator=Ninja \ diff --git a/tools/ci/steps/amd64_msvc_tests.ps1 b/tools/ci/steps/amd64/msvc/amd64_msvc_tests.ps1 similarity index 100% rename from tools/ci/steps/amd64_msvc_tests.ps1 rename to tools/ci/steps/amd64/msvc/amd64_msvc_tests.ps1 diff --git a/tools/ci/steps/static_analysis.sh b/tools/ci/steps/static_analysis.sh index c44974a..6bccd54 100755 --- a/tools/ci/steps/static_analysis.sh +++ b/tools/ci/steps/static_analysis.sh @@ -1,6 +1,8 @@ #!/bin/bash set -e +cd $(git rev-parse --show-toplevel)/ +rm -rf ./build conan build . \ -c tools.system.package_manager:mode=install \ diff --git a/tools/ci/steps/style.sh b/tools/ci/steps/style.sh index 6c1aa46..f96e4f1 100755 --- a/tools/ci/steps/style.sh +++ b/tools/ci/steps/style.sh @@ -1,6 +1,7 @@ #!/bin/bash set -e +cd $(git rev-parse --show-toplevel)/ has_fomatting_issues=0 for file in $(find ./modules -name '*.?pp'); do diff --git a/tools/scripts/build_ci_images.sh b/tools/scripts/build_ci_images.sh index dc72c4a..12574a6 100755 --- a/tools/scripts/build_ci_images.sh +++ b/tools/scripts/build_ci_images.sh @@ -20,4 +20,8 @@ echo "==> Building image: valgrind" cd "$IMAGE_DIR/valgrind" docker build -t valgrind . +echo "==> Building image: leak_sanitizer" +cd "$IMAGE_DIR/leak_sanitizer" +docker build -t leak_sanitizer . + echo "WOOOOOOOOOOOOOOOOH!!! DONE :D" -- 2.45.3 From a74e23051cbf21aafcf8db8aefeaa16851f8773d Mon Sep 17 00:00:00 2001 From: light7734 Date: Sun, 20 Jul 2025 08:00:23 +0330 Subject: [PATCH 22/23] ci: fix --- .drone.yml | 2 +- .../steps/amd64/msvc/{amd64_msvc_tests.ps1 => unit-tests.ps1} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename tools/ci/steps/amd64/msvc/{amd64_msvc_tests.ps1 => unit-tests.ps1} (100%) diff --git a/.drone.yml b/.drone.yml index aee059d..4662268 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,7 +13,7 @@ steps: - name: unit tests shell: powershell commands: - - ./tools/ci/steps/amd64_msvc_tests.ps1 + - ./tools/ci/steps/amd64/msvc/unit-tests.ps1 --- kind: pipeline diff --git a/tools/ci/steps/amd64/msvc/amd64_msvc_tests.ps1 b/tools/ci/steps/amd64/msvc/unit-tests.ps1 similarity index 100% rename from tools/ci/steps/amd64/msvc/amd64_msvc_tests.ps1 rename to tools/ci/steps/amd64/msvc/unit-tests.ps1 -- 2.45.3 From 7d02876d1217d31dcfac2110118af37f2d199f0f Mon Sep 17 00:00:00 2001 From: light7734 Date: Sun, 20 Jul 2025 08:06:19 +0330 Subject: [PATCH 23/23] refactor: disable clang-tidy checks for imgui backends --- modules/ui/private/gl/.clang-tidy | 3 +++ modules/ui/private/glfw/.clang-tidy | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 modules/ui/private/gl/.clang-tidy create mode 100644 modules/ui/private/glfw/.clang-tidy diff --git a/modules/ui/private/gl/.clang-tidy b/modules/ui/private/gl/.clang-tidy new file mode 100644 index 0000000..1d6a1fe --- /dev/null +++ b/modules/ui/private/gl/.clang-tidy @@ -0,0 +1,3 @@ +# Disable all checks in this subdirectory +Checks: '-*' + diff --git a/modules/ui/private/glfw/.clang-tidy b/modules/ui/private/glfw/.clang-tidy new file mode 100644 index 0000000..1d6a1fe --- /dev/null +++ b/modules/ui/private/glfw/.clang-tidy @@ -0,0 +1,3 @@ +# Disable all checks in this subdirectory +Checks: '-*' + -- 2.45.3