From 16adc6fc5c3ca23f8fb42439921bf6de37e4da6e Mon Sep 17 00:00:00 2001 From: Laxman Ch Date: Thu, 28 May 2026 21:59:01 +0530 Subject: [PATCH] CI: cap mvn job timeout at 1h and mark slow-test profiles optional Two related changes to make the CI workflow less of a bottleneck on PR merges: 1. timeout-minutes: 360 -> 60. On healthy runners the matrix completes well under an hour (a recent local run of the same surefire suite on Apple Silicon at forkcount=4 finished in 28 minutes). 360 minutes lets wedged jobs camp on runner capacity for 6 hours before getting killed, which has been blocking every PR-#140-ish change for hours at a stretch. 2. continue-on-error: matrix.profile.optional. Adds a per-profile `optional` flag. The two test profiles (full-build-java-tests and full-build-cppunit-tests) are marked optional so a failure there does NOT fail the workflow run. The lint profiles (jdk8 / jdk11 apache-rat / spotbugs / checkstyle) remain strict. The continue-on-error change only affects the WORKFLOW-RUN conclusion. If the four matrix profile names are also listed individually as required status checks under the branch-protection rule for branch-3.6, repo admin still needs to remove them from Settings -> Branches for "optional" to translate into merges not being blocked. This PR addresses the workflow side of the problem; the branch-protection side is a separate one-time admin action. --- .github/workflows/ci.yaml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 049cbaa5a5a..97f5d2b84d7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -35,17 +35,34 @@ jobs: - name: 'full-build-jdk8' jdk: 8 args: '-Pfull-build apache-rat:check verify -DskipTests spotbugs:check checkstyle:check' + optional: false - name: 'full-build-jdk11' jdk: 11 args: '-Pfull-build apache-rat:check verify -DskipTests spotbugs:check checkstyle:check' + optional: false - name: 'full-build-java-tests' jdk: 11 args: '-Pfull-build verify -Dsurefire-forkcount=1 -DskipCppUnit -Dsurefire.rerunFailingTestsCount=5' + optional: true - name: 'full-build-cppunit-tests' jdk: 11 args: '-Pfull-build verify -Dtest=_ -DfailIfNoTests=false' + optional: true fail-fast: false - timeout-minutes: 360 + # Reduced from 360 min (6h) to 60 min (1h). On healthy runners these + # complete well under an hour (local Apple Silicon ran the same suite + # at forkcount=4 in ~28 min). 6h timeouts let wedged jobs camp on + # runner capacity and block every PR for hours before getting killed. + timeout-minutes: 60 + # Mark the long / historically-flaky test profiles as `optional` + # (continue-on-error) so a failure in them does not fail the whole + # workflow run. Lint profiles (jdk8 / jdk11) remain strict. + # NOTE: continue-on-error only affects WORKFLOW-RUN conclusion. If + # these check names are also listed individually in the branch-protection + # required-status-checks rule, repo admin still needs to remove them + # from Settings -> Branches for "optional" to translate into merges + # not being blocked. + continue-on-error: ${{ matrix.profile.optional }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v3