Fix pre commit and label interaction #1239
Draft
+125
−355
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.
(Redo of #1237)
We've discussed on and off that there is a race condition with setting the labels between the script-based format checks for C++ and CMake. There will soon be an addition problem that Autotester 2 will not play properly with these two isolated GHA workflows that currently only interact via labels. Instead, AT2 will run via a hierarchical set of GHA workflows at the currently mostly unused entry point https://github.com/sstsimulator/sst-core/blob/e992a3fd54178adf2ba9018c35335d32ac8d9f7f/.github/workflows/ci.yml (#1053).
In preparation for this, some time ago (#1055) I added this driver that calls instead https://pre-commit.com/ which has been running simultaneously. It properly pins linter/hook versions, without the extra isolated workflows and shell scripts, and it failing will prevent any following tests or workflows from running.
Since AT1 still needs to work with labels, I modified the pre-commit workflow to just set the
clang-format
ones when it passes or fails, with updated status messages.