Skip to content

Add Scalpel for incremental CI builds#528

Merged
jamesnetherton merged 1 commit into
apache:camel-quarkus-mainfrom
jamesnetherton:scalpel-changes
Jun 19, 2026
Merged

Add Scalpel for incremental CI builds#528
jamesnetherton merged 1 commit into
apache:camel-quarkus-mainfrom
jamesnetherton:scalpel-changes

Conversation

@jamesnetherton

Copy link
Copy Markdown
Contributor

Registers Scalpel as a Maven core extension (disabled locally by default via .mvn/maven.config) and wires it into the CI pipeline so that pull requests only build and test the modules affected by their changeset.

Changes:

  • .mvn/extensions.xml: register eu.maveniverse.maven.scalpel:extension:0.3.4
  • .mvn/maven.config: disable Scalpel by default (-Dscalpel.enabled=false)
  • .github/workflows/ci-build.yaml:
    • Generate a Scalpel report during the examples build (mode=report, reportFile written outside target/ so clean does not delete it)
    • Fetch the PR base branch before the build so Scalpel can find the merge base in the shallow CI clone
    • Skip the fetch (and fall back to a full build) when the PR carries the ci/disable-incremental label
    • Replace the Groovy-based matrix with generate-test-matrix.sh
    • Add 'modules' output consumed by JVM and Windows test jobs via -pl
  • .github/generate-test-matrix.sh: new script replacing generate-test-groups.groovy; reads the Scalpel JSON report, distributes single-module projects round-robin across up to 10 native test groups, gives multi-module projects a dedicated group, and expands multi-module paths for the -pl modules list

Registers Scalpel as a Maven core extension (disabled locally by default
via .mvn/maven.config) and wires it into the CI pipeline so that pull
requests only build and test the modules affected by their changeset.

Changes:
- .mvn/extensions.xml: register eu.maveniverse.maven.scalpel:extension:0.3.4
- .mvn/maven.config: disable Scalpel by default (-Dscalpel.enabled=false)
- .github/workflows/ci-build.yaml:
  - Generate a Scalpel report during the examples build (mode=report,
    reportFile written outside target/ so clean does not delete it)
  - Fetch the PR base branch before the build so Scalpel can find the
    merge base in the shallow CI clone
  - Skip the fetch (and fall back to a full build) when the PR carries
    the ci/disable-incremental label
  - Replace the Groovy-based matrix with generate-test-matrix.sh
  - Add 'modules' output consumed by JVM and Windows test jobs via -pl
- .github/generate-test-matrix.sh: new script replacing
  generate-test-groups.groovy; reads the Scalpel JSON report, distributes
  single-module projects round-robin across up to 10 native test groups,
  gives multi-module projects a dedicated group, and expands multi-module
  paths for the -pl modules list

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@jamesnetherton

Copy link
Copy Markdown
Contributor Author

I did some testing on my fork and it was working as expected.

If we hit issues post merge we can either fix forwards or roll the change back.

@jamesnetherton jamesnetherton merged commit e10cd3a into apache:camel-quarkus-main Jun 19, 2026
27 of 28 checks passed
@jamesnetherton jamesnetherton deleted the scalpel-changes branch June 19, 2026 06:23
@jamesnetherton

Copy link
Copy Markdown
Contributor Author

I'll merge this, then follow up with a PR for testing. Can't test in this PR, because Scalpel considers the .mvn directory for inclusion in its full build triggers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants