diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5ed4885..6ea44357 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -221,9 +221,9 @@ jobs: with: path: | build/_deps - key: fetchcontent-${{ runner.os }}-${{ matrix.cc }}-${{ hashFiles('cmake/grpc*.cmake') }}-v2 + key: fetchcontent-${{ runner.os }}-${{ matrix.cc }}-${{ hashFiles('cmake/grpc*.cmake') }}-v3 restore-keys: | - fetchcontent-${{ runner.os }}-${{ matrix.cc }}- + fetchcontent-${{ runner.os }}-${{ matrix.cc }}-v3- - name: Monitor build progress (Windows) if: runner.os == 'Windows' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a9eb5f3b..de4ddfc6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,9 +78,9 @@ jobs: with: path: | build/_deps - key: fetchcontent-release-${{ hashFiles('cmake/grpc*.cmake') }}-v2 + key: fetchcontent-release-${{ hashFiles('cmake/grpc*.cmake') }}-v3 restore-keys: | - fetchcontent-release- + fetchcontent-release-v3- - name: Configure sccache shell: pwsh diff --git a/src/app/editor/editor_library.cmake b/src/app/editor/editor_library.cmake index 862d3491..899f36db 100644 --- a/src/app/editor/editor_library.cmake +++ b/src/app/editor/editor_library.cmake @@ -144,7 +144,19 @@ if(YAZE_BUILD_TESTS) endif() if(TARGET yaze_test_support) - target_link_libraries(yaze_editor PUBLIC yaze_test_support) + # Use whole-archive on Unix to ensure test symbols are included + # This is needed because editor_manager.cc calls test functions conditionally + if(APPLE) + target_link_options(yaze_editor PUBLIC + "LINKER:-force_load,$") + target_link_libraries(yaze_editor PUBLIC yaze_test_support) + elseif(UNIX) + target_link_libraries(yaze_editor PUBLIC + -Wl,--whole-archive yaze_test_support -Wl,--no-whole-archive) + else() + # Windows: Normal linking (no whole-archive needed, symbols resolve correctly) + target_link_libraries(yaze_editor PUBLIC yaze_test_support) + endif() message(STATUS "✓ yaze_editor linked to yaze_test_support") endif() endif() diff --git a/src/cli/agent.cmake b/src/cli/agent.cmake index 912725c7..27b0bbaf 100644 --- a/src/cli/agent.cmake +++ b/src/cli/agent.cmake @@ -171,4 +171,20 @@ if(YAZE_WITH_GRPC) message(STATUS "✓ gRPC GUI automation enabled for yaze_agent") endif() +# Link test support when tests are enabled (agent uses test harness functions) +if(YAZE_BUILD_TESTS AND TARGET yaze_test_support) + if(APPLE) + target_link_options(yaze_agent PUBLIC + "LINKER:-force_load,$") + target_link_libraries(yaze_agent PUBLIC yaze_test_support) + elseif(UNIX) + target_link_libraries(yaze_agent PUBLIC + -Wl,--whole-archive yaze_test_support -Wl,--no-whole-archive) + else() + # Windows: Normal linking + target_link_libraries(yaze_agent PUBLIC yaze_test_support) + endif() + message(STATUS "✓ yaze_agent linked to yaze_test_support") +endif() + set_target_properties(yaze_agent PROPERTIES POSITION_INDEPENDENT_CODE ON)