14 Commits

Author SHA1 Message Date
5829530652 Use optional for Singleton
All checks were successful
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 26s
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Successful in 25s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: OFF) (push) Successful in 24s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: ON) (push) Successful in 25s
Bigfoot / Build & Test Release (Unity Build: OFF) (push) Successful in 20s
Bigfoot / Build & Test Release (Unity Build: ON) (push) Successful in 19s
Bigfoot / Clang Format Checks (push) Successful in 10s
Bigfoot / Sonarqube (push) Successful in 1m4s
2026-02-02 08:13:26 +01:00
a062a058cd Reworked SonarQube trigger
All checks were successful
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 25s
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Successful in 23s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: OFF) (push) Successful in 25s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: ON) (push) Successful in 24s
Bigfoot / Build & Test Release (Unity Build: OFF) (push) Successful in 21s
Bigfoot / Build & Test Release (Unity Build: ON) (push) Successful in 19s
Bigfoot / Clang Format Checks (push) Successful in 11s
Bigfoot / Sonarqube (push) Successful in 1m5s
2026-02-02 07:46:58 +01:00
46b8095c6a Reworked SonarQube trigger
All checks were successful
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Successful in 26s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: OFF) (push) Successful in 24s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: ON) (push) Successful in 28s
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 24s
Bigfoot / Build & Test Release (Unity Build: OFF) (push) Successful in 19s
Bigfoot / Build & Test Release (Unity Build: ON) (push) Successful in 20s
Bigfoot / Clang Format Checks (push) Successful in 9s
Bigfoot / Sonarqube (push) Successful in 1m18s
2026-02-02 07:38:15 +01:00
63fd92c584 Reworked SonarQube trigger
Some checks failed
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 24s
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Successful in 25s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: OFF) (push) Successful in 25s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: ON) (push) Has been cancelled
Bigfoot / Build & Test Release (Unity Build: OFF) (push) Has been cancelled
Bigfoot / Build & Test Release (Unity Build: ON) (push) Has been cancelled
Bigfoot / Clang Format Checks (push) Has been cancelled
2026-02-02 07:36:46 +01:00
3466469440 Merge branch 'main' of https://git.romainboullard.com/BigfootDev/Bigfoot into Development
All checks were successful
Bigfoot / Build & Test Release (Unity Build: ON) (push) Successful in 18s
Bigfoot / Clang Format Checks (push) Successful in 9s
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 26s
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Successful in 24s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: OFF) (push) Successful in 23s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: ON) (push) Successful in 25s
Bigfoot / Build & Test Release (Unity Build: OFF) (push) Successful in 20s
# Conflicts:
#	.clang-tidy
#	.gitea/workflows/sonarqube.yml
#	sonar-project.properties
2026-02-02 07:33:27 +01:00
b5c2e4936b StaticAnalysis (#11)
All checks were successful
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 26s
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Successful in 24s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: OFF) (push) Successful in 25s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: ON) (push) Successful in 26s
Bigfoot / Build & Test Release (Unity Build: OFF) (push) Successful in 19s
Bigfoot / Build & Test Release (Unity Build: ON) (push) Successful in 20s
Bigfoot / Clang Format Checks (push) Successful in 9s
SonarQube step only on push to main
Trigger Infer/Clang-Tidy also in PR

