Optimise CI: run clang-format check as a gate for slower jobs #677
stivlo
started this conversation in
Development
Replies: 1 comment
|
I agree that running
If you could prepare a PR for this adjustment it would be awesome. Frankly a local pre-commit hook sounds too heavy-weight, I think that would be an overkill... |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The clang-format check completes in ~1 minute, while the build/test jobs take significantly longer. If a PR has formatting issues, there's no point waiting for the slower jobs to finish — we already know the PR can't be merged.
Suggestion: add
needs: clang-formatto the unit-tests, integration-tests, clang-tidy, and build-unsigned jobs inbuild.ymlso they only run after the format check passes. This would save CI minutes and provide faster feedback on formatting errors.Additionally, a pre-commit hook script could catch formatting issues locally in seconds, before they even reach CI. Each developer would need to install it manually after cloning (instructions would be added to
Docs/Building.md). The CI job would remain as a safety net.Happy to submit a PR if this sounds reasonable.
All reactions