refactor: Simplify CMake configuration for consistent builds
- Removed conditional feature flags for minimal builds, ensuring all features (JSON, gRPC, AI) are enabled for both CI and release configurations. - Updated CI and release workflows to reflect the change from minimal build to full build mode, enhancing consistency across environments. - Adjusted summary outputs in CI workflows to clarify the build mode being used.
This commit is contained in:
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@@ -224,7 +224,7 @@ jobs:
|
||||
-DVCPKG_TARGET_TRIPLET=x64-windows-static `
|
||||
-DVCPKG_MANIFEST_MODE=ON `
|
||||
-DVCPKG_INSTALL_OPTIONS="--debug" `
|
||||
-DYAZE_MINIMAL_BUILD=ON `
|
||||
-DYAZE_BUILD_TESTS=ON `
|
||||
-DYAZE_ENABLE_ROM_TESTS=OFF 2>&1 | Tee-Object -FilePath cmake_config.log
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
@@ -245,7 +245,7 @@ jobs:
|
||||
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
|
||||
-DCMAKE_C_COMPILER=${{ matrix.cc }} \
|
||||
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \
|
||||
-DYAZE_MINIMAL_BUILD=ON \
|
||||
-DYAZE_BUILD_TESTS=ON \
|
||||
-DYAZE_ENABLE_ROM_TESTS=OFF 2>&1 | tee cmake_config.log
|
||||
echo "::endgroup::"
|
||||
|
||||
@@ -419,7 +419,7 @@ jobs:
|
||||
echo "- **Platform**: ${{ matrix.os }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "- **Compiler**: ${{ matrix.cc }}/${{ matrix.cxx }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "- **Build Type**: ${{ env.BUILD_TYPE }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "- **Minimal Build**: ON" >> $GITHUB_STEP_SUMMARY
|
||||
echo "- **Build Mode**: Full (same as release)" >> $GITHUB_STEP_SUMMARY
|
||||
if [[ "${{ runner.os }}" == "Windows" ]]; then
|
||||
echo "- **vcpkg Triplet**: x64-windows-static" >> $GITHUB_STEP_SUMMARY
|
||||
if [[ "${{ steps.vcpkg.outcome }}" != "" ]]; then
|
||||
@@ -527,7 +527,7 @@ jobs:
|
||||
-DCMAKE_C_COMPILER=clang-14 \
|
||||
-DCMAKE_CXX_COMPILER=clang++-14 \
|
||||
-DCMAKE_CXX_FLAGS="-fsanitize=address -fno-omit-frame-pointer" \
|
||||
-DYAZE_MINIMAL_BUILD=ON
|
||||
-DYAZE_BUILD_TESTS=ON
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build --parallel
|
||||
|
||||
14
.github/workflows/release.yml
vendored
14
.github/workflows/release.yml
vendored
@@ -207,9 +207,9 @@ jobs:
|
||||
cmake -B build -G "Visual Studio 17 2022" -A x64 `
|
||||
-DCMAKE_BUILD_TYPE=$env:BUILD_TYPE `
|
||||
-DCMAKE_TOOLCHAIN_FILE="$vcpkgToolchain" `
|
||||
-DYAZE_BUILD_TESTS=OFF `
|
||||
-DYAZE_BUILD_EMU=OFF `
|
||||
-DYAZE_BUILD_APP=ON 2>&1 | Tee-Object -FilePath cmake_config.log
|
||||
-DVCPKG_TARGET_TRIPLET=x64-windows-static `
|
||||
-DVCPKG_MANIFEST_MODE=ON `
|
||||
-DYAZE_BUILD_TESTS=OFF 2>&1 | Tee-Object -FilePath cmake_config.log
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "::error::CMake configuration failed with exit code $LASTEXITCODE"
|
||||
@@ -229,9 +229,7 @@ jobs:
|
||||
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
|
||||
-DCMAKE_OSX_ARCHITECTURES=${{ matrix.mac_arch }} \
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
|
||||
-DYAZE_BUILD_TESTS=OFF \
|
||||
-DYAZE_BUILD_EMU=OFF \
|
||||
-DYAZE_BUILD_APP=ON 2>&1 | tee cmake_config.log
|
||||
-DYAZE_BUILD_TESTS=OFF 2>&1 | tee cmake_config.log
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: "Configure (Linux)"
|
||||
@@ -243,9 +241,7 @@ jobs:
|
||||
echo "::group::CMake Configuration (Linux)"
|
||||
cmake -B build -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
|
||||
-DYAZE_BUILD_TESTS=OFF \
|
||||
-DYAZE_BUILD_EMU=OFF \
|
||||
-DYAZE_BUILD_APP=ON 2>&1 | tee cmake_config.log
|
||||
-DYAZE_BUILD_TESTS=OFF 2>&1 | tee cmake_config.log
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: "Report Configure Failure"
|
||||
|
||||
@@ -66,29 +66,14 @@ option(YAZE_MINIMAL_BUILD "Minimal build for CI (disable optional features)" OFF
|
||||
option(YAZE_USE_MODULAR_BUILD "Use modularized library build system for faster builds" ON)
|
||||
|
||||
# ============================================================================
|
||||
# Feature Flags - Conditional Based on Build Type
|
||||
# Feature Flags - Always Enable All Features
|
||||
# ============================================================================
|
||||
# For minimal builds (CI), disable expensive optional features
|
||||
# For full builds (development/release), enable all features
|
||||
if(YAZE_MINIMAL_BUILD)
|
||||
set(Z3ED_AI OFF)
|
||||
set(YAZE_WITH_JSON ON) # Keep JSON (header-only, lightweight)
|
||||
set(YAZE_WITH_GRPC OFF) # Disable gRPC (requires 15-45 min to compile)
|
||||
message(STATUS "○ Minimal build: JSON only (gRPC/AI disabled for CI speed)")
|
||||
|
||||
set(YAZE_ENABLE_UI_TESTS OFF CACHE BOOL "Disabled for minimal build" FORCE)
|
||||
set(YAZE_BUILD_Z3ED OFF CACHE BOOL "Disabled for minimal build" FORCE)
|
||||
# Keep EMU and LIB enabled for comprehensive testing
|
||||
set(YAZE_BUILD_EMU ON CACHE BOOL "Required for test suite" FORCE)
|
||||
set(YAZE_BUILD_LIB ON CACHE BOOL "Required for test suite" FORCE)
|
||||
set(YAZE_INSTALL_LIB OFF CACHE BOOL "Disabled for minimal build" FORCE)
|
||||
else()
|
||||
# Full build - all features enabled
|
||||
set(Z3ED_AI ON)
|
||||
set(YAZE_WITH_JSON ON)
|
||||
set(YAZE_WITH_GRPC ON)
|
||||
message(STATUS "✓ All features enabled: JSON, gRPC, AI Agent")
|
||||
endif()
|
||||
# CI and Release now use the same configuration for consistency
|
||||
# This avoids runtime library mismatches and ensures CI tests what we ship
|
||||
set(Z3ED_AI ON)
|
||||
set(YAZE_WITH_JSON ON)
|
||||
set(YAZE_WITH_GRPC ON)
|
||||
message(STATUS "✓ All features enabled: JSON, gRPC, AI Agent")
|
||||
|
||||
# YAZE_SUPPRESS_WARNINGS: Suppress compiler warnings for cleaner build output
|
||||
option(YAZE_SUPPRESS_WARNINGS "Suppress compiler warnings (use -v preset suffix for verbose)" ON)
|
||||
|
||||
Reference in New Issue
Block a user