Reviewed-on: #11
Co-authored-by: Romain BOULLARD <romain.boullard@protonmail.com>
Co-committed-by: Romain BOULLARD <romain.boullard@protonmail.com>
2026-02-02 06:18:26 +00:00
02a08012d0 Static Analysis (#8)
All checks were successful
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 26s
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Successful in 24s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: OFF) (push) Successful in 26s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: ON) (push) Successful in 25s
Bigfoot / Build & Test Release (Unity Build: OFF) (push) Successful in 19s
Bigfoot / Build & Test Release (Unity Build: ON) (push) Successful in 18s
Bigfoot / Clang Format Checks (push) Successful in 8s
Reviewed-on: #8
Co-authored-by: Romain BOULLARD <romain.boullard@protonmail.com>
Co-committed-by: Romain BOULLARD <romain.boullard@protonmail.com>
2026-02-01 23:50:29 +00:00
3d4394765b StaticAnalysis (#7)
All checks were successful
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 23s
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Successful in 22s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: OFF) (push) Successful in 24s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: ON) (push) Successful in 24s
Bigfoot / Build & Test Release (Unity Build: OFF) (push) Successful in 17s
Bigfoot / Build & Test Release (Unity Build: ON) (push) Successful in 17s
Bigfoot / Clang Format Checks (push) Successful in 7s
Bigfoot / Sonarqube (push) Successful in 58s
Reviewed-on: #7
2026-01-30 15:50:56 +00:00
063645fae3 Merge branch 'main' into Development
All checks were successful
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 24s
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Successful in 24s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: OFF) (push) Successful in 23s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: ON) (push) Successful in 23s
Bigfoot / Build & Test Release (Unity Build: OFF) (push) Successful in 18s
Bigfoot / Build & Test Release (Unity Build: ON) (push) Successful in 18s
Bigfoot / Clang Format Checks (push) Successful in 7s
Bigfoot / Sonarqube (push) Successful in 1m2s
2026-01-30 15:47:31 +00:00
6c8979684d StaticAnalysis (#6)
Some checks failed
Bigfoot / Sonarqube (push) Has been cancelled
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 24s
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Successful in 24s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: ON) (push) Has been cancelled
Bigfoot / Build & Test Release (Unity Build: OFF) (push) Has been cancelled
Bigfoot / Build & Test Release (Unity Build: ON) (push) Has been cancelled
Bigfoot / Clang Format Checks (push) Has been cancelled
Bigfoot / Build & Test RelWithDebInfo (Unity Build: OFF) (push) Has been cancelled
Reviewed-on: #6
Co-authored-by: Romain BOULLARD <romain.boullard@protonmail.com>
Co-committed-by: Romain BOULLARD <romain.boullard@protonmail.com>
2026-01-30 15:46:40 +00:00
245867da3b Update README (#5)
All checks were successful
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 25s
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Successful in 24s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: OFF) (push) Successful in 24s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: ON) (push) Successful in 24s
Bigfoot / Build & Test Release (Unity Build: OFF) (push) Successful in 21s
Bigfoot / Build & Test Release (Unity Build: ON) (push) Successful in 18s
Bigfoot / Clang Format Checks (push) Successful in 8s
Reviewed-on: #5
2026-01-28 18:31:29 +00:00
c6b84168d8 Merge branch 'main' into Development
All checks were successful
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Successful in 25s
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 24s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: OFF) (push) Successful in 25s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: ON) (push) Successful in 26s
Bigfoot / Build & Test Release (Unity Build: OFF) (push) Successful in 20s
Bigfoot / Build & Test Release (Unity Build: ON) (push) Successful in 18s
Bigfoot / Clang Format Checks (push) Successful in 9s
2026-01-28 18:28:59 +00:00
b638b2c223 Update README (#4)
All checks were successful
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 24s
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Successful in 24s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: OFF) (push) Successful in 24s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: ON) (push) Successful in 25s
Bigfoot / Build & Test Release (Unity Build: OFF) (push) Successful in 18s
Bigfoot / Build & Test Release (Unity Build: ON) (push) Successful in 18s
Bigfoot / Clang Format Checks (push) Successful in 9s
Reviewed-on: #4
Co-authored-by: Romain BOULLARD <romain.boullard@protonmail.com>
Co-committed-by: Romain BOULLARD <romain.boullard@protonmail.com>
2026-01-28 18:26:04 +00:00
53a053de27 GiteaCI (#3)
All checks were successful
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 24s
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Successful in 25s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: OFF) (push) Successful in 25s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: ON) (push) Successful in 25s
Bigfoot / Build & Test Release (Unity Build: OFF) (push) Successful in 21s
Bigfoot / Build & Test Release (Unity Build: ON) (push) Successful in 20s
Bigfoot / Clang Format Checks (push) Successful in 9s
Reviewed-on: #3
Co-authored-by: Romain BOULLARD <romain.boullard@protonmail.com>
Co-committed-by: Romain BOULLARD <romain.boullard@protonmail.com>
2026-01-28 16:50:26 +00:00
10 changed files with 105 additions and 26 deletions

22
.clang-tidy Normal file
View File

@@ -0,0 +1,22 @@
# .clang-tidy
---
Checks: >
-*,
bugprone-*,
clang-analyzer-*,
cppcoreguidelines-*,
modernize-*,
performance-*,
readability-*,
portability-*,
-modernize-use-trailing-return-type,
-readability-avoid-const-params-in-decls,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-avoid-do-while
ExcludeHeaderFilterRegex: '_generated.*'
CheckOptions:
- key: readability-implicit-bool-conversion.AllowPointerConditions
value: true

View File

