Skip to content

GH-51494: [CI][C++] Detect Visual Studio installed path instead of hardcoding it - #51610

Merged
kou merged 4 commits into
apache:mainfrom
raulcd:GH-51494
Sep 29, 2026
Merged

kou merged 4 commits into
apache:mainfrom
raulcd:GH-51494

Conversation

@raulcd

@raulcd raulcd commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Rationale for this change

The Windows ARM job was failing on CMake configure. The real problem is that the Windows-11-arm64 GitHub runner updated VS Code from 2022 to 2026 here: actions/runner-images#14592

The workflow was hardcoding vcvarsall.bat path and wasn't really setting those up.

What changes are included in this PR?

Use vswhere to find VSCode installation path instead of manually setting it up.
I investigating using: https://github.com/ilammy/msvc-dev-cmd which is allowed by infra and used on nanoarrow and adbc but it feels unmaintained at the moment (No new releases in 3 years).

This has been changed everywhere where we were manually setting this path.

Are these changes tested?

Yes via CI

Are there any user-facing changes?

No

Was AI used for this PR?

In accordance to the AI generation guidelines, please disclose below whether and how AI was used in this PR.

PR code and description written by:

  • Human
  • AI

AI used to analyze and first implementation.
Re-implemented on a second bash step from me as it's much cleaner and clearer.

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #51494 has been automatically assigned in GitHub to PR creator.

@github-actions github-actions Bot added the awaiting committer review Awaiting committer review label Sep 28, 2026
@raulcd raulcd added the CI: Extra: C++ Run extra C++ CI label Sep 28, 2026
Comment thread .github/workflows/cpp_windows.yml
@raulcd
raulcd marked this pull request as ready for review September 28, 2026 10:52
Copilot AI lite review requested due to automatic review settings September 28, 2026 10:52
@github-actions github-actions Bot added awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review labels Sep 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The ARM job still uses a runner image without Visual Studio, so discovery and setup will fail.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Updates Windows C++ CI to dynamically locate Visual Studio with vswhere instead of using a hardcoded path.

Changes:

  • Detects the Visual Studio installation path.
  • Uses it for build and test environment setup.
File Description
.github/​workflows/​cpp_windows.yml Adds dynamic Visual Studio discovery and replaces hardcoded paths.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/cpp_windows.yml Outdated
@raulcd raulcd added awaiting committer review Awaiting committer review and removed awaiting changes Awaiting changes labels Sep 28, 2026
@github-actions github-actions Bot added awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review labels Sep 28, 2026
Comment thread .github/workflows/cpp_windows.yml
Comment thread .github/workflows/cpp_windows.yml Outdated
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Copilot AI review requested due to automatic review settings September 29, 2026 07:46
@github-actions github-actions Bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Sep 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

No unresolved review comments were identified.

Review effort: Lite
Findings: None

Resolved since last review (1)

Copilot AI review requested due to automatic review settings September 29, 2026 08:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The release verification script may still fail when the installed Visual Studio version does not provide the VS 2022 CMake generator.

Review effort: Lite
Findings: 1 High severity

Open (1)

Comment thread dev/release/verify-release-candidate.bat
@github-actions github-actions Bot added awaiting changes Awaiting changes and removed awaiting change review Awaiting change review labels Sep 29, 2026
@raulcd

raulcd commented Sep 29, 2026

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit matlab

@raulcd
raulcd requested a review from kou September 29, 2026 10:21
@github-actions

Copy link
Copy Markdown

Revision: 5480dde

Submitted crossbow builds: ursacomputing/crossbow @ actions-ca8792eab0

Task Status
matlab GitHub Actions

@kou kou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

@kou
kou merged commit d6d9493 into apache:main Sep 29, 2026
68 of 70 checks passed
@kou kou removed the awaiting changes Awaiting changes label Sep 29, 2026
@github-actions github-actions Bot added the awaiting merge Awaiting merge label Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting merge Awaiting merge CI: Extra: C++ Run extra C++ CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants