ci: split static-analysis into 4 parallel jobs (timing comparison vs #1333)#1337
Draft
joaodinissf wants to merge 2 commits into
Draft
ci: split static-analysis into 4 parallel jobs (timing comparison vs #1333)#1337joaodinissf wants to merge 2 commits into
joaodinissf wants to merge 2 commits into
Conversation
…b with inline PR annotations Replaces the separate pmd and checkstyle jobs with a single static-analysis job. Step 1 compiles and generates PMD/Checkstyle reports (no *:check goals → no Maven cascade-skip; every module's XML is produced). Step 2 is a Python pass that emits GitHub workflow-command annotations from each violation and exits 1 if any are found — fail-fast that bypasses SpotBugs (slow) when there are PMD/Checkstyle issues. Step 3 re-runs Maven `pmd:check pmd:cpd-check checkstyle:check` as a safety-net for official-tool validation. Steps 4-6 mirror the same pattern for SpotBugs (only run if PMD/Checkstyle are clean). Drops the now-redundant pmd/checkstyle/spotbugs goals from maven-verify (now just `mvn clean verify`). line-endings stays separate. Uses `-T 2C` (8 worker threads on a 4 vCPU runner; benchmark on this branch showed ~25% wall-clock saving over sequential). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…e, verify) Replaces the single static-analysis job with four sibling jobs running in parallel: pmd-checkstyle-analyze (compile + pmd:pmd + cs:checkstyle + python annotate), spotbugs-analyze (compile + spotbugs + python annotate, MAVEN_OPTS=-Xmx4g), maven-gate (compile + all :check goals authoritatively, MAVEN_OPTS=-Xmx4g), and maven-verify (clean verify with tests, no static-analysis). The two analyze jobs each use -T 2C; tests stay single-threaded since the Tycho test reactor isn't safe to parallelize. Goal: cut wall-clock from ~32m (sequential) to ~max-of-the-jobs by running independent work on independent runners. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Comparison PR — do not merge. Built off #1333's tip (
deaf0ba) so the python script and compile-in-same-invocation fix are inherited. Restructures only the CI shape.Structure
line-endingspmd-checkstyle-analyzecompile + pmd:pmd + pmd:cpd + checkstyle:checkstyle+ python annotatespotbugs-analyzecompile + spotbugs:spotbugs+ python annotatemaven-gatecompile + pmd:check + pmd:cpd-check + checkstyle:check + spotbugs:checkmaven-verifyxvfb-run mvn clean verify(no checks, no -T)All siblings, no
needs:. Wall-clock = max of any single job.Goal of this comparison
#1333 (sequential single static-analysis job) measured at 32m 49s on a recent run. Master's design is ~20m. This PR tests whether splitting into independent parallel jobs gets us close to master's wall-clock while keeping #1333's correctness fix (compile-in-same-invocation for type-resolving PMD rules).
Branch protection
If this lands instead of #1333, required checks must change: drop
static-analysis, addpmd-checkstyle-analyze,spotbugs-analyze,maven-gate. Keepline-endingsandmaven-verify.🤖 Generated with Claude Code