6 Commits

Author SHA1 Message Date
c2a82cc76f remove tidy_result
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 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 19s
Bigfoot / Build & Test Release (Unity Build: ON) (push) Successful in 17s
Bigfoot / Clang Format Checks (push) Successful in 8s
Bigfoot / Sonarqube (push) Successful in 56s
2026-01-30 16:21:25 +01:00
5412d2bf5b mandatory suffixes 2026-01-30 16:19:57 +01:00
9786d5a016 typo
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 23s
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 17s
Bigfoot / Clang Format Checks (push) Successful in 8s
Bigfoot / Sonarqube (push) Successful in 52s
2026-01-30 16:06:22 +01:00
942462563b typo
Some checks failed
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 25s
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 18s
Bigfoot / Build & Test Release (Unity Build: ON) (push) Successful in 17s
Bigfoot / Clang Format Checks (push) Successful in 7s
Bigfoot / Sonarqube (push) Failing after 48s
2026-01-30 15:54:59 +01:00
bde69b46aa test sonar analysis
Some checks failed
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 2m17s
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Successful in 25s
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 19s
Bigfoot / Build & Test Release (Unity Build: ON) (push) Successful in 17s
Bigfoot / Clang Format Checks (push) Failing after 7s
Bigfoot / Sonarqube (push) Failing after 3s
2026-01-30 15:45:47 +01:00
1f312b3080 clang-tidy file
All checks were successful
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 2m5s
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Successful in 28s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: OFF) (push) Successful in 28s
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 21s
Bigfoot / Clang Format Checks (push) Successful in 9s
2026-01-29 23:16:11 +01:00
7 changed files with 21 additions and 33 deletions

View File

@@ -15,6 +15,7 @@ Checks: >
-cppcoreguidelines-macro-usage, -cppcoreguidelines-macro-usage,
-cppcoreguidelines-avoid-do-while -cppcoreguidelines-avoid-do-while
HeaderFilterRegex: '^(Bigfoot)/'
ExcludeHeaderFilterRegex: '_generated.*' ExcludeHeaderFilterRegex: '_generated.*'
CheckOptions: CheckOptions:

View File

@@ -3,8 +3,8 @@ name: Bigfoot
on: on:
push: push:
branches: branches:
- main - '**'
- Development workflow_dispatch:
jobs: jobs:
build-and-test: build-and-test:
@@ -20,28 +20,18 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v6 uses: actions/checkout@v6
with: with:
fetch-depth: 0
submodules: recursive submodules: recursive
- name: Generate - name: Generate
run: | 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 conan install . --deployer=full_deploy --deployer-folder=build --remote=bigfootpackages -pr:h=clang -pr:b=clang --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 -S . -B ./build/Debug --toolchain ./build/Debug/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_UNITY_BUILD=Debug -G "Ninja"
cmake --build build/Debug --parallel $(nproc)
- name: Clang-Tidy - name: Clang-Tidy
run: run-clang-tidy -p ./build/Debug/ >> tidy_result.txt run: run-clang-tidy -p ./build/Debug/ >> tidy_result
- name: Infer
run: infer run --compilation-database build/Debug/compile_commands.json
- name: SonarQube Scan - name: SonarQube Scan
if: github.head_ref == 'main' || github.ref_name == 'main'
uses: SonarSource/sonarqube-scan-action@v7.0.0 uses: SonarSource/sonarqube-scan-action@v7.0.0
with:
args: >
-Dsonar.cxx.jsonCompilationDatabase=./build/Debug/compile_commands.json
-Dsonar.verbose=true
env: env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST }}

View File

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

View File

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

View File

@@ -22,8 +22,6 @@ 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})
@@ -57,9 +55,6 @@ 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}>)
@@ -94,4 +89,5 @@ 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,6 +1,5 @@
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

@@ -8,7 +8,4 @@ sonar.sources=Bigfoot/Sources
sonar.tests=Bigfoot/Tests sonar.tests=Bigfoot/Tests
sonar.cxx.file.suffixes=.hpp,.cpp,.h sonar.cxx.file.suffixes=.hpp,.cpp,.h
sonar.cxx.clangtidy.reportPaths=tidy_result.txt sonar.cxx.clangtidy.reportPaths=tidy_result
sonar.cxx.infer.reportPaths=infer-out/report.json
sonar.cxx.jsonCompilationDatabase.analyzeOnlyContainedFiles=True