From 6edfedff18e41f408f62eb5a120aead4c7bed688 Mon Sep 17 00:00:00 2001 From: scawful Date: Mon, 13 Oct 2025 10:29:47 -0400 Subject: [PATCH] chore(ci): update CMake configuration for Linux and macOS builds - Modified CI configuration to use the D-Bus portal for file dialogs on Linux for improved reliability. - Updated CMake commands in both CI and release workflows to include the NFD_PORTAL option. - Removed OpenSSL from vcpkg.json to streamline dependencies. Benefits: - Enhances build reliability across different platforms. - Simplifies dependency management in the project. --- .github/workflows/ci.yml | 28 +++++++++++++++++++++------- .github/workflows/release.yml | 4 +++- src/app/gfx/gfx_library.cmake | 2 +- test/CMakeLists.txt | 4 ++++ vcpkg.json | 4 ---- 5 files changed, 29 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52370a17..a8a6c0fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -261,17 +261,31 @@ jobs: run: | set -e echo "::group::CMake Configuration" - cmake -B build -G Ninja \ - -DCMAKE_BUILD_TYPE=$BUILD_TYPE \ - -DCMAKE_C_COMPILER=${{ matrix.cc }} \ - -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \ - -DYAZE_BUILD_TESTS=ON \ - -DYAZE_BUILD_EMU=OFF \ - -DYAZE_ENABLE_ROM_TESTS=OFF 2>&1 | tee cmake_config.log + if [[ "${{ runner.os }}" == "Linux" ]]; then + # Linux: Use portal backend for file dialogs (more reliable in CI) + cmake -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=$BUILD_TYPE \ + -DCMAKE_C_COMPILER=${{ matrix.cc }} \ + -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \ + -DYAZE_BUILD_TESTS=ON \ + -DYAZE_BUILD_EMU=OFF \ + -DYAZE_ENABLE_ROM_TESTS=OFF \ + -DNFD_PORTAL=ON 2>&1 | tee cmake_config.log + else + # macOS: Use default GTK backend + cmake -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=$BUILD_TYPE \ + -DCMAKE_C_COMPILER=${{ matrix.cc }} \ + -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \ + -DYAZE_BUILD_TESTS=ON \ + -DYAZE_BUILD_EMU=OFF \ + -DYAZE_ENABLE_ROM_TESTS=OFF 2>&1 | tee cmake_config.log + fi echo "::endgroup::" # Note: Full-featured build to match release configuration # Note: YAZE_BUILD_EMU=OFF disables standalone emulator executable # but yaze_emulator library is still built for main app/tests + # Note: NFD_PORTAL=ON uses D-Bus portal instead of GTK on Linux (more reliable in CI) - name: Report Configure Failure if: failure() && (steps.configure_windows.outcome == 'failure' || steps.configure_unix.outcome == 'failure') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4c1b0630..cf139654 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -287,11 +287,13 @@ jobs: -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ -DYAZE_BUILD_EMU=OFF \ -DYAZE_BUILD_TESTS=ON \ - -DYAZE_ENABLE_ROM_TESTS=OFF 2>&1 | tee cmake_config.log + -DYAZE_ENABLE_ROM_TESTS=OFF \ + -DNFD_PORTAL=ON 2>&1 | tee cmake_config.log echo "::endgroup::" # Note: YAZE_BUILD_EMU=OFF disables standalone emulator executable # but yaze_emulator library is still built for main app # Note: Tests enabled for pre-1.0 releases to catch issues before publishing + # Note: NFD_PORTAL=ON uses D-Bus portal instead of GTK for file dialogs (more reliable in CI) - name: "Report Configure Failure" if: | diff --git a/src/app/gfx/gfx_library.cmake b/src/app/gfx/gfx_library.cmake index c05a622e..1ac80236 100644 --- a/src/app/gfx/gfx_library.cmake +++ b/src/app/gfx/gfx_library.cmake @@ -75,6 +75,7 @@ message(STATUS " - GFX Tier: gfx_backend configured") set(GFX_RESOURCE_SRC app/gfx/resource/arena.cc app/gfx/resource/memory_pool.cc + app/gfx/render/background_buffer.cc ) add_library(yaze_gfx_resource STATIC ${GFX_RESOURCE_SRC}) configure_gfx_library(yaze_gfx_resource) @@ -122,7 +123,6 @@ set(GFX_RENDER_SRC app/gfx/render/atlas_renderer.cc app/gfx/render/texture_atlas.cc app/gfx/render/tilemap.cc - app/gfx/render/background_buffer.cc ) add_library(yaze_gfx_render STATIC ${GFX_RENDER_SRC}) configure_gfx_library(yaze_gfx_render) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index e4f24f5b..7290b9de 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -47,6 +47,10 @@ if(YAZE_BUILD_TESTS) message(STATUS "Configuring Windows stack size for ${suite_name} to 16MB") if(MSVC) target_link_options(${suite_name} PRIVATE /STACK:16777216) + # Force whole-archive linking for protobuf to ensure all symbols are included + if(YAZE_WITH_GRPC) + target_link_options(${suite_name} PRIVATE /WHOLEARCHIVE:libprotobuf) + endif() else() target_link_options(${suite_name} PRIVATE -Wl,--stack,16777216) endif() diff --git a/vcpkg.json b/vcpkg.json index 8c9a951e..ec4c2c8c 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -18,10 +18,6 @@ { "name": "zlib", "platform": "windows" - }, - { - "name": "openssl", - "platform": "windows" } ], "overrides": [