diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index b46e451..3cb9a07 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -19,7 +19,8 @@ jobs: matrix: build_type: ["Debug", "RelWithDebInfo", "Release"] unity_build: ["ON", "OFF"] - name: "Build & Test ${{ matrix.build_type }} (Unity Build: ${{ matrix.unity_build }})" + conan_profile: ["./ConanProfiles/clang", "./ConanProfiles/clangd", "./ConanProfiles/clangd_asan"] + name: "Build & Test ${{ matrix.build_type }} with ${{ matrix.conan_profile }} (Unity Build: ${{ matrix.unity_build }})" steps: - name: Install Node.js run: apt-get update && apt-get install -y nodejs @@ -34,7 +35,7 @@ jobs: - name: Build run: | - conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/clang -pr:b=./ConanProfiles/clang --build=missing -s build_type=${{ matrix.build_type }} -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 . --remote=bigfootpackages -pr:h=${{ matrix.conan_profile }} -pr:b=${{ matrix.conan_profile }} --build=missing -s build_type=${{ matrix.build_type }} -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=False -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True cmake -S . -B ./build/${{ matrix.build_type }} --toolchain ./build/${{ matrix.build_type }}/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_UNITY_BUILD=${{ matrix.unity_build }} -G "Ninja" cmake --build build/${{ matrix.build_type }} --parallel $(nproc) diff --git a/.gitea/workflows/sonarqube.yml b/.gitea/workflows/sonarqube.yml index f3a947a..5cba42a 100644 --- a/.gitea/workflows/sonarqube.yml +++ b/.gitea/workflows/sonarqube.yml @@ -25,7 +25,7 @@ jobs: - name: Generate run: | - conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/clang_coverage -pr:b=./ConanProfiles/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 . --remote=bigfootpackages -pr:h=./ConanProfiles/clang_coverage -pr:b=./ConanProfiles/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 cmake -S . -B ./build/Debug --toolchain ./build/Debug/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Debug -G "Ninja" cmake --build build/Debug --parallel $(nproc) diff --git a/Bigfoot/Sources/Engine/BigFile/BigFileSchema.sql b/Bigfoot/Sources/Engine/BigFile/BigFileSchema.sql index e307f48..f791d7a 100644 --- a/Bigfoot/Sources/Engine/BigFile/BigFileSchema.sql +++ b/Bigfoot/Sources/Engine/BigFile/BigFileSchema.sql @@ -38,4 +38,12 @@ BEGIN UPDATE AssetHeader SET ModificationTime = CAST(unixepoch('subsec') AS INTEGER) * 1000000 WHERE UUID = NEW.UUID; -END; \ No newline at end of file +END; + +CREATE TABLE IF NOT EXISTS AssetDependency ( + AssetUUID BLOB NOT NULL, + DependsOnUUID BLOB NOT NULL, + PRIMARY KEY(AssetUUID, DependsOnUUID), + FOREIGN KEY(AssetUUID) REFERENCES AssetHeader(UUID) ON DELETE CASCADE, + FOREIGN KEY(DependsOnUUID) REFERENCES AssetHeader(UUID) ON DELETE RESTRICT +); \ No newline at end of file diff --git a/CMake/FindDependencies.cmake b/CMake/FindDependencies.cmake index 608c066..3083614 100644 --- a/CMake/FindDependencies.cmake +++ b/CMake/FindDependencies.cmake @@ -46,7 +46,7 @@ if(VULKAN) find_package(vulkan-memory-allocator REQUIRED) endif() -if(BUILD_BENCHMARKS OR BUILD_TESTS OR SAMPLE_APP) +if(BUILD_TESTS OR SAMPLE_APP) find_package(glfw3 REQUIRED) endif() @@ -61,8 +61,4 @@ if(BUILD_TOOLS) find_package(assimp REQUIRED) find_package(meshoptimizer REQUIRED) find_package(libsquish REQUIRED) -endif() - -if(BUILD_BENCHMARKS) - find_package(benchmark REQUIRED) endif() \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 3664acb..5a6541b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,6 @@ option(COVERAGE OFF) option(TRACY ON) option(BUILD_TOOLS ON) option(VULKAN ON) -option(BUILD_BENCHMARKS OFF) set(AUTO_GENERATED_COMMENT "// AUTO-GENERATED DO NOT TOUCH") diff --git a/ConanProfiles/clang b/ConanProfiles/clang index 86ec4bf..ae00480 100644 --- a/ConanProfiles/clang +++ b/ConanProfiles/clang @@ -29,4 +29,4 @@ tools.cmake.cmaketoolchain:generator=Ninja !cmake/*: cmake/[>=4.2] [options] -Bin2CPP/*:build_tests=True \ No newline at end of file +Bigfoot/*:build_tests=True \ No newline at end of file diff --git a/ConanProfiles/clang_coverage b/ConanProfiles/clang_coverage index f536fd9..8c11889 100644 --- a/ConanProfiles/clang_coverage +++ b/ConanProfiles/clang_coverage @@ -26,5 +26,5 @@ tools.build:compiler_executables={"c": "clang", "cpp": "clang++"} !cmake/*: cmake/[>=4.2] [options] -Bin2CPP/*:build_tests=True -Bin2CPP/*:coverage=True +Bigfoot/*:build_tests=True +Bigfoot/*:coverage=True diff --git a/ConanProfiles/clangd b/ConanProfiles/clangd index 0fa3339..4cfac64 100644 --- a/ConanProfiles/clangd +++ b/ConanProfiles/clangd @@ -26,4 +26,4 @@ tools.build:compiler_executables={"c": "clang", "cpp": "clang++"} !cmake/*: cmake/[>=4.2] [options] -Bin2CPP/*:build_tests=True \ No newline at end of file +Bigfoot/*:build_tests=True \ No newline at end of file diff --git a/ConanProfiles/clangd_asan b/ConanProfiles/clangd_asan index 9a8fc1e..22a95e8 100644 --- a/ConanProfiles/clangd_asan +++ b/ConanProfiles/clangd_asan @@ -29,5 +29,5 @@ tools.build:compiler_executables={"c": "clang", "cpp": "clang++"} !cmake/*: cmake/[>=4.2] [options] -Bin2CPP/*:asan=True -Bin2CPP/*:build_tests=True \ No newline at end of file +Bigfoot/*:asan=True +Bigfoot/*:build_tests=True \ No newline at end of file diff --git a/ConanProfiles/msvc b/ConanProfiles/msvc index 0aafee5..6081057 100644 --- a/ConanProfiles/msvc +++ b/ConanProfiles/msvc @@ -21,4 +21,4 @@ tools.build:cxxflags=["/Zc:preprocessor", "/permissive-", "/Zc:__cplusplus", "/Z !cmake/*: cmake/[>=4.2] [options] -Bin2CPP/*:build_tests=True \ No newline at end of file +Bigfoot/*:build_tests=True \ No newline at end of file diff --git a/ConanProfiles/msvcd b/ConanProfiles/msvcd index 9bdcd07..2361b6e 100644 --- a/ConanProfiles/msvcd +++ b/ConanProfiles/msvcd @@ -17,4 +17,4 @@ tools.build:cxxflags=["/Zc:preprocessor", "/permissive-", "/Zc:__cplusplus", "/Z !cmake/*: cmake/[>=4.2] [options] -Bin2CPP/*:build_tests=True +Bigfoot/*:build_tests=True diff --git a/ConanProfiles/msvcd_asan b/ConanProfiles/msvcd_asan index d9bb8af..6e9e1ae 100644 --- a/ConanProfiles/msvcd_asan +++ b/ConanProfiles/msvcd_asan @@ -21,5 +21,5 @@ tools.build:cxxflags=["/Zc:preprocessor", "/permissive-", "/Zc:__cplusplus", "/Z !cmake/*: cmake/[>=4.2] [options] -Bin2CPP/*:asan=True -Bin2CPP/*:build_tests=True +Bigfoot/*:asan=True +Bigfoot/*:build_tests=True diff --git a/README.md b/README.md index 5a66607..17501e6 100644 --- a/README.md +++ b/README.md @@ -48,14 +48,13 @@ 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) ``` --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/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True ``` 1. build_tests: Enable/Disable the tests 2. 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. 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 ### Generating Bigfoot diff --git a/conanfile.py b/conanfile.py index 11c9aee..6db323a 100644 --- a/conanfile.py +++ b/conanfile.py @@ -23,8 +23,7 @@ class Bigfoot(ConanFile): "build_tests": [True, False], "tracy": [True, False], "build_tools": [True, False], - "vulkan": [True, False], - "build_benchmarks": [True, False], + "vulkan": [True, False] } default_options = { "shared": False, @@ -35,7 +34,6 @@ class Bigfoot(ConanFile): "tracy": False, "build_tools": True, "vulkan": True, - "build_benchmarks": False, } generators = "CMakeDeps" @@ -58,9 +56,6 @@ class Bigfoot(ConanFile): if(self.options.vulkan): self.options["spirv-cross"].exceptions = False - - if(self.options.build_benchmarks): - self.options["benchmark"].enable_exceptions = False def build_requirements(self): self.tool_requires("bin2cpp/1.0.0@bigfootdev/main") @@ -93,7 +88,7 @@ class Bigfoot(ConanFile): self.requires("vulkan-validationlayers/1.4.313.0@bigfootdev/main") self.requires("vulkan-memory-allocator/3.3.0@bigfootdev/main") - if(self.options.build_tests or self.options.build_benchmarks): + if(self.options.build_tests): self.requires("glfw/3.4") if(self.options.build_tests): @@ -108,9 +103,6 @@ class Bigfoot(ConanFile): self.requires("meshoptimizer/1.0@bigfootdev/main") self.requires("libsquish/1.15") - if(self.options.build_benchmarks): - self.requires("benchmark/1.9.4") - def generate(self): tc = CMakeToolchain(self) @@ -120,7 +112,6 @@ class Bigfoot(ConanFile): tc.variables["TRACY"] = self.options.tracy tc.variables["BUILD_TOOLS"] = self.options.build_tools tc.variables["VULKAN"] = self.options.vulkan - tc.variables["BUILD_BENCHMARKS"] = self.options.build_benchmarks tc.generate() diff --git a/generate_dependencies.bat b/generate_dependencies.bat index 7b83893..b427673 100644 --- a/generate_dependencies.bat +++ b/generate_dependencies.bat @@ -23,8 +23,8 @@ REM Add the remote conan remote add bigfootpackages https://conan.romainboullard.com/artifactory/api/conan/BigfootPackages REM Install dependencies with the specified build option -conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/msvc -pr:b=./ConanProfiles/msvc %build_option% -of build -s build_type=Release -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True -conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/msvcd -pr:b=./ConanProfiles/msvcd %build_option% -of build -s build_type=RelWithDebInfo -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True -conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/msvcd -pr:b=./ConanProfiles/msvcd %build_option% -of build -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True +conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/msvc -pr:b=./ConanProfiles/msvc %build_option% -of build -s build_type=Release -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True +conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/msvcd -pr:b=./ConanProfiles/msvcd %build_option% -of build -s build_type=RelWithDebInfo -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True +conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/msvcd -pr:b=./ConanProfiles/msvcd %build_option% -of build -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True endlocal diff --git a/generate_dependencies.sh b/generate_dependencies.sh index afa636d..6ece276 100644 --- a/generate_dependencies.sh +++ b/generate_dependencies.sh @@ -11,13 +11,13 @@ conan remote add bigfootpackages https://conan.romainboullard.com/artifactory/ap # Set the build option based on the argument if [ "$1" == "force" ]; then - conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/clang -pr:b=./ConanProfiles/clang --build='*' -of build -s build_type=Release -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True - conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/clangd -pr:b=./ConanProfiles/clangd --build='*' -of build -s build_type=RelWithDebInfo -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True - conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/clangd -pr:b=./ConanProfiles/clangd --build='*' -of build -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True + conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/clang -pr:b=./ConanProfiles/clang --build='*' -of build -s build_type=Release -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True + conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/clangd -pr:b=./ConanProfiles/clangd --build='*' -of build -s build_type=RelWithDebInfo -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True + conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/clangd -pr:b=./ConanProfiles/clangd --build='*' -of build -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True elif [ "$1" == "missing" ]; then - conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/clang -pr:b=./ConanProfiles/clang --build=missing -of build -s build_type=Release -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True - conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/clangd -pr:b=./ConanProfiles/clangd --build=missing -of build -s build_type=RelWithDebInfo -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True - conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/clangd -pr:b=./ConanProfiles/clangd --build=missing -of build -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True -o bigfoot/*:build_benchmarks=True + conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/clang -pr:b=./ConanProfiles/clang --build=missing -of build -s build_type=Release -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True + conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/clangd -pr:b=./ConanProfiles/clangd --build=missing -of build -s build_type=RelWithDebInfo -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True + conan install . --remote=bigfootpackages -pr:h=./ConanProfiles/clangd -pr:b=./ConanProfiles/clangd --build=missing -of build -s build_type=Debug -o bigfoot/*:build_tests=True -o bigfoot/*:tracy=True -o bigfoot/*:build_tools=True -o bigfoot/*:vulkan=True else echo "Invalid argument: $1" echo "Usage: $0 [force|missing]"