Skip to content

CI: use MSVC Build Tools Insiders on Windows#114

Merged
GabrielDosReis merged 5 commits intomainfrom
copilot/update-ci-workflow-msvc-insiders
Mar 13, 2026
Merged

CI: use MSVC Build Tools Insiders on Windows#114
GabrielDosReis merged 5 commits intomainfrom
copilot/update-ci-workflow-msvc-insiders

Conversation

Copy link
Contributor

Copilot AI commented Mar 13, 2026

Both cmake.yml and codeql.yml currently build on Windows using whatever stable MSVC toolchain ships with the windows-latest runner. This adds a step to explicitly install and use the Insiders edition of the MSVC Build Tools before CMake configuration.

Changes

  • Both workflows (cmake.yml, codeql.yml): Added a Windows-only step immediately after checkout that downloads the Visual Studio Insiders Build Tools bootstrapper from https://aka.ms/vs/insiders/vs_buildtools.exe and installs Microsoft.VisualStudio.Workload.VCTools with recommended components.
- name: Install MSVC Build Tools Insiders
  if: runner.os == 'Windows'
  shell: pwsh
  run: |
    $installer = Join-Path $env:TEMP 'vs_buildtools.exe'
    Invoke-WebRequest -Uri 'https://aka.ms/vs/insiders/vs_buildtools.exe' -OutFile $installer
    $process = Start-Process -FilePath $installer -ArgumentList `
      '--quiet','--wait','--norestart','--nocache', `
      '--add','Microsoft.VisualStudio.Workload.VCTools', `
      '--includeRecommended' -Wait -PassThru
    $exitCode = $process.ExitCode
    if ($exitCode -ne 0 -and $exitCode -ne 3010 -and $exitCode -ne 3015) {
      throw "MSVC Build Tools Insiders installation failed with exit code $exitCode"
    }

The installer is launched via Start-Process -Wait -PassThru rather than PowerShell's & call operator, which ensures the script properly blocks until the full installation completes and reliably captures the exit code from the process object.

Exit codes 3010 (success + reboot pending) and 3015 (success + reboot required due to pending file operations) are both treated as success — standard for VS installer in CI. Any other non-zero exit code fails fast with a descriptive error rather than silently falling back to the stable toolchain.

Original prompt

This section details on the original issue you should resolve

<issue_title>Update the CI workflow to use MSVC Build Tools Insiders</issue_title>
<issue_description>Set up the CI workflow on Windows to use the insiders edition of the MSVC Build Tools.</issue_description>

<agent_instructions>Update the GH Action workflows on Windows to use MSVC Build Tool Insiders</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: gdr-at-ms <11031650+gdr-at-ms@users.noreply.github.com>
Copilot AI changed the title [WIP] Update CI workflow to use MSVC Build Tools Insiders CI: use MSVC Build Tools Insiders on Windows Mar 13, 2026
Copilot AI requested a review from gdr-at-ms March 13, 2026 10:04
Co-authored-by: gdr-at-ms <11031650+gdr-at-ms@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 13, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • aka.ms
    • Triggering command: /usr/bin/curl curl -sI REDACTED (dns block)
    • Triggering command: /usr/bin/curl curl -sIL REDACTED (dns block)
    • Triggering command: /usr/bin/curl curl --max-time 10 -sIL REDACTED (dns block)
  • devblogs.microsoft.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)
  • gist.github.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)
  • learn.microsoft.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)
  • visualstudio.microsoft.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested a review from gdr-at-ms March 13, 2026 10:14
Co-authored-by: gdr-at-ms <11031650+gdr-at-ms@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 13, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • learn.microsoft.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested a review from gdr-at-ms March 13, 2026 10:22
@gdr-at-ms gdr-at-ms marked this pull request as ready for review March 13, 2026 10:26
@gdr-at-ms
Copy link
Member

@copilot the CI is failing at the VS installation phase. Fix it.

… and capture exit code

Co-authored-by: gdr-at-ms <11031650+gdr-at-ms@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 13, 2026

@copilot the CI is failing at the VS installation phase. Fix it.

The installer was failing because PowerShell's & call operator doesn't properly wait for the VS bootstrapper's child process, leaving $LASTEXITCODE null. Fixed in 41c5314 by switching to Start-Process -Wait -PassThru, which blocks until the full installation completes and reliably captures the exit code.

Copilot AI requested a review from gdr-at-ms March 13, 2026 10:36
@GabrielDosReis GabrielDosReis merged commit cf8a23b into main Mar 13, 2026
6 checks passed
@GabrielDosReis GabrielDosReis deleted the copilot/update-ci-workflow-msvc-insiders branch March 13, 2026 10:51
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.

Update the CI workflow to use MSVC Build Tools Insiders

3 participants