tkobayas commented on PR #6860: URL: https://github.com/apache/incubator-kie/pull/6860#issuecomment-5312113690
# Split PR CI into 4 parallel test jobs ## Problem The monorepo PR build ran all ~850 modules sequentially in a single job, taking ~2-3h. ## Solution Split the PR test step into 4 concurrent jobs by project category: **drools**, **optaplanner**, **kogito-runtimes**, **kogito-apps**. Wall-clock time drops to ~1h15m (limited by the longest job, kogito-apps). ## Key changes **`script/ci/CiComputeBuildScopes.java`** -- Added `parseModuleCategories()` which reads `<!-- BEGIN/END xxx modules (auto) -->` markers in the root `pom.xml` to categorize modules. Writes per-category `affected-*.txt` files (e.g., `affected-drools.txt`, `affected-kogito-runtimes.txt`) alongside the existing combined output. **`pom.xml`** -- Added `<!-- BEGIN/END drools/optaplanner/kogito-runtimes/kogito-apps modules (auto) -->` markers in the `<modules>` section. **`.github/actions/ci-setup/action.yaml`** -- New composite action extracting shared CI setup: free disk space, checkout-pr, Java, JBang, Maven settings, changed-file collection, and build scope computation. **`.github/workflows/ci.yaml`** -- Push-to-main remains a single full-build job. PRs fan out to 4 parallel test jobs. Each job: 1. Checks if its category has affected modules -- if not, skips entirely 2. Installs upstream dependencies without tests (`-T 1C -Dquarkus.build.skip=true` for speed) 3. Runs tests only for its own category's affected modules **`.rat-excludes`** -- Replaced 48 individual golden file entries with a single glob `script/ci/tests/scenarios-compute-build-scopes/**`. **Golden files** -- 48 new per-category expected files added across 12 test scenarios. Existing golden files updated for new modules on main. ## Cross-category dependency handling Each test job installs all upstream categories' affected modules (without tests) before running its own: | Job | Upstream install (no tests) | |---|---| | test-drools | upstream only | | test-optaplanner | upstream + affected-drools | | test-kogito-runtimes | upstream + affected-drools + affected-optaplanner | | test-kogito-apps | upstream + affected-drools + affected-optaplanner + affected-kogito-runtimes | ## Build time comparison Sequential CI (run `85920644738`): | Job | Duration | |---|---:| | Java 17 | 3h 05m 04s | | Java 21 | 2h 14m 10s | Parallel CI with `-T 1C` (run `86233087403`): | Job | Java 17 | Java 21 | |---|---:|---:| | Drools | 44m 01s | 41m 55s | | OptaPlanner | 15m 27s | 19m 06s | | Kogito runtimes | 1h 12m 45s | 1h 06m 30s | | Kogito apps | 1h 16m 13s | 1h 05m 33s | -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
