Skip to content

ci: run selective jobs on pull requests, full gate on push#323

Merged
DemchaAV merged 1 commit into
2.0-devfrom
build/2.0-selective-ci
Jul 6, 2026
Merged

ci: run selective jobs on pull requests, full gate on push#323
DemchaAV merged 1 commit into
2.0-devfrom
build/2.0-selective-ci

Conversation

@DemchaAV

@DemchaAV DemchaAV commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Why

CI runs the full 3-JDK reactor matrix + examples + japicmp + benchmark smoke on every PR, including docs-only PRs that can't affect the build. With the 2.0 module split, most PRs touch one area and don't need the whole pipeline.

What

  • Add a changes job (dorny/paths-filter) emitting code / core / perf flags, and gate the heavy jobs on them for pull requests only:
    • docs-only PR (no build input touched) → runs Architecture and Documentation Guards alone; build-and-test, examples, japicmp, and the perf smoke all skip.
    • Binary Compatibility (japicmp) runs only when the graph-compose-core module (src/** / pom.xml) changed.
    • Performance Smoke Check runs only when core / render-pdf / templates changed.
  • Pushes to main / develop / 2.0-dev and manual dispatch always run the full gate (2.0-dev added to the push triggers) — defence in depth on integration branches.
  • Add a CI Gate aggregate job: one stable status check, green when every job that ran passed (a job the filter skips counts as success).

⚠️ Branch protection — action needed

Point required checks at CI Gate + Architecture and Documentation Guards (their name: values), not the individual matrix legs (Build and run tests (JDK 17), …). A docs-only PR legitimately skips those legs, so if they stay required the PR waits forever on a check that never reports — that's exactly what CI Gate exists to avoid.

Tests

Pure CI-config change (no runtime code). YAML validated, job dependency graph checked, and the scenarios traced by hand + by an independent pass: docs-only PR → guards + gate only; core PR → everything; templates PR → +benchmark, −japicmp; render-docx PR → build+examples, −japicmp −benchmark; push to 2.0-dev → full reactor + examples. CanonicalSurfaceGuardTest green (scans the CONTRIBUTING edit). The new logic takes effect for PRs opened after merge; this PR's own run uses the base-branch workflow.

Add dorny/paths-filter change detection so a pull request only runs the
jobs its change can affect: a docs-only PR runs the guards alone, Binary
Compatibility runs only when the graph-compose-core module changed, and
the Performance Smoke Check only when core / render-pdf / templates
changed. Pushes to main / develop / 2.0-dev and manual dispatch always
run the full reactor build + examples (defence in depth).

Add a CI Gate job that aggregates the selective jobs into one stable
status check, green when every job that ran passed (a job skipped by the
filter counts as success). Point branch protection at CI Gate plus the
always-run guards so a docs-only PR is not left waiting on a skipped
matrix leg.
@DemchaAV DemchaAV merged commit 2f2ea4d into 2.0-dev Jul 6, 2026
12 checks passed
@DemchaAV DemchaAV deleted the build/2.0-selective-ci branch July 6, 2026 17:44
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.

1 participant