chore: update CI and release workflows for gRPC versioning
- Updated caching keys in CI and release workflows from v2 to v3 for gRPC dependencies to improve cache management. - Enhanced linking options for `yaze_editor` and `yaze_agent` to ensure test symbols are included correctly across different platforms. Benefits: - Streamlines the build process by ensuring proper versioning and linking of test support libraries. - Improves cache efficiency in CI workflows, reducing build times.
This commit is contained in:
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -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'
|
||||
|
||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -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
|
||||
|
||||
@@ -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_FILE:yaze_test_support>")
|
||||
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()
|
||||
|
||||
@@ -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_FILE:yaze_test_support>")
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user