Speed up CI: cache deps, ccache, changed-file clang-tidy - #19
Merged
Conversation
- Cancel superseded runs on the same ref via a concurrency group. - Cache apt packages with cache-apt-pkgs-action across every job, so the toolchain and dev headers (including the apt.llvm.org LLVM set) are not re-downloaded each run. - Route the build matrix compiles through ccache; the pinned submodules (sdbus-c++, spdlog, glaze) do not change, so they hit the cache after the first run. - clang-tidy: on a pull_request, tidy only the .cc files the PR changes, in parallel; push-to-main still tidies the whole tree as the regression net. Drop the redundant --version/--help/--dump-config invocations. - CodeQL: disable LTO for its build (link-time cost with no analysis value). ccache is deliberately not used here so the extractor still observes real compiler invocations. Signed-off-by: Joel Winarske <[email protected]>
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.
Speeds up CI without reducing coverage. The workflow currently rebuilds the
sdbus-c++submodule from source in every build job, reinstalls the apt/LLVM toolchain on every run, and runsclang-tidyover the whole tree on every PR.Changes
cancel-in-progress) — a new push to a PR cancels the in-flight run instead of letting it finish.awalsh128/cache-apt-pkgs-actionin every job. The heaviest case is the LLVM-19 set fromapt.llvm.org(the repo is still added first so the packages resolve). Tag-pinned@v1, matching the convention already used in thedrm-cxxsibling repo.hendrikmuhs/ccache-action+CMAKE_*_COMPILER_LAUNCHER=ccache). The pinned submodules never change between runs, so their object files hit the cache after the first run.pull_requestrun now tidies only the.cctranslation units the PR touches, in parallel;pushtomainstill tidies the whole tree so cross-file regressions are caught on merge. The redundant--version/--help/--dump-configinvocations are removed.Notes
ENABLE_LTO=ONso the published artifacts are unchanged; ccache still caches the compile step under LTO.@v1) to matchdrm-cxx; if you'd prefer they be SHA-pinned likeactions/*here, say so and I'll pin them.mainrun after merge primes the apt/ccache caches; the speedup lands on subsequent runs.