@@ -0,0 +1,47 @@
name: Bigfoot
on:
push:
branches:
- main
- Development
jobs:
build-and-test:
runs-on: ubuntu-latest
timeout-minutes: 120
container:
image: git.romainboullard.com/bigfootdev/linuxbigfootbuilder:main
name: "Sonarqube"
steps:
- name: Install Node.js
run: apt-get update && apt-get install -y nodejs
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
- name: Generate
run: |
conan install . --deployer=full_deploy --deployer-folder=build --remote=bigfootpackages -pr:h=clang_coverage -pr:b=clang_coverage --build=missing -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=False -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
cmake -S . -B ./build/Debug --toolchain ./build/Debug/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Debug -G "Ninja"
cmake --build build/Debug --parallel $(nproc)
- name: Clang-Tidy
run: run-clang-tidy -p ./build/Debug/ >> tidy_result.txt
- name: Infer
run: infer run --compilation-database build/Debug/compile_commands.json
- name: SonarQube Scan
if: github.head_ref == 'main' || github.ref_name == 'main'
uses: SonarSource/sonarqube-scan-action@v7.0.0
with:
args: >
-Dsonar.cxx.jsonCompilationDatabase=./build/Debug/compile_commands.json
-Dsonar.verbose=true
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST }}

3
.inferconfig Normal file
View File

@@ -0,0 +1,3 @@
{
}

View File

@@ -9,6 +9,7 @@
#include <EASTL/array.h> #include <EASTL/array.h>
#include <EASTL/bit.h> #include <EASTL/bit.h>
#include <EASTL/optional.h>
#include <EASTL/type_traits.h> #include <EASTL/type_traits.h>
#include <EASTL/utility.h> #include <EASTL/utility.h>
@@ -32,7 +33,7 @@ class Singleton
*/ */
static constexpr TYPE& Instance() static constexpr TYPE& Instance()
{ {
return *eastl::bit_cast<TYPE*>(ms_instance.data()); return ms_instance.value();
} }
class Lifetime class Lifetime
@@ -78,9 +79,7 @@ class Singleton
template<typename... ARGS> template<typename... ARGS>
static void Initialize(ARGS&&... p_args) static void Initialize(ARGS&&... p_args)
{ {
new (ms_instance.data()) TYPE(eastl::forward<ARGS>(p_args)...); ms_instance.emplace(eastl::forward<ARGS>(p_args)...);
ms_initialized = true;
} }
/** /**
@@ -89,20 +88,13 @@ class Singleton
*/ */
static void Finalize() static void Finalize()
{ {
eastl::bit_cast<TYPE*>(ms_instance.data())->~TYPE(); ms_instance.reset();
ms_initialized = false;
} }
/** /**
* The singleton. * The singleton.
*/ */
alignas(alignof(TYPE)) inline static eastl::array<std::byte, sizeof(TYPE)> ms_instance; inline static eastl::optional<TYPE> ms_instance;
/**
* Is the singleton initialized?
*/
inline static bool ms_initialized = false;
}; };
} // namespace Bigfoot } // namespace Bigfoot
#endif #endif

View File

@@ -92,7 +92,7 @@ class Version
return m_combined; return m_combined;
} }
[[nodiscard]] operator std::string() const; operator std::string() const;
constexpr Version& operator=(const Version& p_version) = default; constexpr Version& operator=(const Version& p_version) = default;

View File

@@ -22,6 +22,8 @@ function(bigfoot_create_package_lib PackagePublicDependencies PackagePrivateDepe
${_BF_SOURCES} ${_BF_SOURCES}
) )
target_compile_options(${PROJECT_NAME} PRIVATE ${BIGFOOT_CXX_FLAGS})
target_link_libraries(${PROJECT_NAME} PUBLIC unordered_dense::unordered_dense EASTL::EASTL flatbuffers::flatbuffers rapidhash::rapidhash) target_link_libraries(${PROJECT_NAME} PUBLIC unordered_dense::unordered_dense EASTL::EASTL flatbuffers::flatbuffers rapidhash::rapidhash)
target_link_libraries(${PROJECT_NAME} PRIVATE ${CMAKE_DL_LIBS}) target_link_libraries(${PROJECT_NAME} PRIVATE ${CMAKE_DL_LIBS})
@@ -55,6 +57,9 @@ function(bigfoot_create_package_tests ParentFolder BigfootDependencies)
${_BF_TEST_SOURCES} ${_BF_TEST_SOURCES}
) )
target_compile_options(${PROJECT_NAME} PRIVATE ${BIGFOOT_CXX_FLAGS})
target_link_options(${PROJECT_NAME} PRIVATE ${BIGFOOT_EXE_LINK_FLAGS})
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/Include) target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/Include)
target_link_libraries(${PROJECT_NAME} PRIVATE $<LINK_LIBRARY:WHOLE_ARCHIVE,${PackageName}>) target_link_libraries(${PROJECT_NAME} PRIVATE $<LINK_LIBRARY:WHOLE_ARCHIVE,${PackageName}>)
@@ -89,5 +94,4 @@ function(bigfoot_create_package_tests ParentFolder BigfootDependencies)
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}Fixture) add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}Fixture)
set_target_properties(${PROJECT_NAME}Fixture PROPERTIES FOLDER UtilityTargets/Tests/Bigfoot/${ParentFolder}) set_target_properties(${PROJECT_NAME}Fixture PROPERTIES FOLDER UtilityTargets/Tests/Bigfoot/${ParentFolder})
endfunction() endfunction()

