From 6919c506a1b2ea9570c723345df25748fb84d6ad Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Mar 2026 09:57:27 +0000 Subject: [PATCH 1/5] Initial plan From 34b4dd97cd671de5f92baa92599d3e245a8c0e36 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Mar 2026 10:03:15 +0000 Subject: [PATCH 2/5] Add MSVC Build Tools Insiders installation step to CI workflows Co-authored-by: gdr-at-ms <11031650+gdr-at-ms@users.noreply.github.com> --- .github/workflows/cmake.yml | 13 +++++++++++++ .github/workflows/codeql.yml | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index b28317f..044c862 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -16,6 +16,19 @@ jobs: steps: - uses: actions/checkout@v3 + - 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/17/pre/vs_buildtools.exe' -OutFile $installer + & $installer --quiet --wait --norestart --nocache ` + --add Microsoft.VisualStudio.Workload.VCTools ` + --includeRecommended + if ($LASTEXITCODE -ne 0 -and $LASTEXITCODE -ne 3010) { + throw "MSVC Build Tools Insiders installation failed with exit code $LASTEXITCODE" + } + - name: Use GitHub Actions provided vcpkg shell: pwsh run: Add-Content "$env:GITHUB_ENV" "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index c748460..d5ebef1 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -29,6 +29,19 @@ jobs: steps: - uses: actions/checkout@v3 + - 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/17/pre/vs_buildtools.exe' -OutFile $installer + & $installer --quiet --wait --norestart --nocache ` + --add Microsoft.VisualStudio.Workload.VCTools ` + --includeRecommended + if ($LASTEXITCODE -ne 0 -and $LASTEXITCODE -ne 3010) { + throw "MSVC Build Tools Insiders installation failed with exit code $LASTEXITCODE" + } + - name: Use GitHub Actions provided vcpkg shell: pwsh run: Add-Content "$env:GITHUB_ENV" "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" From 4423cf4e75e030223bda099389994fc9b58200ed Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Mar 2026 10:12:21 +0000 Subject: [PATCH 3/5] Use Insiders channel URL for MSVC Build Tools bootstrapper Co-authored-by: gdr-at-ms <11031650+gdr-at-ms@users.noreply.github.com> --- .github/workflows/cmake.yml | 2 +- .github/workflows/codeql.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 044c862..839b6d3 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -21,7 +21,7 @@ jobs: shell: pwsh run: | $installer = Join-Path $env:TEMP 'vs_buildtools.exe' - Invoke-WebRequest -Uri 'https://aka.ms/vs/17/pre/vs_buildtools.exe' -OutFile $installer + Invoke-WebRequest -Uri 'https://aka.ms/vs/insiders/vs_buildtools.exe' -OutFile $installer & $installer --quiet --wait --norestart --nocache ` --add Microsoft.VisualStudio.Workload.VCTools ` --includeRecommended diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index d5ebef1..5dd01a5 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -34,7 +34,7 @@ jobs: shell: pwsh run: | $installer = Join-Path $env:TEMP 'vs_buildtools.exe' - Invoke-WebRequest -Uri 'https://aka.ms/vs/17/pre/vs_buildtools.exe' -OutFile $installer + Invoke-WebRequest -Uri 'https://aka.ms/vs/insiders/vs_buildtools.exe' -OutFile $installer & $installer --quiet --wait --norestart --nocache ` --add Microsoft.VisualStudio.Workload.VCTools ` --includeRecommended From e7c1e5a9d241b66de11ed2747599afa64c3bcc5b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Mar 2026 10:20:19 +0000 Subject: [PATCH 4/5] Also treat VS installer exit code 3015 as success Co-authored-by: gdr-at-ms <11031650+gdr-at-ms@users.noreply.github.com> --- .github/workflows/cmake.yml | 2 +- .github/workflows/codeql.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 839b6d3..f704228 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -25,7 +25,7 @@ jobs: & $installer --quiet --wait --norestart --nocache ` --add Microsoft.VisualStudio.Workload.VCTools ` --includeRecommended - if ($LASTEXITCODE -ne 0 -and $LASTEXITCODE -ne 3010) { + if ($LASTEXITCODE -ne 0 -and $LASTEXITCODE -ne 3010 -and $LASTEXITCODE -ne 3015) { throw "MSVC Build Tools Insiders installation failed with exit code $LASTEXITCODE" } diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 5dd01a5..0a7b85b 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -38,7 +38,7 @@ jobs: & $installer --quiet --wait --norestart --nocache ` --add Microsoft.VisualStudio.Workload.VCTools ` --includeRecommended - if ($LASTEXITCODE -ne 0 -and $LASTEXITCODE -ne 3010) { + if ($LASTEXITCODE -ne 0 -and $LASTEXITCODE -ne 3010 -and $LASTEXITCODE -ne 3015) { throw "MSVC Build Tools Insiders installation failed with exit code $LASTEXITCODE" } From 41c5314eea54ce9fc208b9b74e47a5dab0c0d3f7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Mar 2026 10:34:15 +0000 Subject: [PATCH 5/5] Fix VS installer: use Start-Process -Wait -PassThru to properly block and capture exit code Co-authored-by: gdr-at-ms <11031650+gdr-at-ms@users.noreply.github.com> --- .github/workflows/cmake.yml | 12 +++++++----- .github/workflows/codeql.yml | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index f704228..db0d85c 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -22,11 +22,13 @@ jobs: run: | $installer = Join-Path $env:TEMP 'vs_buildtools.exe' Invoke-WebRequest -Uri 'https://aka.ms/vs/insiders/vs_buildtools.exe' -OutFile $installer - & $installer --quiet --wait --norestart --nocache ` - --add Microsoft.VisualStudio.Workload.VCTools ` - --includeRecommended - if ($LASTEXITCODE -ne 0 -and $LASTEXITCODE -ne 3010 -and $LASTEXITCODE -ne 3015) { - throw "MSVC Build Tools Insiders installation failed with exit code $LASTEXITCODE" + $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" } - name: Use GitHub Actions provided vcpkg diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 0a7b85b..fe4bd31 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -35,11 +35,13 @@ jobs: run: | $installer = Join-Path $env:TEMP 'vs_buildtools.exe' Invoke-WebRequest -Uri 'https://aka.ms/vs/insiders/vs_buildtools.exe' -OutFile $installer - & $installer --quiet --wait --norestart --nocache ` - --add Microsoft.VisualStudio.Workload.VCTools ` - --includeRecommended - if ($LASTEXITCODE -ne 0 -and $LASTEXITCODE -ne 3010 -and $LASTEXITCODE -ne 3015) { - throw "MSVC Build Tools Insiders installation failed with exit code $LASTEXITCODE" + $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" } - name: Use GitHub Actions provided vcpkg