Skip to content

Fix(setup-build-tools): handle non-semver vcpkg versions and macOS cmake path#7

Merged
snnn merged 2 commits intomainfrom
fix/vcpkg-version-and-macos-cmake
Sep 9, 2025
Merged

Fix(setup-build-tools): handle non-semver vcpkg versions and macOS cmake path#7
snnn merged 2 commits intomainfrom
fix/vcpkg-version-and-macos-cmake

Conversation

@snnn
Copy link

@snnn snnn commented Sep 9, 2025

This PR fixes two issues in the setup-build-tools action:

  1. The vcpkg version is normalized to be semver compliant, so that it can be correctly handled by the @actions/tool-cache package. @actions/tool-cache package uses npm's semver package to parse such versions. However, vcpkg's version number is usually like "2025.08.27"(in YYYY.MM.DD format), which is not acceptable. Because there is an extra zero in the month part.

  2. The cmake binary path is correctly located on macOS.

Unit tests have been added for both fixes.

Copilot AI review requested due to automatic review settings September 9, 2025 04:59
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses two specific issues in the setup-build-tools action: normalizing non-semver compliant vcpkg versions and correctly locating the cmake binary path on macOS systems.

  • Adds vcpkg version normalization to handle leading zeros in version strings (e.g., "2025.08.27" → "2025.8.27")
  • Implements platform-specific cmake binary path resolution for macOS systems
  • Introduces comprehensive unit tests for both new functions

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/setup-build-tools/index.js Adds vcpkg version normalization and macOS cmake path handling functions with updated exports
test/setup-build-tools/vcpkg-version.test.js Unit tests for vcpkg version normalization edge cases
test/setup-build-tools/index.test.js Unit tests for platform-specific cmake binary path resolution

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@snnn snnn merged commit 29ec961 into main Sep 9, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants