Skip to content

Fix CodeQL workflow: drop update-alternatives, pass gcc-14 directly to cmake - #214

Merged
clauspruefer merged 1 commit into
mainfrom
copilot/fix-analyze-c-cpp-job-yet-again
Aug 14, 2026
Merged

Fix CodeQL workflow: drop update-alternatives, pass gcc-14 directly to cmake#214
clauspruefer merged 1 commit into
mainfrom
copilot/fix-analyze-c-cpp-job-yet-again

Conversation

Copilot AI commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

lib/xml/xmlparser.cpp uses #include <generator> (C++23 std::generator), available only in gcc-14+. The previous fix installed gcc-14 but routed it through update-alternatives to override system symlinks — a fragile indirection that also had no effect on GitHub's parallel dynamic code scanning run, which uses its own autobuild runner.

Changes

  • Removed the "Select gcc-14/g++-14 as default compiler" step (update-alternatives across all four gcc/g++/cc/c++ aliases)
  • Removed CC/CXX env vars from the Build step
  • Pass compiler paths directly to cmake — no system-wide symlink mutation needed:
- name: Build
  run: |
    cmake -B _build -DCMAKE_C_COMPILER=/usr/bin/gcc-14 -DCMAKE_CXX_COMPILER=/usr/bin/g++-14
    cmake --build _build --parallel $(nproc)

Note on the dynamic scan

The linked failing job (runs/31785672753) is GitHub's default code scanning (dynamic/github-code-scanning/codeql), which runs independently of this workflow using autobuild with system gcc-13. That cannot be fixed via repository files. To stop it: Settings → Security → Code scanning → Default setup → Disable. Our custom workflow already handles analysis correctly.

…cmake

Co-authored-by: clauspruefer <17313789+clauspruefer@users.noreply.github.com>
Copilot AI changed the title Fix CodeQL workflow: remove update-alternatives, use explicit gcc-14 paths Fix CodeQL workflow: drop update-alternatives, pass gcc-14 directly to cmake Aug 14, 2026
Copilot AI requested a review from clauspruefer August 14, 2026 09:22
@clauspruefer
clauspruefer marked this pull request as ready for review August 14, 2026 09:42
Copilot AI lite review requested due to automatic review settings August 14, 2026 09:42
@clauspruefer
clauspruefer merged commit 3c957ba into main Aug 14, 2026
6 of 7 checks passed

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

Updates the repository’s custom CodeQL workflow to reliably use GCC 14 for the C/C++ build without mutating system-wide compiler symlinks, aligning the workflow with the project’s C++23 requirement (<generator>).

Changes:

  • Removed the update-alternatives step that globally rewired gcc/g++/cc/c++.
  • Removed CC/CXX environment overrides in the build step.
  • Configured CMake to use /usr/bin/gcc-14 and /usr/bin/g++-14 directly via -DCMAKE_*_COMPILER.

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

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