Skip to content

Commit d59c1d3

Browse files
IGNITE-28823 Reduce duration of the "Check java code" GitHub Actions job (commit-check.yml) (#13281)
## [IGNITE-28823](https://issues.apache.org/jira/browse/IGNITE-28823) The `check-java` job in `commit-check.yml` is the long pole of the "Code Style, Abandoned Tests, Javadocs" workflow (~8.9 min; every other job in the workflow finishes in under a minute). It runs three sequential Maven invocations and has two inefficiencies: 1. The build is single-threaded (no `-T`), although `ubuntu-latest` has 4 vCPUs. 2. The "abandoned tests" step recompiles the whole reactor a second time. `maven-compiler-plugin` 3.15 logs *"Recompiling the module because of changed dependency"* for 28 modules (including `ignite-core`, 3322 source files): the second invocation uses a different profile set, so the plugin's incremental engine treats reactor dependencies as changed and cascades a full recompile. ### Change - `-T 1C` on the codestyle / `test-compile` step — parallel reactor build. - `-Dmaven.compiler.useIncrementalCompilation=false` on the "abandoned tests" step — reuse the classes compiled by the previous step instead of recompiling. The "abandoned tests" step is intentionally **not** parallelized: the orphaned-test collection writes to a shared file finalized by the last reactor module, so `-T` would race. ### Why not merge the two steps Merging would pull `examples` / `lgpl` modules into the orphaned-test check (today it runs only over `-Pall-java,scala`) and could newly fail it. The chosen flag keeps the check scope identical — profile-conditional source roots (`java-lgpl`) exist only in the `examples` module, which is not part of the "abandoned tests" reactor. ### Verification (local, full reactor) | | before | after | |---|---|---| | step 2 recompiled modules | 30 (28 "changed dependency") | 2 (0 "changed dependency") | | step 1 under `-T 1C` | — | 47 modules SUCCESS, checkstyle incl., 0 failures | The before/after wall-clock is visible on this PR's own CI run, since the change is to `commit-check.yml` itself. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent fb25ec2 commit d59c1d3

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/commit-check.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
with:
4444
distribution: 'temurin'
4545
java-version: ${{ matrix.java }}
46+
cache: 'maven'
4647

4748
- name: Install prerequisites
4849
run: |
@@ -96,11 +97,12 @@ jobs:
9697
9798
- name: Run codestyle and licenses checks
9899
run: |
99-
./mvnw test-compile -Pall-java,licenses,lgpl,checkstyle,examples,scala,check-licenses -B -V
100+
./mvnw test-compile -Pall-java,licenses,lgpl,checkstyle,examples,check-licenses -B -V -T 1C
100101
101102
- name: Run abandoned tests checks.
103+
# Reuse classes from the previous step; the differing profiles otherwise trigger a full reactor recompile.
102104
run : |
103-
./mvnw test -Pcheck-test-suites,all-java,scala -B -V
105+
./mvnw test -Pcheck-test-suites,all-java -B -V -Dmaven.compiler.useIncrementalCompilation=false
104106
105107
- name: Check javadocs.
106108
run : |

0 commit comments

Comments
 (0)