Skip to content

fix(codeql): add build-mode manual, upgrade setup-msbuild to v3, skip vendor downloads#3085

Merged
daxgames merged 2 commits into
developmentfrom
copilot/fix-analyze-cpp-job
Jun 14, 2026
Merged

fix(codeql): add build-mode manual, upgrade setup-msbuild to v3, skip vendor downloads#3085
daxgames merged 2 commits into
developmentfrom
copilot/fix-analyze-cpp-job

Conversation

Copilot AI commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

The "Analyze (cpp)" CodeQL job was failing with configuration_error on PRs due to three issues in the workflow.

Root cause

codeql-action v4 defaults build-mode to undefined for C/C++ when not specified. On PRs, it attempts to use overlay database mode (requires build-mode: none), fails, and falls back — but this inconsistency causes GitHub's SARIF processing to return configuration_error almost immediately after upload.

Changes

  • build-mode: manual added to Initialize CodeQL — explicitly declares the manual MSBuild compilation, prevents the overlay-mode fallback that triggers the configuration error
  • microsoft/setup-msbuild@v2@v3 — v2 runs on Node.js 20 which GitHub removes June 16, 2026; v3 (released March 2026) uses Node 24
  • -NoVendor added 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
- name: Initialize CodeQL
  uses: github/codeql-action/init@v4
  with:
    languages: ${{ matrix.language }}
    build-mode: manual       # ← added

- name: Add MSBuild to PATH
  uses: microsoft/setup-msbuild@v3  # ← was @v2

- name: Build Cmder Launcher
  run: .\build.ps1 -Compile -NoVendor -verbose  # ← added -NoVendor

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
Copilot AI requested a review from daxgames June 14, 2026 09:41
@DRSDavidSoft DRSDavidSoft marked this pull request as ready for review June 14, 2026 10:36
Copilot AI review requested due to automatic review settings June 14, 2026 10:36

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.

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: manual for the C/C++ analysis job.
  • Upgrades microsoft/setup-msbuild from @v2 to @v3 (newer Node runtime support).
  • Runs the build script with -NoVendor to 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
@daxgames daxgames merged commit b73d7df into development Jun 14, 2026
2 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