Switching to SDL and Wayland
Bigfoot / Sonarqube (game) (push) Skipped
Bigfoot / Sonarqube (toolmode) (push) Skipped
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: game) (push) Successful in 9m17s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: toolmode) (push) Successful in 1m10s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: ON, Variant: game) (push) Successful in 43s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang (Unity Build: ON, Variant: toolmode) (push) Successful in 46s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: game) (push) Failing after 3m39s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: toolmode) (push) Failing after 2m18s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: game) (push) Failing after 1m45s
Bigfoot / Build & Test Debug with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: toolmode) (push) Failing after 1m53s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: game) (push) Failing after 11m24s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: toolmode) (push) Failing after 34s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: ON, Variant: game) (push) Failing after 29s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang (Unity Build: ON, Variant: toolmode) (push) Failing after 31s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: game) (push) Failing after 3m54s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: game) (push) Failing after 25s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: toolmode) (push) Failing after 25s
Bigfoot / Build & Test Release with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: toolmode) (push) Failing after 23s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: toolmode) (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: ON, Variant: game) (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: ON, Variant: toolmode) (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: game) (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: OFF, Variant: toolmode) (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: game) (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang_asan (Unity Build: ON, Variant: toolmode) (push) Canceled after 0s
Bigfoot / Clang Format Checks (push) Canceled after 0s
Bigfoot / Build & Test RelWithDebInfo with ./ConanProfiles/host/clang (Unity Build: OFF, Variant: game) (push) Canceled after 28s

This commit is contained in:
2026-09-12 00:00:22 +02:00
parent 5703e25773
commit 087114b21b
21 changed files with 91 additions and 78 deletions
+13 -10
View File
@@ -15,13 +15,16 @@ jobs:
strategy: strategy:
matrix: matrix:
build_type: ["Debug", "RelWithDebInfo", "Release"] build_type:
- { value: "Debug", profile: "debug" }
- { value: "RelWithDebInfo", profile: "relwithdebinfo" }
- { value: "Release", profile: "release" }
unity_build: ["ON", "OFF"] unity_build: ["ON", "OFF"]
conan_profile: ["./ConanProfiles/host/clang", "./ConanProfiles/host/clang_asan"] conan_profile: ["./ConanProfiles/host/clang", "./ConanProfiles/host/clang_asan"]
variant: variant:
- { value: "True", name: "toolmode" } - { value: "True", name: "toolmode" }
- { value: "False", name: "game" } - { value: "False", name: "game" }
name: "Build & Test ${{ matrix.build_type }} with ${{ matrix.conan_profile }} (Unity Build: ${{ matrix.unity_build }}, Variant: ${{ matrix.variant.name }})" name: "Build & Test ${{ matrix.build_type.value }} with ${{ matrix.conan_profile }} (Unity Build: ${{ matrix.unity_build }}, Variant: ${{ matrix.variant.name }})"
steps: steps:
- name: Install Node.js - name: Install Node.js
run: apt-get update && apt-get install -y nodejs run: apt-get update && apt-get install -y nodejs
@@ -33,18 +36,18 @@ jobs:
- name: Build - name: Build
run: | run: |
conan install . --remote=bigfootpackages -pr:h=${{ matrix.conan_profile }} -pr:b=./ConanProfiles/build/clang --build=missing -s build_type=${{ matrix.build_type }} -o bigfoot/*:build_tests=True -o bigfoot/*:build_benchmarks=True -o bigfoot/*:tracy=False -o bigfoot/*:vulkan=True -o bigfoot/*:toolmode=${{ matrix.variant.value }} -of build-${{ matrix.variant.name }} conan install . --remote=bigfootpackages -pr:h=${{ matrix.conan_profile }} -pr:h=./ConanProfiles/Configurations/${{ matrix.build_type.profile }} -pr:b=./ConanProfiles/build/clang -pr:b=./ConanProfiles/Configurations/${{ matrix.build_type.profile }} --build=missing -o bigfoot/*:build_tests=True -o bigfoot/*:build_benchmarks=True -o bigfoot/*:tracy=False -o bigfoot/*:vulkan=True -o bigfoot/*:toolmode=${{ matrix.variant.value }} -of build-${{ matrix.variant.name }}
. ./build-${{ matrix.variant.name }}/build/${{ matrix.build_type }}/generators/conanbuild.sh . ./build-${{ matrix.variant.name }}/build/${{ matrix.build_type.value }}/generators/conanbuild.sh
cmake -S . -B ./build-${{ matrix.variant.name }}/${{ matrix.build_type }} --toolchain ./build-${{ matrix.variant.name }}/build/${{ matrix.build_type }}/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_UNITY_BUILD=${{ matrix.unity_build }} -G "Ninja" cmake -S . -B ./build-${{ matrix.variant.name }}/${{ matrix.build_type.value }} --toolchain ./build-${{ matrix.variant.name }}/build/${{ matrix.build_type.value }}/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type.value }} -DCMAKE_UNITY_BUILD=${{ matrix.unity_build }} -G "Ninja"
cmake --build build-${{ matrix.variant.name }}/${{ matrix.build_type }} --parallel $(nproc) cmake --build build-${{ matrix.variant.name }}/${{ matrix.build_type.value }} --parallel $(nproc)
. ./build-${{ matrix.variant.name }}/build/${{ matrix.build_type }}/generators/deactivate_conanbuild.sh . ./build-${{ matrix.variant.name }}/build/${{ matrix.build_type.value }}/generators/deactivate_conanbuild.sh
- name: Unit Tests - name: Unit Tests
run: | run: |
cd ./build-${{ matrix.variant.name }}/${{ matrix.build_type }} cd ./build-${{ matrix.variant.name }}/${{ matrix.build_type.value }}
. ../../build-${{ matrix.variant.name }}/build/${{ matrix.build_type }}/generators/conanbuild.sh . ../../build-${{ matrix.variant.name }}/build/${{ matrix.build_type.value }}/generators/conanbuild.sh
xvfb-run ctest . --output-on-failure xvfb-run ctest . --output-on-failure
. ../../build-${{ matrix.variant.name }}/build/${{ matrix.build_type }}/generators/deactivate_conanbuild.sh . ../../build-${{ matrix.variant.name }}/build/${{ matrix.build_type.value }}/generators/deactivate_conanbuild.sh
clang-format: clang-format:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -19,8 +19,8 @@
#ifdef BIGFOOT_WINDOWS #ifdef BIGFOOT_WINDOWS
#include <Windows.h> #include <Windows.h>
#elif defined BIGFOOT_LINUX #elif defined BIGFOOT_LINUX
#include <X11/X.h> struct wl_display;
#include <X11/Xlib.h> struct wl_surface;
#endif #endif
namespace Bigfoot namespace Bigfoot
@@ -34,8 +34,8 @@ struct SurfaceCreateInfo
HWND m_windowHandle = nullptr; HWND m_windowHandle = nullptr;
HINSTANCE m_windowInstance = nullptr; HINSTANCE m_windowInstance = nullptr;
#elif defined BIGFOOT_LINUX #elif defined BIGFOOT_LINUX
Display* m_display = nullptr; wl_display* m_display = nullptr;
Window m_window = 0; wl_surface* m_surface = nullptr;
#endif #endif
}; };
@@ -23,5 +23,5 @@ target_compile_definitions(${PackageName}
PRIVATE VULKAN_HPP_NO_EXCEPTIONS PRIVATE VULKAN_HPP_NO_EXCEPTIONS
PRIVATE VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1 PRIVATE VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1
PRIVATE $<$<PLATFORM_ID:Windows>:VK_USE_PLATFORM_WIN32_KHR> PRIVATE $<$<PLATFORM_ID:Windows>:VK_USE_PLATFORM_WIN32_KHR>
PRIVATE $<$<PLATFORM_ID:Linux>:VK_USE_PLATFORM_XLIB_KHR> PRIVATE $<$<PLATFORM_ID:Linux>:VK_USE_PLATFORM_WAYLAND_KHR>
PUBLIC BIGFOOT_VULKAN) PUBLIC BIGFOOT_VULKAN)
@@ -10,14 +10,4 @@
#define VULKAN_HPP_ASSERT_ON_RESULT(result) #define VULKAN_HPP_ASSERT_ON_RESULT(result)
#include <vulkan/vulkan.hpp> #include <vulkan/vulkan.hpp>
#ifdef VK_USE_PLATFORM_XLIB_KHR
#undef None
#undef Always
#undef Success
#undef True
#undef False
#undef Bool
#undef Status
#endif
#endif #endif
@@ -76,7 +76,7 @@ VulkanInstance::VulkanInstance(const eastl::string_view p_applicationName, const
eastl::vector<const char*> enabledLayers; eastl::vector<const char*> enabledLayers;
eastl::vector<const char*> enabledExtensions { eastl::vector<const char*> enabledExtensions {
VK_KHR_SURFACE_EXTENSION_NAME, VK_KHR_SURFACE_EXTENSION_NAME,
BIGFOOT_WINDOWS_OR_LINUX(VK_KHR_WIN32_SURFACE_EXTENSION_NAME, VK_KHR_XLIB_SURFACE_EXTENSION_NAME)}; BIGFOOT_WINDOWS_OR_LINUX(VK_KHR_WIN32_SURFACE_EXTENSION_NAME, VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME)};
#ifdef BIGFOOT_NOT_OPTIMIZED #ifdef BIGFOOT_NOT_OPTIMIZED
const vk::ResultValue<std::vector<vk::LayerProperties>> availableLayers = vk::enumerateInstanceLayerProperties(); const vk::ResultValue<std::vector<vk::LayerProperties>> availableLayers = vk::enumerateInstanceLayerProperties();
@@ -20,8 +20,8 @@ VulkanSurface::VulkanSurface(const VulkanInstance& p_instance, const SurfaceCrea
p_surfaceCreateInfo.m_windowHandle}; p_surfaceCreateInfo.m_windowHandle};
const vk::ResultValue<vk::SurfaceKHR> surface = m_instance.GetHandle().createWin32SurfaceKHR(createInfo); const vk::ResultValue<vk::SurfaceKHR> surface = m_instance.GetHandle().createWin32SurfaceKHR(createInfo);
#elif defined BIGFOOT_LINUX #elif defined BIGFOOT_LINUX
const vk::XlibSurfaceCreateInfoKHR createInfo {{}, p_surfaceCreateInfo.m_display, p_surfaceCreateInfo.m_window}; const vk::WaylandSurfaceCreateInfoKHR createInfo {{}, p_surfaceCreateInfo.m_display, p_surfaceCreateInfo.m_surface};
const vk::ResultValue<vk::SurfaceKHR> surface = m_instance.GetHandle().createXlibSurfaceKHR(createInfo); const vk::ResultValue<vk::SurfaceKHR> surface = m_instance.GetHandle().createWaylandSurfaceKHR(createInfo);
#endif #endif
CRITICAL_ASSERT(GraphicsVulkanAssertHandler, CRITICAL_ASSERT(GraphicsVulkanAssertHandler,
@@ -1,8 +1,7 @@
get_filename_component(PackageName ${CMAKE_CURRENT_SOURCE_DIR} NAME) get_filename_component(PackageName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
project(${PackageName}Tests) project(${PackageName}Tests)
set(Dependencies set(Dependencies)
glfw)
set(BigfootDependencies) set(BigfootDependencies)
bigfoot_create_package_tests( bigfoot_create_package_tests(
@@ -2,7 +2,7 @@ get_filename_component(PackageName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
project(${PackageName}Tests) project(${PackageName}Tests)
set(Dependencies set(Dependencies
glfw) SDL3::SDL3)
set(BigfootDependencies) set(BigfootDependencies)
bigfoot_create_package_tests( bigfoot_create_package_tests(
@@ -10,15 +10,7 @@
#include <Utils/TargetMacros.h> #include <Utils/TargetMacros.h>
#define GLFW_INCLUDE_NONE #include <SDL3/SDL.h>
#include <GLFW/glfw3.h>
#ifdef BIGFOOT_WINDOWS
#define GLFW_EXPOSE_NATIVE_WIN32
#elif defined BIGFOOT_LINUX
#define GLFW_EXPOSE_NATIVE_X11
#endif
#include <GLFW/glfw3native.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
namespace Bigfoot::Vulkan namespace Bigfoot::Vulkan
@@ -28,30 +20,32 @@ class VulkanSurfaceFixture: public ::testing::Test
protected: protected:
void SetUp() override void SetUp() override
{ {
ASSERT_EQ(glfwInit(), GLFW_TRUE); SDL_Init(SDL_INIT_VIDEO);
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); m_window = SDL_CreateWindow("VulkanSurfaceTests", 64, 64, SDL_WINDOW_HIDDEN | SDL_WINDOW_VULKAN);
glfwWindowHint(GLFW_VISIBLE, GLFW_FALSE);
m_window = glfwCreateWindow(64, 64, "VulkanSurfaceTests", nullptr, nullptr); const SDL_PropertiesID windowProperties = SDL_GetWindowProperties(m_window);
ASSERT_NE(m_window, nullptr);
#ifdef BIGFOOT_WINDOWS #ifdef BIGFOOT_WINDOWS
m_surfaceCreateInfo.m_windowHandle = glfwGetWin32Window(m_window); m_surfaceCreateInfo.m_windowHandle =
static_cast<HWND>(SDL_GetPointerProperty(windowProperties, SDL_PROP_WINDOW_WIN32_HWND_POINTER, nullptr));
m_surfaceCreateInfo.m_windowInstance = GetModuleHandle(nullptr); m_surfaceCreateInfo.m_windowInstance = GetModuleHandle(nullptr);
#elif defined BIGFOOT_LINUX #elif defined BIGFOOT_LINUX
m_surfaceCreateInfo.m_display = glfwGetX11Display(); m_surfaceCreateInfo.m_display = static_cast<wl_display*>(
m_surfaceCreateInfo.m_window = glfwGetX11Window(m_window); SDL_GetPointerProperty(windowProperties, SDL_PROP_WINDOW_WAYLAND_DISPLAY_POINTER, nullptr));
m_surfaceCreateInfo.m_surface = static_cast<wl_surface*>(
SDL_GetPointerProperty(windowProperties, SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER, nullptr));
#endif #endif
} }
void TearDown() override void TearDown() override
{ {
glfwDestroyWindow(m_window); SDL_DestroyWindow(m_window);
glfwTerminate(); SDL_Quit();
} }
VulkanInstance m_instance {"VulkanSurfaceTests", Version {1, 0, 0}}; VulkanInstance m_instance {"VulkanSurfaceTests", Version {1, 0, 0}};
GLFWwindow* m_window = nullptr; SDL_Window* m_window = nullptr;
SurfaceCreateInfo m_surfaceCreateInfo; SurfaceCreateInfo m_surfaceCreateInfo;
}; };
+1 -1
View File
@@ -42,7 +42,7 @@ endif()
if(BUILD_TESTS) if(BUILD_TESTS)
find_package(GTest REQUIRED) find_package(GTest REQUIRED)
find_package(pixelmatch-cpp17 REQUIRED) find_package(pixelmatch-cpp17 REQUIRED)
find_package(glfw3 REQUIRED) find_package(SDL3 REQUIRED)
endif() endif()
if(BUILD_BENCHMARKS) if(BUILD_BENCHMARKS)
+2
View File
@@ -0,0 +1,2 @@
[settings]
build_type=Debug
+5
View File
@@ -0,0 +1,5 @@
[settings]
build_type=Release
[conf]
tools.meson.mesontoolchain:extra_machine_files+={{profile_dir}}/../Toolchains/ipo.ini
@@ -0,0 +1,2 @@
[settings]
build_type=RelWithDebInfo
+1 -3
View File
@@ -7,11 +7,9 @@ compiler.libcxx=libstdc++11
compiler.cppstd=20 compiler.cppstd=20
compiler.cstd=17 compiler.cstd=17
compiler.runtime=static compiler.runtime=static
build_type=Release
[conf] [conf]
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/../Toolchains/ipo.cmake tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/../Toolchains/ipo.cmake
tools.meson.mesontoolchain:extra_machine_files+={{profile_dir}}/../Toolchains/ipo.ini
tools.system.package_manager:mode=install tools.system.package_manager:mode=install
tools.system.package_manager:sudo=True tools.system.package_manager:sudo=True
@@ -21,4 +19,4 @@ tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}
tools.info.package_id:confs=["tools.build:cflags$", "tools.build:cxxflags$", "tools.build:defines$", "tools.build:sharedlinkflags$", "tools.build:exelinkflags$", "tools.build:compiler_executables$", "tools.cmake.cmaketoolchain:user_toolchain$", "tools.meson.mesontoolchain:extra_machine_files$"] tools.info.package_id:confs=["tools.build:cflags$", "tools.build:cxxflags$", "tools.build:defines$", "tools.build:sharedlinkflags$", "tools.build:exelinkflags$", "tools.build:compiler_executables$", "tools.cmake.cmaketoolchain:user_toolchain$", "tools.meson.mesontoolchain:extra_machine_files$"]
[tool_requires] [tool_requires]
!cmake/*: cmake/4.3.2 !cmake/*: cmake/4.3.2
+1 -3
View File
@@ -6,11 +6,9 @@ compiler.version=195
compiler.cppstd=20 compiler.cppstd=20
compiler.cstd=17 compiler.cstd=17
compiler.runtime=static compiler.runtime=static
build_type=Release
[conf] [conf]
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/../Toolchains/ipo.cmake tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/../Toolchains/ipo.cmake
tools.meson.mesontoolchain:extra_machine_files+={{profile_dir}}/../Toolchains/ipo.ini
tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1"] tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1"]
tools.build:cxxflags=["/Zc:preprocessor", "/permissive-", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope"] tools.build:cxxflags=["/Zc:preprocessor", "/permissive-", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope"]
@@ -20,4 +18,4 @@ tools.env.virtualenv:powershell=powershell.exe
tools.info.package_id:confs=["tools.build:cflags$", "tools.build:cxxflags$", "tools.build:defines$", "tools.build:sharedlinkflags$", "tools.build:exelinkflags$", "tools.build:compiler_executables$", "tools.cmake.cmaketoolchain:user_toolchain$", "tools.meson.mesontoolchain:extra_machine_files$"] tools.info.package_id:confs=["tools.build:cflags$", "tools.build:cxxflags$", "tools.build:defines$", "tools.build:sharedlinkflags$", "tools.build:exelinkflags$", "tools.build:compiler_executables$", "tools.cmake.cmaketoolchain:user_toolchain$", "tools.meson.mesontoolchain:extra_machine_files$"]
[tool_requires] [tool_requires]
!cmake/*: cmake/4.3.2 !cmake/*: cmake/4.3.2
+1 -1
View File
@@ -20,5 +20,5 @@ tools.info.package_id:confs=["tools.build:cflags$", "tools.build:cxxflags$", "to
[tool_requires] [tool_requires]
!cmake/*: cmake/4.3.2 !cmake/*: cmake/4.3.2
!mold/*: mold/2.41.0@bigfootdev/main !(mold/*|zlib/*|xxhash/*): mold/2.42.1@bigfootdev/main
!ninja/*: ninja/1.13.2 !ninja/*: ninja/1.13.2
-4
View File
@@ -1,12 +1,8 @@
include(Common/clang) include(Common/clang)
[settings]
build_type=Release
[conf] [conf]
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/../Toolchains/mold.cmake tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/../Toolchains/mold.cmake
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/../Toolchains/ipo.cmake tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/../Toolchains/ipo.cmake
tools.meson.mesontoolchain:extra_machine_files+={{profile_dir}}/../Toolchains/ipo.ini
tools.build:cxxflags=["-fno-exceptions", "-fno-rtti"] tools.build:cxxflags=["-fno-exceptions", "-fno-rtti"]
+1 -5
View File
@@ -1,14 +1,10 @@
include(Common/msvc) include(Common/msvc)
[settings]
build_type=Release
[conf] [conf]
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/../Toolchains/ipo.cmake tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/../Toolchains/ipo.cmake
tools.meson.mesontoolchain:extra_machine_files+={{profile_dir}}/../Toolchains/ipo.ini
tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1"] tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1"]
tools.build:cxxflags=["/Zc:preprocessor", "/permissive-", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope", "/Zc:externConstexpr", "/Zc:lambda", "/Zc:throwingNew", "/volatile:iso", "/EHs-c-", "/GR-"] tools.build:cxxflags=["/Zc:preprocessor", "/permissive-", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope"]
[options] [options]
bigfoot/*:build_tests=True bigfoot/*:build_tests=True
+28 -2
View File
@@ -60,7 +60,33 @@ class Bigfoot(ConanFile):
if(self.options.vulkan): if(self.options.vulkan):
self.options["spirv-cross"].exceptions = False self.options["spirv-cross"].exceptions = False
if(self.options.build_tests):
# Bigfoot only uses SDL for windowing/Vulkan surface creation, so every other
# subsystem (audio, input devices, sensors, SDL's own 2D/GPU renderers, etc.) is
# unneeded; "video" and "vulkan" are the only subsystems left at their default True.
self.options["sdl"].audio = False
self.options["sdl"].joystick = False
self.options["sdl"].haptic = False
self.options["sdl"].hidapi = False
self.options["sdl"].power = False
self.options["sdl"].sensor = False
self.options["sdl"].camera = False
self.options["sdl"].gpu = False
self.options["sdl"].render = False
self.options["sdl"].dialog = False
self.options["sdl"].tray = False
self.options["sdl"].opengl = False
self.options["sdl"].opengles = False
if(self.settings.os == "Linux"):
self.options["sdl"].x11 = False
self.options["sdl"].dbus = False
self.options["sdl"].libudev = False
if(self.settings.os == "Windows"):
self.options["sdl"].directx = False
def build_requirements(self): def build_requirements(self):
self.tool_requires("bin2cpp/1.0.0@bigfootdev/main") self.tool_requires("bin2cpp/1.0.0@bigfootdev/main")
@@ -93,7 +119,7 @@ class Bigfoot(ConanFile):
if(self.options.build_tests): if(self.options.build_tests):
self.test_requires("gtest/1.18.0") self.test_requires("gtest/1.18.0")
self.test_requires("pixelmatch-cpp17/1.0.3@bigfootdev/main") self.test_requires("pixelmatch-cpp17/1.0.3@bigfootdev/main")
self.test_requires("glfw/3.4") self.test_requires("sdl/3.4.14")
if(self.options.build_benchmarks): if(self.options.build_benchmarks):
self.requires("benchmark/1.9.5") self.requires("benchmark/1.9.5")
+9 -6
View File
@@ -1,7 +1,7 @@
@echo off @echo off
setlocal enabledelayedexpansion setlocal enabledelayedexpansion
REM ─── Validate argument ─────────────────────────────────────────────────────── REM --- Validate argument ---------------------------------------------------
if "%~1"=="force" set "build_option=--build=*" & goto :start if "%~1"=="force" set "build_option=--build=*" & goto :start
if "%~1"=="missing" set "build_option=--build=missing" & goto :start if "%~1"=="missing" set "build_option=--build=missing" & goto :start
@@ -11,7 +11,7 @@ echo missing - Only build packages not already cached
exit /b 1 exit /b 1
:start :start
REM ─── Register remote (skip if already registered) ──────────────────────────── REM --- Register remote (skip if already registered) ------------------------
conan remote list | findstr /i "bigfootpackages" >nul 2>&1 conan remote list | findstr /i "bigfootpackages" >nul 2>&1
if errorlevel 1 ( if errorlevel 1 (
echo Adding Conan remote: bigfootpackages echo Adding Conan remote: bigfootpackages
@@ -24,17 +24,20 @@ if errorlevel 1 (
echo Conan remote 'bigfootpackages' already registered, skipping. echo Conan remote 'bigfootpackages' already registered, skipping.
) )
REM ─── Shared flags ──────────────────────────────────────────────────────────── REM --- Shared flags -----------------------------------------------------------
set "conan_common_base=--remote=bigfootpackages -pr:h=./ConanProfiles/host/msvc -pr:b=./ConanProfiles/build/msvc -o bigfoot/*:build_tests=True -o bigfoot/*:build_benchmarks=True -o bigfoot/*:tracy=True -o bigfoot/*:vulkan=True" set "conan_common_base=--remote=bigfootpackages -pr:h=./ConanProfiles/host/msvc -pr:b=./ConanProfiles/build/msvc -o bigfoot/*:build_tests=True -o bigfoot/*:build_benchmarks=True -o bigfoot/*:tracy=True -o bigfoot/*:vulkan=True"
REM ─── Install dependencies for each build type/variant ──────────────────────── REM --- Install dependencies for each build type/variant -----------------------
for %%C in (Release RelWithDebInfo Debug) do ( for %%C in (Release RelWithDebInfo Debug) do (
echo. echo.
echo [%%C] Installing dependencies... echo [%%C] Installing dependencies...
if "%%C"=="Release" set "config_profile=release"
if "%%C"=="RelWithDebInfo" set "config_profile=relwithdebinfo"
if "%%C"=="Debug" set "config_profile=debug"
for %%V in (toolmode game) do ( for %%V in (toolmode game) do (
set "toolmode_val=False" set "toolmode_val=False"
if "%%V"=="toolmode" set "toolmode_val=True" if "%%V"=="toolmode" set "toolmode_val=True"
conan install . !conan_common_base! -of build-windows-%%V -o bigfoot/*:toolmode=!toolmode_val! %build_option% -s:h build_type=%%C conan install . !conan_common_base! -of build-windows-%%V -o bigfoot/*:toolmode=!toolmode_val! %build_option% -pr:h=./ConanProfiles/Configurations/!config_profile! -pr:b=./ConanProfiles/Configurations/!config_profile!
if errorlevel 1 ( if errorlevel 1 (
echo ERROR: conan install failed for build type %%C ^(%%V^) echo ERROR: conan install failed for build type %%C ^(%%V^)
exit /b 1 exit /b 1
@@ -46,7 +49,7 @@ for %%C in (Release RelWithDebInfo Debug) do (
echo. echo.
echo All build types installed successfully. echo All build types installed successfully.
REM ─── Activate build environment and run CMake ──────────────────────────────── REM --- Activate build environment and run CMake --------------------------------
echo. echo.
echo Activating build environment and configuring CMake... echo Activating build environment and configuring CMake...
+3 -2
View File
@@ -79,11 +79,12 @@ conan_common_game=(
for build_type in "${build_types[@]}"; do for build_type in "${build_types[@]}"; do
echo echo
echo "[${build_type}] Installing dependencies..." echo "[${build_type}] Installing dependencies..."
if ! conan install . "${conan_common_toolmode[@]}" ${build_option} -s:h "build_type=${build_type}"; then build_type_profile="./ConanProfiles/Configurations/${build_type,,}"
if ! conan install . "${conan_common_toolmode[@]}" ${build_option} -pr:h="${build_type_profile}" -pr:b="${build_type_profile}"; then
echo "ERROR: conan install failed for build type ${build_type}" echo "ERROR: conan install failed for build type ${build_type}"
exit 1 exit 1
fi fi
if ! conan install . "${conan_common_game[@]}" ${build_option} -s:h "build_type=${build_type}"; then if ! conan install . "${conan_common_game[@]}" ${build_option} -pr:h="${build_type_profile}" -pr:b="${build_type_profile}"; then
echo "ERROR: conan install failed for build type ${build_type}" echo "ERROR: conan install failed for build type ${build_type}"
exit 1 exit 1
fi fi