Repository navigation
CI: cut repeated work in the C++ builds - #1610
Merged
Merged
Conversation
A push to main used about 240 runner-minutes, and the Ubuntu clang job took 72-89 minutes end to end. Most of that was work repeated on every run: - clang-query ran in both Ubuntu jobs on the same Linux sources, one 100-file batch at a time: 26-55 minutes per job. It now runs only in Ubuntu Default (the fastest Linux build), runs one batch per core, and lists each file once. A file compiled into several targets has one compile_commands.json entry per target, and clang-query already checks every entry of each file it's given, so passing a file twice made it parse each of those entries twice. - The macOS jobs compiled libdpp from source with our pinned brew formula: 4 minutes on Apple Silicon, 13 on Intel. The installed keg is now cached, keyed on the formula and on the versions of the libraries it links against. The step now also fails if pkg-config can't find DPP 10.1.5, because CMake would otherwise build without Discord integration and pass. - Linux and macOS builds now use ccache. Only pushes to main save the cache; PRs restore main's latest one. Windows is left out because ccache can't cache MSVC builds that write debug info to a PDB (/Zi). - install-qt-action now caches Qt instead of downloading it every job. - tabs.yml ran on pushes to every branch as well as on pull requests, so it ran twice for each PR push. It now runs on pushes to main only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gin890
pushed a commit
that referenced
this pull request
Oct 17, 2026
The two Windows jobs spend 19-27 minutes each compiling, and #1610 left them out of ccache because three things blocked it: - ccache can't wrap the compiler under the Visual Studio generator, so Windows CI now configures with "Ninja Multi-Config". It keeps Visual Studio's output layout (bin/RelWithDebInfo/), so the upload and test steps are unchanged. A new step runs vcvars64.bat from the same Visual Studio and passes its environment to the later steps. For the clang job it puts that Visual Studio's own clang-cl first on PATH, the one the ClangCL toolset used. - ccache can't cache /Zi, which writes debug info to a shared PDB. CI now builds with /Z7 (CMP0141 and CMAKE_MSVC_DEBUG_INFORMATION_FORMAT =Embedded); the linker still writes the PDB that gets uploaded. - ccache can't cache a compile that writes a /FAs assembly listing. The listings are now behind a PA_ASSEMBLY_LISTINGS option, ON by default so local builds keep them, and CI turns it off. CMakeLists.txt and CoreLib.cmake picked the clang-cl flags (-march, -Wno-unused-function) by checking for the ClangCL toolset, which is empty under Ninja. They now check CMAKE_CXX_COMPILER_ID, which is "Clang" for clang-cl under either generator. Ninja runs nproc + 2 compiles at once on Windows instead of 10, close to the one compile per core that Visual Studio's /MP ran, so memory use stays near what the runner handled before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dalton-V
approved these changes
Oct 18, 2026
Gin890
pushed a commit
that referenced
this pull request
Oct 18, 2026
The two Windows jobs spend 19-27 minutes each compiling, and #1610 left them out of ccache because three things blocked it: - ccache can't wrap the compiler under the Visual Studio generator, so Windows CI now configures with "Ninja Multi-Config". It keeps Visual Studio's output layout (bin/RelWithDebInfo/), so the upload and test steps are unchanged. A new step runs vcvars64.bat from the same Visual Studio and passes its environment to the later steps. For the clang job it puts that Visual Studio's own clang-cl first on PATH, the one the ClangCL toolset used. - ccache can't cache /Zi, which writes debug info to a shared PDB. CI now builds with /Z7 (CMP0141 and CMAKE_MSVC_DEBUG_INFORMATION_FORMAT =Embedded); the linker still writes the PDB that gets uploaded. - ccache can't cache a compile that writes a /FAs assembly listing. The listings are now behind a PA_ASSEMBLY_LISTINGS option, ON by default so local builds keep them, and CI turns it off. CMakeLists.txt and CoreLib.cmake picked the clang-cl flags (-march, -Wno-unused-function) by checking for the ClangCL toolset, which is empty under Ninja. They now check CMAKE_CXX_COMPILER_ID, which is "Clang" for clang-cl under either generator. Ninja runs nproc + 2 compiles at once on Windows instead of 10, close to the one compile per core that Visual Studio's /MP ran, so memory use stays near what the runner handled before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gin890
pushed a commit
that referenced
this pull request
Oct 18, 2026
The two Windows jobs spend 19-27 minutes each compiling, and #1610 left them out of ccache because three things blocked it: - ccache can't wrap the compiler under the Visual Studio generator, so Windows CI now configures with "Ninja Multi-Config". It keeps Visual Studio's output layout (bin/RelWithDebInfo/), so the upload and test steps are unchanged. A new step runs vcvars64.bat from the same Visual Studio and passes its environment to the later steps. For the clang job it puts that Visual Studio's own clang-cl first on PATH, the one the ClangCL toolset used. - ccache can't cache /Zi, which writes debug info to a shared PDB. CI now builds with /Z7 (CMP0141 and CMAKE_MSVC_DEBUG_INFORMATION_FORMAT =Embedded); the linker still writes the PDB that gets uploaded. - ccache can't cache a compile that writes a /FAs assembly listing. The listings are now behind a PA_ASSEMBLY_LISTINGS option, ON by default so local builds keep them, and CI turns it off. CMakeLists.txt and CoreLib.cmake picked the clang-cl flags (-march, -Wno-unused-function) by checking for the ClangCL toolset, which is empty under Ninja. They now check CMAKE_CXX_COMPILER_ID, which is "Clang" for clang-cl under either generator. Ninja runs nproc + 2 compiles at once on Windows instead of 10, close to the one compile per core that Visual Studio's /MP ran, so memory use stays near what the runner handled before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
A push to main uses about 240 runner-minutes, and the slowest job (Ubuntu clang) takes 72–89 minutes. Per-step timings from recent runs show that most of this is the same work repeated on every run:
Changes
nprocbatches of 10 files at once, each batch writing to its own output file. Each file is now listed only once: compile_commands.json has one entry per target for files built into several targets, and clang-query already checks every entry of each file it's given, so a file listed twice had each of its entries parsed twice. If clang-query fails on a file, the step still prints the collected output and then fails.actions/cache, keyed on the formula file and on the installed versions of libsodium, openssl@3 and opus, so a Homebrew update to any of them triggers a rebuild. A newpkg-config --exact-version=10.1.5 dppcheck fails the job if DPP isn't found. Without it, CMake would build without Discord integration and the job would pass.hendrikmuhs/ccache-action. Only pushes to main save the cache; PRs restore main's latest one, so PR runs don't use up the repo's 10 GB cache quota.evict-old-files: jobkeeps each saved cache to what that build used. Windows isn't covered because ccache can't cache MSVC builds that use/Zi(PDB debug info); that would need/Z7.cache: trueon install-qt-action) instead of being downloaded in every job.pull_request, so it ran twice for each PR push.Expected effect
Testing
clang-queryand a real compile_commands.json (1,545 entries, 1,419 unique files). Every file was checked exactly once, and a path containing a space worked. A match fails with the existing "Forbidden code" error, and a clang-query error fails with the new message after printing the output.🤖 Generated with Claude Code