From 8f7b2bd6a625809f0ca6d165451a645f2eb36842 Mon Sep 17 00:00:00 2001 From: scawful Date: Fri, 17 Oct 2025 16:30:50 -0400 Subject: [PATCH] chore: update CI and release workflows for toolchain handling - Modified CI workflow to correctly format the toolchain file argument for CMake. - Updated release workflow to enhance the release creation process, ensuring the latest release is marked appropriately. - Added configuration to disable protobuf version resource on Windows to prevent duplicate resource errors during linking. Benefits: - Improves build reliability and consistency across different environments. - Streamlines the release process, making it more intuitive for developers. --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 5 +++-- cmake/grpc.cmake | 7 +++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3a302ac..c5ed4885 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -368,7 +368,7 @@ jobs: "-S", ".", "-B", "build", "-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}", - "-DCMAKE_TOOLCHAIN_FILE=$toolchain", + "`"-DCMAKE_TOOLCHAIN_FILE=$toolchain`"", "-DVCPKG_TARGET_TRIPLET=x64-windows-static", "-DVCPKG_MANIFEST_MODE=ON", "-DYAZE_BUILD_TESTS=ON", diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e7a5c343..a9eb5f3b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -103,7 +103,7 @@ jobs: -DCMAKE_BUILD_TYPE=Release ` -DCMAKE_C_COMPILER=clang-cl ` -DCMAKE_CXX_COMPILER=clang-cl ` - -DCMAKE_TOOLCHAIN_FILE=$toolchain ` + "-DCMAKE_TOOLCHAIN_FILE=$toolchain" ` -DVCPKG_TARGET_TRIPLET=x64-windows-static ` -DVCPKG_MANIFEST_MODE=ON ` -DYAZE_BUILD_TESTS=OFF ` @@ -387,7 +387,7 @@ jobs: cat release_notes.md - - name: Create Release + - name: Create or Update Release uses: softprops/action-gh-release@v2 with: tag_name: ${{ steps.tag.outputs.tag }} @@ -395,6 +395,7 @@ jobs: body_path: release_notes.md draft: false prerelease: ${{ contains(steps.tag.outputs.tag, '-') }} + make_latest: ${{ !contains(steps.tag.outputs.tag, '-') }} files: | artifacts/yaze-windows-x64/* artifacts/yaze-macos-universal/* diff --git a/cmake/grpc.cmake b/cmake/grpc.cmake index 3d6cf611..5e3506e8 100644 --- a/cmake/grpc.cmake +++ b/cmake/grpc.cmake @@ -103,6 +103,13 @@ set(protobuf_BUILD_PROTOC_BINARIES ON CACHE BOOL "" FORCE) set(protobuf_WITH_ZLIB ON CACHE BOOL "" FORCE) set(protobuf_MSVC_STATIC_RUNTIME ON CACHE BOOL "" FORCE) +# Disable protobuf version resource on Windows to avoid LNK1241 duplicate resource errors +# gRPC v1.75.1 protobuf generates version.res that gets linked multiple times +if(WIN32) + set(protobuf_RC_FILEVERSION "" CACHE STRING "" FORCE) + set(protobuf_DISABLE_RTTI ON CACHE BOOL "" FORCE) +endif() + # Abseil configuration set(ABSL_PROPAGATE_CXX_STD ON CACHE BOOL "" FORCE) set(ABSL_ENABLE_INSTALL ON CACHE BOOL "" FORCE)