View File

@@ -1,5 +1,6 @@
cmake_minimum_required(VERSION 3.24) cmake_minimum_required(VERSION 3.24)
# CMake sets this flag by default, we don't use exception in bigfoot, we can remove it
string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
project(Bigfoot VERSION 0.1.0 project(Bigfoot VERSION 0.1.0

View File

@@ -11,11 +11,9 @@ The goal is to build a multiplatform, API agnostic, 3D engine. Since this is a l
### Requirements ### Requirements
1. [ConanV2](https://conan.io/) 1. [ConanV2](https://conan.io/)
2. [SQLite3 tools](https://www.sqlite.org/download.html) available from the command line
3. [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) (If you target Vulkan) 3. [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) (If you target Vulkan)
4. [CMake](https://cmake.org/) 4. [CMake](https://cmake.org/)
5. [Git](https://git-scm.com/) 5. [Git](https://git-scm.com/)
6. [RenderDoc](https://renderdoc.org/) (If you want to use the integrated RenderDoc API)
7. [Python3](https://www.python.org/) 7. [Python3](https://www.python.org/)
#### Additional requirements for Linux #### Additional requirements for Linux
@@ -50,16 +48,14 @@ You can customize these scripts to opt-out of some Bigfoot features
'Just' modify these lines to disable them (I promise to one day modify the script to do it from the command line) 'Just' modify these lines to disable them (I promise to one day modify the script to do it from the command line)
``` ```
bigfoot/*:unity_build=True -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True -o bigfoot/*:render_doc=True -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True
``` ```
1. unity_build: Enable/Disable [unity builds](https://cmake.org/cmake/help/latest/variable/CMAKE_UNITY_BUILD.html) feature (will slow down compilation times) 1. build_tests: Enable/Disable the tests
2. build_tests: Enable/Disable the tests 2. tracy: Enable/Disable profiling using [Tracy](https://github.com/wolfpld/tracy)
3. tracy: Enable/Disable profiling using [Tracy](https://github.com/wolfpld/tracy) 3. build_tools: Enable/Disable the tools (I'd absolutely recommand not disabling this)
4. build_tools: Enable/Disable the tools (I'd absolutely recommand not disabling this if you are building benchamrks or tests) 4. vulkan: Enable/Disable Vulkan renderer (No point disabling it, since for now only Vulkan is available in Bigfoot)
5. vulkan: Enable/Disable Vulkan renderer (No point disabling it, since for now only Vulkan is available in Bigfoot) 5. build_benchmarks: Enable/Disable the benchmarks
6. build_benchmarks: Enable/Disable the benchmarks
7. render_doc: Enable/Disable the possitbility to use [RenderDoc](https://renderdoc.org/) API to capture from code
### Generating Bigfoot ### Generating Bigfoot

View File

@@ -65,7 +65,7 @@ class Bigfoot(ConanFile):
self.requires("eastl/3.27.01@bigfootdev/main", transitive_headers=True) self.requires("eastl/3.27.01@bigfootdev/main", transitive_headers=True)
self.requires("unordered_dense/4.8.1@bigfootdev/main", transitive_headers=True) self.requires("unordered_dense/4.8.1@bigfootdev/main", transitive_headers=True)
self.requires("mimalloc/3.1.5@bigfootdev/main", transitive_headers=True) self.requires("mimalloc/3.1.5@bigfootdev/main", transitive_headers=True)
self.requires("stduuid/1.2.3", transitive_headers=True) self.requires("stduuid/1.2.3@bigfootdev/main", transitive_headers=True)
self.requires("sqlite3/3.51.0@bigfootdev/main", transitive_headers=True) self.requires("sqlite3/3.51.0@bigfootdev/main", transitive_headers=True)
self.requires("cli11/2.6.0") self.requires("cli11/2.6.0")
self.requires("rapidhash/3.0@bigfootdev/main", transitive_headers=True) self.requires("rapidhash/3.0@bigfootdev/main", transitive_headers=True)

14
sonar-project.properties Normal file
View File

@@ -0,0 +1,14 @@
sonar.projectKey=Bigfoot
sonar.projectVersion=0.1.0
sonar.sourceEncoding=UTF-8
sonar.sources=Bigfoot/Sources
sonar.tests=Bigfoot/Tests
sonar.cxx.file.suffixes=.hpp,.cpp,.h
sonar.cxx.clangtidy.reportPaths=tidy_result.txt
sonar.cxx.infer.reportPaths=infer-out/report.json
sonar.cxx.jsonCompilationDatabase.analyzeOnlyContainedFiles=True