fix(codeql): add build-mode manual, upgrade setup-msbuild to v3, skip vendor downloads#3085
Merged
Merged
Conversation
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job Analyze (cpp)
fix(codeql): add build-mode manual, upgrade setup-msbuild to v3, skip vendor downloads
Jun 14, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s CodeQL (C/C++) workflow to prevent configuration_error failures on PRs by making the build strategy explicit and modernizing the MSBuild setup used during tracing.
Changes:
- Explicitly sets CodeQL
build-mode: manualfor the C/C++ analysis job. - Upgrades
microsoft/setup-msbuildfrom@v2to@v3(newer Node runtime support). - Runs the build script with
-NoVendorto skip vendor downloads during CodeQL tracing.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
69
to
+73
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@v4 | ||
| with: | ||
| languages: ${{ matrix.language }} | ||
| build-mode: manual |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "Analyze (cpp)" CodeQL job was failing with
configuration_erroron PRs due to three issues in the workflow.Root cause
codeql-action v4 defaults
build-modetoundefinedfor C/C++ when not specified. On PRs, it attempts to use overlay database mode (requiresbuild-mode: none), fails, and falls back — but this inconsistency causes GitHub's SARIF processing to returnconfiguration_erroralmost immediately after upload.Changes
build-mode: manualadded toInitialize CodeQL— explicitly declares the manual MSBuild compilation, prevents the overlay-mode fallback that triggers the configuration errormicrosoft/setup-msbuild@v2→@v3— v2 runs on Node.js 20 which GitHub removes June 16, 2026; v3 (released March 2026) uses Node 24-NoVendoradded to build command — skips downloading vendor archives (git-for-windows, clink, conemu-maximus5, etc.) during CodeQL tracing; only C++ compilation is relevant to the analysis