Refactor clang-format check into separate CI job#529
Merged
Conversation
Move formatting check out of the build matrix into a dedicated format-gate job that runs first and gates the entire pipeline. Fixes formatting running 3 times (once per matrix profile). Closes #527
Contributor
There was a problem hiding this comment.
Pull request overview
This PR separates the clang-format validation from the build matrix into its own CI gate, making formatting a prerequisite for all builds.
Changes:
- Adds a dedicated
format-gatejob that checks formatting after checkout. - Makes the build matrix depend on the format gate.
- Removes the clang-format step from the build job.
Emscripten bundles its own Clang. Installing system Clang alongside it causes a module cache conflict (_Builtin_stddef defined in two places) because both compilers write to the same default ModuleCache directory. Skipping the Install Clang step for wasm_release avoids the collision.
clang-scan-deps is required by CMake for C++ module dependency scanning triggered by Qt's WASM toolchain (-fmodules flag). The build_machine Conan profile also requires system Clang 21 for cross-compilation (CC=clang with compiler.version=21). Skipping Clang for wasm_release was incorrect — restoring it.
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.
Summary
Extracted the clang-format style check from the build matrix into a dedicated, independent CI job that runs before the build job.
Key Changes
format-gatejob that runs clang-format style checks on Ubuntubuildjob (previously only ran forwasm_releaseprofile)needs: format-gatedependency to thebuildjob to ensure format checks pass before buildingif: matrix.build_profile == 'wasm_release'restriction, making format checks run on every PRBenefits
https://claude.ai/code/session_01HmQQFR4GkFuwgh4gSxJWiE